GStreamer Base Plugins 0.10 Library Reference Manual | ||||
---|---|---|---|---|
gstpbutilsmissingpluginsgstpbutilsmissingplugins — Create, recognise and parse missing-plugins messages |
#include <gst/pbutils/missing-plugins.h> gchar* gst_missing_plugin_message_get_installer_detail (GstMessage *msg); gchar* gst_missing_plugin_message_get_description (GstMessage *msg); gboolean gst_is_missing_plugin_message (GstMessage *msg); GstMessage* gst_missing_decoder_message_new (GstElement *element, const GstCaps *decode_caps); GstMessage* gst_missing_encoder_message_new (GstElement *element, const GstCaps *encode_caps); GstMessage* gst_missing_uri_source_message_new (GstElement *element, const gchar *protocol); GstMessage* gst_missing_uri_sink_message_new (GstElement *element, const gchar *protocol); GstMessage* gst_missing_element_message_new (GstElement *element, const gchar *factory_name); gchar* gst_missing_uri_source_installer_detail_new (const gchar *protocol); gchar* gst_missing_uri_sink_installer_detail_new (const gchar *protocol); gchar* gst_missing_element_installer_detail_new (const gchar *factory_name); gchar* gst_missing_decoder_installer_detail_new (const GstCaps *decode_caps); gchar* gst_missing_encoder_installer_detail_new (const GstCaps *encode_caps);
Functions to create, recognise and parse missing-plugins messages for applications and elements.
Missing-plugin messages are posted on the bus by elements like decodebin or playbin if they can't find an appropriate source element or decoder element. The application can use these messages for two things:
concise error/problem reporting to the user mentioning what exactly
is missing, see gst_missing_plugin_message_get_description()
initiate installation of missing plugins, see
gst_missing_plugin_message_get_installer_detail()
and
gst_install_plugins_async()
Applications may also create missing-plugin messages themselves to install required elements that are missing, using the install mechanism mentioned above.
gchar* gst_missing_plugin_message_get_installer_detail (GstMessage *msg);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions.
msg : |
a missing-plugin GstMessage of type GST_MESSAGE_ELEMENT |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
gchar* gst_missing_plugin_message_get_description (GstMessage *msg);
Returns a localised string describing the missing feature, for use in
error dialogs and the like. Should never return NULL unless msg
is not
a valid missing-plugin message.
This function is mainly for applications that need a human-readable string describing a missing plugin, given a previously collected missing-plugin message
msg : |
a missing-plugin GstMessage of type GST_MESSAGE_ELEMENT |
Returns : | a newly-allocated description string, or NULL on error. Free
string with g_free() when not needed any longer.
|
gboolean gst_is_missing_plugin_message (GstMessage *msg);
Checks whether msg
is a missing plugins message.
msg : |
a GstMessage |
Returns : | TRUE if msg is a missing-plugins message, otherwise FALSE .
|
GstMessage* gst_missing_decoder_message_new (GstElement *element, const GstCaps *decode_caps);
Creates a missing-plugin message for element
to notify the application
that a decoder element for a particular set of (fixed) caps is missing.
This function is mainly for use in plugins.
element : |
the GstElement posting the message |
decode_caps : |
the (fixed) caps for which a decoder element is needed |
Returns : | a new GstMessage, or NULL on error |
GstMessage* gst_missing_encoder_message_new (GstElement *element, const GstCaps *encode_caps);
Creates a missing-plugin message for element
to notify the application
that an encoder element for a particular set of (fixed) caps is missing.
This function is mainly for use in plugins.
element : |
the GstElement posting the message |
encode_caps : |
the (fixed) caps for which an encoder element is needed |
Returns : | a new GstMessage, or NULL on error |
GstMessage* gst_missing_uri_source_message_new (GstElement *element, const gchar *protocol);
Creates a missing-plugin message for element
to notify the application
that a source element for a particular URI protocol is missing. This
function is mainly for use in plugins.
element : |
the GstElement posting the message |
protocol : |
the URI protocol the missing source needs to implement, e.g. "http" or "mms" |
Returns : | a new GstMessage, or NULL on error |
GstMessage* gst_missing_uri_sink_message_new (GstElement *element, const gchar *protocol);
Creates a missing-plugin message for element
to notify the application
that a sink element for a particular URI protocol is missing. This
function is mainly for use in plugins.
element : |
the GstElement posting the message |
protocol : |
the URI protocol the missing sink needs to implement, e.g. "http" or "smb" |
Returns : | a new GstMessage, or NULL on error |
GstMessage* gst_missing_element_message_new (GstElement *element, const gchar *factory_name);
Creates a missing-plugin message for element
to notify the application
that a certain required element is missing. This function is mainly for
use in plugins.
element : |
the GstElement posting the message |
factory_name : |
the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc" |
Returns : | a new GstMessage, or NULL on error |
gchar* gst_missing_uri_source_installer_detail_new (const gchar *protocol);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
protocol : |
the URI protocol the missing source needs to implement, e.g. "http" or "mms" |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
Since 0.10.15
gchar* gst_missing_uri_sink_installer_detail_new (const gchar *protocol);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
protocol : |
the URI protocol the missing source needs to implement, e.g. "http" or "mms" |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
Since 0.10.15
gchar* gst_missing_element_installer_detail_new (const gchar *factory_name);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
factory_name : |
the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc" |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
Since 0.10.15
gchar* gst_missing_decoder_installer_detail_new (const GstCaps *decode_caps);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
decode_caps : |
the (fixed) caps for which a decoder element is needed |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
Since 0.10.15
gchar* gst_missing_encoder_installer_detail_new (const GstCaps *encode_caps);
Returns an opaque string containing all the details about the missing
element to be passed to an external installer called via
gst_install_plugins_async()
or gst_install_plugins_sync()
.
This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
encode_caps : |
the (fixed) caps for which an encoder element is needed |
Returns : | a newly-allocated detail string, or NULL on error. Free string
with g_free() when not needed any longer.
|
Since 0.10.15