Class: Gst::Plugin

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Class Method Summary collapse

Instance Method Summary collapse

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=, #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

.list_free(list) ⇒ nil

Unrefs each member of list, then frees the list.

Parameters:

  • list (GLib::List<Gst::Plugin>)

    list of Gst::Plugin

Returns:

  • (nil)

.load_by_name(name) ⇒ Gst::Plugin

Load the named plugin. Refs the plugin. nil on error.

Parameters:

  • name (String)

    name of plugin to load

Returns:

.load_file(filename) ⇒ Gst::Plugin

Loads the given plugin and refs it. Caller needs to unref after use. reference to the newly-loaded GstPlugin, or nil if an error occurred.

Parameters:

  • filename (Gst::filename)

    the plugin filename to load

Returns:

  • (Gst::Plugin)

    a reference to the existing loaded GstPlugin, a

.register_static(major_version, minor_version, name, description, init_func, version, license, source, package, origin) ⇒ Boolean

Registers a static plugin, ie. a plugin which is private to an application or library and contained within the application or library (as opposed to being shipped as a separate module file).

You must make sure that GStreamer has been initialised (with gst_init() or via gst_init_get_option_group()) before calling this function.

Parameters:

  • major_version (Integer)

    the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here

  • minor_version (Integer)

    the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here

  • name (String)

    a unique name of the plugin (ideally prefixed with an application- or library-specific namespace prefix in order to avoid name conflicts in case a similar plugin with the same name ever gets added to GStreamer)

  • description (String)

    description of the plugin

  • init_func (Gst::PluginInitFunc)

    pointer to the init function of this plugin.

  • version (String)

    version string of the plugin

  • license (String)

    effective license of plugin. Must be one of the approved licenses (see Gst::PluginDesc above) or the plugin will not be registered.

  • source (String)

    source module plugin belongs to

  • package (String)

    shipped package plugin belongs to

  • origin (String)

    URL to provider of plugin

Returns:

  • (Boolean)

    true if the plugin was registered correctly, otherwise false.

.register_static_full(major_version, minor_version, name, description, init_full_func, version, license, source, package, origin, user_data) ⇒ Boolean

Registers a static plugin, ie. a plugin which is private to an application or library and contained within the application or library (as opposed to being shipped as a separate module file) with a Gst::PluginInitFullFunc which allows user data to be passed to the callback function (useful for bindings).

You must make sure that GStreamer has been initialised (with gst_init() or via gst_init_get_option_group()) before calling this function.

Parameters:

  • major_version (Integer)

    the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here

  • minor_version (Integer)

    the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here

  • name (String)

    a unique name of the plugin (ideally prefixed with an application- or library-specific namespace prefix in order to avoid name conflicts in case a similar plugin with the same name ever gets added to GStreamer)

  • description (String)

    description of the plugin

  • init_full_func (Gst::PluginInitFullFunc)

    pointer to the init function with user data of this plugin.

  • version (String)

    version string of the plugin

  • license (String)

    effective license of plugin. Must be one of the approved licenses (see Gst::PluginDesc above) or the plugin will not be registered.

  • source (String)

    source module plugin belongs to

  • package (String)

    shipped package plugin belongs to

  • origin (String)

    URL to provider of plugin

  • user_data (GObject)

    gpointer to user data

Returns:

  • (Boolean)

    true if the plugin was registered correctly, otherwise false.

Instance Method Details

#add_dependency(env_vars, paths, names, flags) ⇒ nil

Make GStreamer aware of external dependencies which affect the feature set of this plugin (ie. the elements or typefinders associated with it).

GStreamer will re-inspect plugins with external dependencies whenever any of the external dependencies change. This is useful for plugins which wrap other plugin systems, e.g. a plugin which wraps a plugin-based visualisation library and makes visualisations available as GStreamer elements, or a codec loader which exposes elements and/or caps dependent on what external codec libraries are currently installed.

Parameters:

  • env_vars (Array<String>)

    nil-terminated array of environment variables affecting the feature set of the plugin (e.g. an environment variable containing paths where to look for additional modules/plugins of a library), or nil. Environment variable names may be followed by a path component which will be added to the content of the environment variable, e.g. "HOME/.mystuff/plugins".

  • paths (Array<String>)

    nil-terminated array of directories/paths where dependent files may be, or nil.

  • names (Array<String>)

    nil-terminated array of file names (or file name suffixes, depending on flags) to be used in combination with the paths from paths and/or the paths extracted from the environment variables in env_vars, or nil.

  • flags (Gst::PluginDependencyFlags)

    optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE

Returns:

  • (nil)

#add_dependency_simple(env_vars, paths, names, flags) ⇒ nil

Make GStreamer aware of external dependencies which affect the feature set of this plugin (ie. the elements or typefinders associated with it).

GStreamer will re-inspect plugins with external dependencies whenever any of the external dependencies change. This is useful for plugins which wrap other plugin systems, e.g. a plugin which wraps a plugin-based visualisation library and makes visualisations available as GStreamer elements, or a codec loader which exposes elements and/or caps dependent on what external codec libraries are currently installed.

Convenience wrapper function for gst_plugin_add_dependency() which takes simple strings as arguments instead of string arrays, with multiple arguments separated by predefined delimiters (see above).

Parameters:

  • env_vars (String)

    one or more environment variables (separated by ':', ';' or ','), or nil. Environment variable names may be followed by a path component which will be added to the content of the environment variable, e.g. "HOME/.mystuff/plugins:MYSTUFF_PLUGINS_PATH"

  • paths (String)

    one ore more directory paths (separated by ':' or ';' or ','), or nil. Example: "/usr/lib/mystuff/plugins"

  • names (String)

    one or more file names or file name suffixes (separated by commas), or nil

  • flags (Gst::PluginDependencyFlags)

    optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE

Returns:

  • (nil)

#add_status_error(message) ⇒ nil

Parameters:

  • message (String)

    the status error message

Returns:

  • (nil)

#add_status_info(message) ⇒ nil

Parameters:

  • message (String)

    the status info message

Returns:

  • (nil)

#add_status_warning(message) ⇒ nil

Parameters:

  • message (String)

    the status warning message

Returns:

  • (nil)

#cache_dataGst::Structure

Gets the plugin specific data cache. If it is nil there is no cached data stored. This is the case when the registry is getting rebuilt. Gst::Structure or nil.

Returns:

#cache_data=(cache_data) ⇒ nil

Adds plugin specific data to cache. Passes the ownership of the structure to the plugin.

The cache is flushed every time the registry is rebuilt.

Parameters:

  • cache_data (Gst::Structure)

    a structure containing the data to cache

Returns:

  • (nil)

#descriptionString

Get the long descriptive name of the plugin

Returns:

  • (String)

    the long name of the plugin

#filenameGst::filename

get the filename of the plugin

Returns:

  • (Gst::filename)

    the filename of the plugin

#is_loadedBoolean

queries if the plugin is loaded into memory

Returns:

  • (Boolean)

    true is loaded, false otherwise

#licenseString

get the license of the plugin

Returns:

  • (String)

    the license of the plugin

#loadGst::Plugin

Loads plugin. Note that the return value is the loaded plugin; plugin is untouched. The normal use pattern of this function goes like this:

|[ GstPlugin *loaded_plugin; loaded_plugin = gst_plugin_load (plugin); // presumably, we're no longer interested in the potentially-unloaded plugin gst_object_unref (plugin); plugin = loaded_plugin; ]| nil on error.

Returns:

#nameString

Get the short name of the plugin

Returns:

  • (String)

    the name of the plugin

#originString

get the URL where the plugin comes from

Returns:

  • (String)

    the origin of the plugin

#packageString

get the package the plugin belongs to.

Returns:

  • (String)

    the package of the plugin

#release_date_stringString

Get the release date (and possibly time) in form of a string, if available.

For normal GStreamer plugin releases this will usually just be a date in the form of "YYYY-MM-DD", while pre-releases and builds from git may contain a time component after the date as well, in which case the string will be formatted like "YYYY-MM-DDTHH:MMZ" (e.g. "2012-04-30T09:30Z").

There may be plugins that do not have a valid release date set on them. available.

Returns:

  • (String)

    the date string of the plugin, or nil if not

#sourceString

get the source module the plugin belongs to.

Returns:

  • (String)

    the source of the plugin

#status_errorsArray<String>

Returns an array of plugin status error messages, or NULL.

Returns:

  • (Array<String>)

    an array of plugin status error messages, or NULL

#status_infosArray<String>

Returns an array of plugin status info messages, or NULL.

Returns:

  • (Array<String>)

    an array of plugin status info messages, or NULL

#status_warningsArray<String>

Returns an array of plugin status warning messages, or NULL.

Returns:

  • (Array<String>)

    an array of plugin status warning messages, or NULL

#versionString

get the version of the plugin

Returns:

  • (String)

    the version of the plugin