class Gst::Loader

Constants

RENAME_MAP
UNLOCK_GVL_METHODS

Public Class Methods

new(base_module, init_arguments) click to toggle source
Calls superclass method
# File lib/gst.rb, line 75
def initialize(base_module, init_arguments)
  super(base_module)
  @init_arguments = init_arguments
end

Private Instance Methods

load_function_info(info) click to toggle source
Calls superclass method
# File lib/gst.rb, line 106
def load_function_info(info)
  return if info.name == "init"
  super
end
post_load(repository, namespace) click to toggle source
# File lib/gst.rb, line 92
def post_load(repository, namespace)
  require_extension
  self.class.start_callback_dispatch_thread
end
pre_load(repository, namespace) click to toggle source
# File lib/gst.rb, line 81
def pre_load(repository, namespace)
  init_check = repository.find(namespace, "init_check")
  arguments = [
    1 + @init_arguments.size,
    [$0] + @init_arguments,
  ]
  succeeded, argc, argv, error = init_check.invoke(arguments)
  @init_arguments.replace(argv[1..-1])
  raise error unless succeeded
end
require_extension() click to toggle source
# File lib/gst.rb, line 97
def require_extension
  begin
    major, minor, _ = RUBY_VERSION.split(/\./)
    require "#{major}.#{minor}/gstreamer.so"
  rescue LoadError
    require "gstreamer.so"
  end
end
rubyish_method_name(function_info) click to toggle source
Calls superclass method
# File lib/gst.rb, line 117
def rubyish_method_name(function_info)
  RENAME_MAP[function_info.name] || super
end
should_unlock_gvl?(function_info, klass) click to toggle source
Calls superclass method
# File lib/gst.rb, line 127
def should_unlock_gvl?(function_info, klass)
  UNLOCK_GVL_METHODS["#{klass}\##{function_info.name}"] || super
end