Class: Gst::Registry
- Defined in:
- lib/gst/registry.rb
Class Method Summary collapse
-
.fork_is_enabled ⇒ Boolean
By default GStreamer will perform scanning and rebuilding of the registry file using a helper child process.
-
.fork_set_enabled(enabled) ⇒ nil
Applications might want to disable/enable spawning of a child helper process when rebuilding the registry.
-
.get ⇒ Gst::Registry
Retrieves the singleton plugin registry.
Instance Method Summary collapse
-
#add_feature(feature) ⇒ Boolean
Add the feature to the registry.
-
#add_plugin(plugin) ⇒ Boolean
Add the plugin to the registry.
-
#check_feature_version(feature_name, min_major, min_minor, min_micro) ⇒ Boolean
Checks whether a plugin feature by the given name exists in registry and whether its version is at least the version required.
-
#feature_filter(filter, first, user_data) ⇒ GLib::List<Gst::PluginFeature>
Runs a filter against all features of the plugins in the registry and returns a GList with the results.
-
#feature_list_cookie ⇒ Integer
Returns the registry's feature list cookie.
-
#find_feature(name, type) ⇒ Gst::PluginFeature
Find the pluginfeature with the given name and type in the registry.
-
#find_plugin(name) ⇒ Gst::Plugin
Find the plugin with the given name in the registry.
-
#get_feature_list(type) ⇒ GLib::List<Gst::PluginFeature>
Retrieves a #GList of Gst::PluginFeature of type.
-
#get_feature_list_by_plugin(name) ⇒ GLib::List<Gst::PluginFeature>
Retrieves a #GList of features of the plugin with name name.
- #get_features(name_or_type) ⇒ Object
-
#lookup(filename) ⇒ Gst::Plugin
Look up a plugin in the given registry with the given filename.
-
#lookup_feature(name) ⇒ Gst::PluginFeature
Find a Gst::PluginFeature with name in registry.
-
#plugin_filter(filter, first, user_data) ⇒ GLib::List<Gst::Plugin>
Runs a filter against all plugins in the registry and returns a #GList with the results.
-
#plugin_list ⇒ GLib::List<Gst::Plugin>
(also: #plugins)
Get a copy of all plugins registered in the given registry.
-
#remove_feature(feature) ⇒ nil
Remove the feature from the registry.
-
#remove_plugin(plugin) ⇒ nil
Remove the plugin from the registry.
-
#scan_path(path) ⇒ Boolean
Scan the given path for plugins to add to the registry.
Methods inherited from Object
#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref
Class Method Details
.fork_is_enabled ⇒ Boolean
By default GStreamer will perform scanning and rebuilding of the registry file using a helper child process.
Applications might want to disable this behaviour with the gst_registry_fork_set_enabled() function, in which case new plugins are scanned (and loaded) into the application process. rebuilding the registry.
.fork_set_enabled(enabled) ⇒ nil
Applications might want to disable/enable spawning of a child helper process when rebuilding the registry. See gst_registry_fork_is_enabled() for more information.
.get ⇒ Gst::Registry
Retrieves the singleton plugin registry. The caller does not own a reference on the registry, as it is alive as long as GStreamer is initialized.
Instance Method Details
#add_feature(feature) ⇒ Boolean
Add the feature to the registry. The feature-added signal will be emitted.
feature's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) MT safe.
#add_plugin(plugin) ⇒ Boolean
Add the plugin to the registry. The plugin-added signal will be emitted.
plugin's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) MT safe.
#check_feature_version(feature_name, min_major, min_minor, min_micro) ⇒ Boolean
Checks whether a plugin feature by the given name exists in registry and whether its version is at least the version required. the same as the required version or newer, and false otherwise.
#feature_filter(filter, first, user_data) ⇒ GLib::List<Gst::PluginFeature>
Runs a filter against all features of the plugins in the registry and returns a GList with the results. If the first flag is set, only the first match is returned (as a list with a single object). MT safe.
#feature_list_cookie ⇒ Integer
Returns the registry's feature list cookie. This changes every time a feature is added or removed from the registry.
#find_feature(name, type) ⇒ Gst::PluginFeature
Find the pluginfeature with the given name and type in the registry. MT safe.
#find_plugin(name) ⇒ Gst::Plugin
Find the plugin with the given name in the registry. The plugin will be reffed; caller is responsible for unreffing. MT safe.
#get_feature_list(type) ⇒ GLib::List<Gst::PluginFeature>
Retrieves a #GList of Gst::PluginFeature of type. MT safe.
#get_feature_list_by_plugin(name) ⇒ GLib::List<Gst::PluginFeature>
Retrieves a #GList of features of the plugin with name name.
#get_features(name_or_type) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/gst/registry.rb', line 20 def get_features(name_or_type) if name_or_type.is_a?(GLib::Type) type = name_or_type get_feature_list(type) else name = name_or_type get_feature_list_by_plugin(name) end end |
#lookup(filename) ⇒ Gst::Plugin
Look up a plugin in the given registry with the given filename. If found, plugin is reffed.
#lookup_feature(name) ⇒ Gst::PluginFeature
Find a Gst::PluginFeature with name in registry. MT safe.
#plugin_filter(filter, first, user_data) ⇒ GLib::List<Gst::Plugin>
Runs a filter against all plugins in the registry and returns a #GList with the results. If the first flag is set, only the first match is returned (as a list with a single object). Every plugin is reffed; use gst_plugin_list_free() after use, which will unref again. MT safe.
#plugin_list ⇒ GLib::List<Gst::Plugin> Also known as: plugins
Get a copy of all plugins registered in the given registry. The refcount of each element in the list in incremented. MT safe.
#remove_feature(feature) ⇒ nil
Remove the feature from the registry.
MT safe.
#remove_plugin(plugin) ⇒ nil
Remove the plugin from the registry.
MT safe.
#scan_path(path) ⇒ Boolean
Scan the given path for plugins to add to the registry. The syntax of the path is specific to the registry.