org.gstreamer
Class Plugin

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.lowlevel.RefCountedObject
                  extended by org.gstreamer.GObject
                      extended by org.gstreamer.GstObject
                          extended by org.gstreamer.Plugin

public class Plugin
extends GstObject

Container for features loaded from a shared object module

GStreamer is extensible, so Element instances can be loaded at runtime. A plugin system can provide one or more of the basic GStreamer PluginFeature 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 Plugin. 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 #GstRegistryPool), you can add any object that subclasses #GstPluginFeature.

Use gst_plugin_find_feature() and gst_plugin_get_feature_list() to find features in a plugin.

Usually plugins are always automaticlly loaded so you don't need to call load(java.lang.String) 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 load(java.lang.String) can be needed to bring the plugin into memory.

See Also:
PluginFeature, ElementFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gstreamer.GObject
GObject.GCallback
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, ownsHandle
 
Constructor Summary
Plugin(NativeObject.Initializer init)
          Creates a new instance of GstElement
 
Method Summary
 java.lang.String getDescription()
          Get the long descriptive name of the plugin.
 java.lang.String getFilename()
          Get the filename of the plugin.
 java.lang.String getLicense()
          get the license of the plugin.
 java.lang.String getName()
          Get the short name of the plugin.
 java.lang.String getOrigin()
          Get the URL where the plugin comes from.
 java.lang.String getPackage()
          Get the package the plugin belongs to.
 java.lang.String getSource()
          Get the source module the plugin belongs to.
 java.lang.String getVersion()
          Get the version of the plugin.
 boolean isLoaded()
          Queries if the plugin is loaded into memory.
 Plugin load()
          Ensures this plugin is loaded.
 Plugin load(java.lang.String pluginName)
          Load the named plugin.
 
Methods inherited from class org.gstreamer.GstObject
addListenerProxy, initializer, initializer, objectFor, objectFor, ref, removeListenerProxy, setName, steal, toString, unref
 
Methods inherited from class org.gstreamer.GObject
addCallback, connect, connect, connect, disconnect, disconnect, disposeNativeHandle, g_signal_connect, get, getPointer, invalidate, objectFor, removeCallback, set
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, instanceFor, isDisposed, nativeValue, objectFor, objectFor
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plugin

public Plugin(NativeObject.Initializer init)
Creates a new instance of GstElement

Parameters:
init - internal initialization data.
Method Detail

load

public Plugin load(java.lang.String pluginName)
Load the named plugin.

Parameters:
pluginName -
Returns:
A new Plugin reference if the plugin was loaded, else null.

getName

public java.lang.String getName()
Get the short name of the plugin.

Overrides:
getName in class GstObject
Returns:
the name of the plugin.

getDescription

public java.lang.String getDescription()
Get the long descriptive name of the plugin.

Returns:
The long name of the plugin.

getFilename

public java.lang.String getFilename()
Get the filename of the plugin.

Returns:
The filename of the plugin.

getVersion

public java.lang.String getVersion()
Get the version of the plugin.

Returns:
The version of the plugin.

getLicense

public java.lang.String getLicense()
get the license of the plugin.

Returns:
The license of the plugin.

getSource

public java.lang.String getSource()
Get the source module the plugin belongs to.

Returns:
The source of the plugin.

getPackage

public java.lang.String getPackage()
Get the package the plugin belongs to.

Returns:
The package of the plugin.

getOrigin

public java.lang.String getOrigin()
Get the URL where the plugin comes from.

Returns:
The origin of the plugin.

isLoaded

public boolean isLoaded()
Queries if the plugin is loaded into memory.

Returns:
true if it is loaded, false otherwise.

load

public Plugin load()
Ensures this plugin is loaded.

Returns:
a potentially new Plugin reference.