Klasse Plugin

Alle implementierten Schnittstellen:
PointerInterface

public class Plugin extends PropertyHolder
GStreamer is extensible, so #GstElement instances can be loaded at runtime.
A plugin system can provide one or more of the basic GStreamer
#GstPluginFeature subclasses.

A plugin should export a symbol `gst_plugin_desc` that is a
struct of type #GstPluginDesc.
the plugin loader will check the version of the core library the plugin was
linked against and will create a new #GstPlugin. It will then call the
#GstPluginInitFunc function that was provided in the
`gst_plugin_desc`.

Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you
can add any object that subclasses #GstPluginFeature.

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.

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addDependencySimple

      public void addDependencySimple(@Nullable Str env_vars, @Nullable Str paths, @Nullable Str names, int flags)
      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).
      Parameter:
      env_vars - one or more environment variables (separated by ':', ';' or ','), or %NULL. 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 - one ore more directory paths (separated by ':' or ';' or ','), or %NULL. Example: "/usr/lib/mystuff/plugins"
      names - one or more file names or file name suffixes (separated by commas), or %NULL
      flags - optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE
    • addDependencySimple

      public void addDependencySimple(String env_vars, String paths, String names, int flags)
      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).
      Parameter:
      env_vars - one or more environment variables (separated by ':', ';' or ','), or %NULL. 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 - one ore more directory paths (separated by ':' or ';' or ','), or %NULL. Example: "/usr/lib/mystuff/plugins"
      names - one or more file names or file name suffixes (separated by commas), or %NULL
      flags - optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE
    • addStatusError

      public void addStatusError(@Nonnull Str message)
      Parameter:
      message - the status error message
    • addStatusError

      public void addStatusError(String message)
      Parameter:
      message - the status error message
    • addStatusInfo

      public void addStatusInfo(@Nonnull Str message)
      Parameter:
      message - the status info message
    • addStatusInfo

      public void addStatusInfo(String message)
      Parameter:
      message - the status info message
    • addStatusWarning

      public void addStatusWarning(@Nonnull Str message)
      Parameter:
      message - the status warning message
    • addStatusWarning

      public void addStatusWarning(String message)
      Parameter:
      message - the status warning message
    • getCacheData

      public Structure getCacheData()
      Gets the plugin specific data cache. If it is %NULL there is no cached data
      stored. This is the case when the registry is getting rebuilt.
      Gibt zurück:
      The cached data as a #GstStructure or %NULL.
    • getDescription

      public Str getDescription()
      Get the long descriptive name of the plugin
      Gibt zurück:
      the long name of the plugin
    • getFilename

      public Str getFilename()
      get the filename of the plugin
      Gibt zurück:
      the filename of the plugin
    • getLicense

      public Str getLicense()
      get the license of the plugin
      Gibt zurück:
      the license of the plugin
    • getName

      public Str getName()
      Get the short name of the plugin
      Gibt zurück:
      the name of the plugin
    • getOrigin

      public Str getOrigin()
      get the URL where the plugin comes from
      Gibt zurück:
      the origin of the plugin
    • getPackage

      public Str getPackage()
      get the package the plugin belongs to.
      Gibt zurück:
      the package of the plugin
    • getReleaseDateString

      public Str getReleaseDateString()
      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.
      Gibt zurück:
      the date string of the plugin, or %NULL if not available.
    • getSource

      public Str getSource()
      get the source module the plugin belongs to.
      Gibt zurück:
      the source of the plugin
    • getVersion

      public Str getVersion()
      get the version of the plugin
      Gibt zurück:
      the version of the plugin
    • isLoaded

      public boolean isLoaded()
      queries if the plugin is loaded into memory
      Gibt zurück:
      %TRUE is loaded, %FALSE otherwise
    • load

      public Plugin load()
      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;
       
      Gibt zurück:
      a reference to a loaded plugin, or %NULL on error.
    • setCacheData

      public void setCacheData(@Nonnull Structure cache_data)
      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.
      Parameter:
      cache_data - a structure containing the data to cache
    • listFree

      public static void listFree(@Nonnull List list)
      Unrefs each member of @list, then frees the list.
      Parameter:
      list - list of #GstPlugin
    • loadByName

      public static Plugin loadByName(@Nonnull Str name)
      Load the named plugin. Refs the plugin.
      Parameter:
      name - name of plugin to load
      Gibt zurück:
      a reference to a loaded plugin, or %NULL on error.
    • loadFile

      public static Plugin loadFile(@Nonnull Str filename) throws AllocationError
      Loads the given plugin and refs it. Caller needs to unref after use.
      Parameter:
      filename - the plugin filename to load
      Gibt zurück:
      a reference to the existing loaded GstPlugin, a reference to the newly-loaded GstPlugin, or %NULL if an error occurred.
      Löst aus:
      AllocationError
    • registerStatic

      public static boolean registerStatic(int major_version, int minor_version, @Nonnull Str name, @Nonnull Str description, Plugin.OnPluginInitFunc init_func, @Nonnull Str version, @Nonnull Str license, @Nonnull Str source, @Nonnull Str _package, @Nonnull Str origin)
      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.
      Parameter:
      major_version - the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here
      minor_version - the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here
      name - 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 - description of the plugin
      init_func - pointer to the init function of this plugin.
      version - version string of the plugin
      license - effective license of plugin. Must be one of the approved licenses (see #GstPluginDesc above) or the plugin will not be registered.
      source - source module plugin belongs to
      _package - shipped package plugin belongs to
      origin - URL to provider of plugin
      Gibt zurück:
      %TRUE if the plugin was registered correctly, otherwise %FALSE.
    • registerStaticFull

      public static boolean registerStaticFull(int major_version, int minor_version, @Nonnull Str name, @Nonnull Str description, Plugin.OnPluginInitFullFunc init_full_func, @Nonnull Str version, @Nonnull Str license, @Nonnull Str source, @Nonnull Str _package, @Nonnull Str origin, @Nullable Pointer user_data)
      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 #GstPluginInitFullFunc
      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.
      Parameter:
      major_version - the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here
      minor_version - the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here
      name - 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 - description of the plugin
      init_full_func - pointer to the init function with user data of this plugin.
      version - version string of the plugin
      license - effective license of plugin. Must be one of the approved licenses (see #GstPluginDesc above) or the plugin will not be registered.
      source - source module plugin belongs to
      _package - shipped package plugin belongs to
      origin - URL to provider of plugin
      user_data - gpointer to user data
      Gibt zurück:
      %TRUE if the plugin was registered correctly, otherwise %FALSE.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()