Gst.Plugin¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Structs:
| class | 
 | 
| class | 
 | 
| class | 
 | 
| class | 
 | 
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gst.Plugin(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - GStreamer is extensible, so - Gst.Elementinstances can be loaded at runtime. A plugin system can provide one or more of the basic GStreamer- Gst.PluginFeaturesubclasses.- A plugin should export a symbol - gst_plugin_descthat is a struct of type- Gst.PluginDesc. the plugin loader will check the version of the core library the plugin was linked against and will create a new- Gst.Plugin. It will then call the- Gst.PluginInitFuncfunction that was provided in the- gst_plugin_desc.- Once you have a handle to a - Gst.Plugin(e.g. from the- Gst.Registry), you can add any object that subclasses- Gst.PluginFeature.- Usually plugins are always automatically loaded so you don’t need to call - Gst.Plugin.load() explicitly to bring it into memory. There are options to statically link plugins to an app or even use GStreamer without a plugin repository in which case- Gst.Plugin.load() can be needed to bring the plugin into memory.- classmethod list_free(list)[source]¶
- Parameters:
- list ([ - Gst.Plugin]) – list of- Gst.Plugin
 - Unrefs each member of list, then frees the list. 
 - classmethod load_by_name(name)[source]¶
- Parameters:
- name ( - str) – name of plugin to load
- Returns:
- a reference to a loaded plugin, or - Noneon error.
- Return type:
- Gst.Pluginor- None
 - Load the named plugin. Refs the plugin. 
 - classmethod load_file(filename)[source]¶
- Parameters:
- filename ( - str) – the plugin filename to load
- Raises:
- Returns:
- a reference to the existing loaded - Gst.Plugin, a reference to the newly-loaded- Gst.Plugin, or- Noneif an error occurred.
- Return type:
 - Loads the given plugin and refs it. Caller needs to unref after use. 
 - classmethod register_static(major_version, minor_version, name, description, init_func, version, license, source, package, origin)[source]¶
- Parameters:
- major_version ( - int) – the major version number of the GStreamer core that the plugin was compiled for, you can just use- Gst.VERSION_MAJORhere
- minor_version ( - int) – the minor version number of the GStreamer core that the plugin was compiled for, you can just use- Gst.VERSION_MINORhere
- name ( - str) – 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 ( - str) – description of the plugin
- init_func ( - Gst.PluginInitFunc) – pointer to the init function of this plugin.
- version ( - str) – version string of the plugin
- license ( - str) – effective license of plugin. Must be one of the approved licenses (see- Gst.PluginDescabove) or the plugin will not be registered.
- source ( - str) – source module plugin belongs to
- package ( - str) – shipped package plugin belongs to
- origin ( - str) – URL to provider of plugin
 
- Returns:
- Trueif the plugin was registered correctly, otherwise- False.
- Return type:
 - 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.
 - classmethod register_static_full(major_version, minor_version, name, description, init_full_func, version, license, source, package, origin, *user_data)[source]¶
- Parameters:
- major_version ( - int) – the major version number of the GStreamer core that the plugin was compiled for, you can just use- Gst.VERSION_MAJORhere
- minor_version ( - int) – the minor version number of the GStreamer core that the plugin was compiled for, you can just use- Gst.VERSION_MINORhere
- name ( - str) – 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 ( - str) – description of the plugin
- init_full_func ( - Gst.PluginInitFullFunc) – pointer to the init function with user data of this plugin.
- version ( - str) – version string of the plugin
- license ( - str) – effective license of plugin. Must be one of the approved licenses (see- Gst.PluginDescabove) or the plugin will not be registered.
- source ( - str) – source module plugin belongs to
- package ( - str) – shipped package plugin belongs to
- origin ( - str) – URL to provider of plugin
 
- Returns:
- Trueif the plugin was registered correctly, otherwise- False.
- Return type:
 - 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.PluginInitFullFuncwhich 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.
 - add_dependency(env_vars, paths, names, flags)[source]¶
- Parameters:
- env_vars ([ - str] or- None) –- None-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- None. 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 ([ - str] or- None) –- None-terminated array of directories/paths where dependent files may be, or- None.
- names ([ - str] or- None) –- None-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- None.
- flags ( - Gst.PluginDependencyFlags) – optional flags, or- Gst.PluginDependencyFlags.NONE
 
 - 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. 
 - add_dependency_simple(env_vars, paths, names, flags)[source]¶
- Parameters:
- env_vars ( - stror- None) – one or more environment variables (separated by ‘:’, ‘;’ or ‘,’), or- None. 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 ( - stror- None) – one ore more directory paths (separated by ‘:’ or ‘;’ or ‘,’), or- None. Example: “/usr/lib/mystuff/plugins”
- names ( - stror- None) – one or more file names or file name suffixes (separated by commas), or- None
- flags ( - Gst.PluginDependencyFlags) – optional flags, or- Gst.PluginDependencyFlags.NONE
 
 - 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).
 - add_status_error(message)[source]¶
- Parameters:
- message ( - str) – the status error message
 - New in version 1.24. 
 - add_status_info(message)[source]¶
- Parameters:
- message ( - str) – the status info message
 - New in version 1.24. 
 - add_status_warning(message)[source]¶
- Parameters:
- message ( - str) – the status warning message
 - New in version 1.24. 
 - get_cache_data()[source]¶
- Returns:
- The cached data as a - Gst.Structureor- None.
- Return type:
 - Gets the plugin specific data cache. If it is - Nonethere is no cached data stored. This is the case when the registry is getting rebuilt.
 - get_description()[source]¶
- Returns:
- the long name of the plugin 
- Return type:
 - Get the long descriptive name of the plugin 
 - get_license()[source]¶
- Returns:
- the license of the plugin 
- Return type:
 - get the license of the plugin 
 - get_origin()[source]¶
- Returns:
- the origin of the plugin 
- Return type:
 - get the URL where the plugin comes from 
 - get_package()[source]¶
- Returns:
- the package of the plugin 
- Return type:
 - get the package the plugin belongs to. 
 - get_release_date_string()[source]¶
- 
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. 
 - get_source()[source]¶
- Returns:
- the source of the plugin 
- Return type:
 - get the source module the plugin belongs to. 
 - get_version()[source]¶
- Returns:
- the version of the plugin 
- Return type:
 - get the version of the plugin 
 - load()[source]¶
- Returns:
- a reference to a loaded plugin, or - Noneon error.
- Return type:
- Gst.Pluginor- None
 - Loads self. Note that the *return value* is the loaded plugin; self 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; 
 - set_cache_data(cache_data)[source]¶
- Parameters:
- cache_data ( - Gst.Structure) – a structure containing the data to cache
 - Adds plugin specific data to cache. Passes the ownership of the structure to the self. - The cache is flushed every time the registry is rebuilt.