#include <plugin.h>
Public Types | ||||
typedef sigc::slot< bool, const Glib::RefPtr<Plugin >&> | SlotFilter | |||
For example, bool on_plugin_filter(const Glib::RefPtr<Gst::Plugin>& plugin); The filter function should return true if plugin is a match, false otherwise. | ||||
Public Member Functions | ||||
virtual | ~Plugin () | |||
GstPlugin* | gobj () | |||
Provides access to the underlying C GObject. | ||||
const GstPlugin* | gobj () const | |||
Provides access to the underlying C GObject. | ||||
GstPlugin* | gobj_copy () | |||
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | ||||
Glib::ustring | get_name () const | |||
Get the short name of the plugin. | ||||
Glib::ustring | get_description () const | |||
Get the long descriptive name of the plugin. | ||||
Glib::ustring | get_filename () const | |||
get the filename of the plugin | ||||
Glib::ustring | get_license () const | |||
get the license of the plugin | ||||
Glib::ustring | get_package () const | |||
get the package the plugin belongs to. | ||||
Glib::ustring | get_origin () const | |||
get the URL where the plugin comes from | ||||
Glib::ustring | get_source () const | |||
get the source module the plugin belongs to. | ||||
Glib::ustring | get_version () const | |||
get the version of the plugin | ||||
GModule* | get_module () const | |||
Gets the Module of the plugin. | ||||
bool | is_loaded () const | |||
queries if the plugin is loaded into memory | ||||
Glib::RefPtr<Plugin> | load () | |||
Loads plugin. | ||||
Static Public Member Functions | ||||
static Glib::QueryQuark | error_quark () | |||
static Glib::RefPtr<Plugin> | load_file (const Glib::ustring& filename) | |||
| ||||
static Glib::RefPtr<Plugin> | load_by_name (const Glib::ustring& name) | |||
Load the named plugin. | ||||
static void | free (Glib::ListHandle<Glib::RefPtr<Plugin>>) | |||
Unrefs each member of list, then frees the list. | ||||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Glib::RefPtr<Gst::Plugin> | wrap (GstPlugin* object, bool take_copy=false) | |||
A Glib::wrap() method for this object. |
GStreamer is extensible, so Gst::Element instances can be loaded at runtime. A plugin system can provide one or more of the basic GStreamer Gst::PluginFeature subclasses.
A plugin should export a symbol gst_plugin_desc that is a struct of type 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 PluginInitFunc function that was provided in the gst_plugin_desc.
Once you have a handle to a Gst::Plugin (e.g. from the RegistryPool), you can add any object that subclasses Gst::PluginFeature.
Use find_feature() and feature_list() to find features in a plugin.
Usually plugins are always automaticlly 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 load() can be needed to bring the plugin into memory.
typedef sigc::slot<bool, const Glib::RefPtr<Plugin>&> Gst::Plugin::SlotFilter |
For example, bool on_plugin_filter(const Glib::RefPtr<Gst::Plugin>& plugin); The filter function should return true if plugin is a match, false otherwise.
virtual Gst::Plugin::~Plugin | ( | ) | [virtual] |
GstPlugin* Gst::Plugin::gobj | ( | ) | [inline] |
const GstPlugin* Gst::Plugin::gobj | ( | ) | const [inline] |
GstPlugin* Gst::Plugin::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Gst::Object.
static Glib::QueryQuark Gst::Plugin::error_quark | ( | ) | [static] |
Glib::ustring Gst::Plugin::get_name | ( | ) | const |
Glib::ustring Gst::Plugin::get_description | ( | ) | const |
Get the long descriptive name of the plugin.
Glib::ustring Gst::Plugin::get_filename | ( | ) | const |
get the filename of the plugin
Glib::ustring Gst::Plugin::get_license | ( | ) | const |
get the license of the plugin
Glib::ustring Gst::Plugin::get_package | ( | ) | const |
get the package the plugin belongs to.
Glib::ustring Gst::Plugin::get_origin | ( | ) | const |
get the URL where the plugin comes from
Glib::ustring Gst::Plugin::get_source | ( | ) | const |
get the source module the plugin belongs to.
Glib::ustring Gst::Plugin::get_version | ( | ) | const |
get the version of the plugin
GModule* Gst::Plugin::get_module | ( | ) | const |
Gets the Module of the plugin.
If the plugin isn't loaded yet, 0
is returned.
0
if the plugin isn't loaded yet. bool Gst::Plugin::is_loaded | ( | ) | const |
queries if the plugin is loaded into memory
true
is loaded, false
otherwise. static Glib::RefPtr<Plugin> Gst::Plugin::load_file | ( | const Glib::ustring & | filename | ) | [static] |
Gst::PluginError |
Loads a plugin from file.
filename | The plugin filename to load. |
0
if an error occurred. Glib::RefPtr<Plugin> Gst::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;
0
on error. static Glib::RefPtr<Plugin> Gst::Plugin::load_by_name | ( | const Glib::ustring & | name | ) | [static] |
Load the named plugin.
Refs the plugin.
name | Name of plugin to load. |
0
on error. static void Gst::Plugin::free | ( | Glib::ListHandle<Glib::RefPtr<Plugin>> | ) | [static] |
Glib::RefPtr<Gst::Plugin> wrap | ( | GstPlugin * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |