mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/gsterror.c: Add another error string used in a few existing plugins.
Original commit message from CVS: * gst/gsterror.c: (_gst_stream_errors_init): Add another error string used in a few existing plugins. * gst/gstplugin.c: * gst/gstpluginfeature.c: (gst_plugin_feature_load): * tools/gst-inspect.c: (print_element_info): When a feature disappears from a plugin (and the feature exists in the cached registry file), things went horribly wrong. This isn't a complete fix, we should actually be removing the 'missing' features from the features list when we load the actual plugin. That's not yet implemented.
This commit is contained in:
parent
0a55c5f642
commit
35188bbe39
4 changed files with 12 additions and 2 deletions
|
@ -161,6 +161,7 @@ _gst_stream_errors_init (void)
|
|||
TABLE (t, STREAM, DEMUX, N_("Could not demultiplex stream."));
|
||||
TABLE (t, STREAM, MUX, N_("Could not multiplex stream."));
|
||||
TABLE (t, STREAM, FORMAT, N_("Stream is of the wrong format."));
|
||||
TABLE (t, STREAM, STOPPED, N_("Streaming stopped."));
|
||||
|
||||
return t;
|
||||
}
|
||||
|
|
|
@ -846,7 +846,7 @@ gst_plugin_find_feature_by_name (GstPlugin * plugin, const gchar * name)
|
|||
*
|
||||
* Load the named plugin. Refs the plugin.
|
||||
*
|
||||
* Returns: whether the plugin was loaded or not
|
||||
* Returns: A reference to a loaded plugin, or NULL on error.
|
||||
*/
|
||||
GstPlugin *
|
||||
gst_plugin_load_by_name (const gchar * name)
|
||||
|
|
|
@ -118,9 +118,13 @@ gst_plugin_feature_load (GstPluginFeature * feature)
|
|||
gst_registry_lookup_feature (gst_registry_get_default (), feature->name);
|
||||
|
||||
if (real_feature == NULL) {
|
||||
g_critical
|
||||
GST_INFO
|
||||
("Loaded plugin containing feature '%s', but feature disappeared.",
|
||||
feature->name);
|
||||
} else if (!real_feature->loaded) {
|
||||
GST_INFO ("Tried to load plugin containing feature '%s', but feature was "
|
||||
"not found.", real_feature->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return real_feature;
|
||||
|
|
|
@ -1033,6 +1033,11 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
|
|||
GST_ELEMENT_FACTORY (gst_plugin_feature_load (GST_PLUGIN_FEATURE
|
||||
(factory)));
|
||||
|
||||
if (!factory) {
|
||||
g_print ("element plugin couldn't be loaded\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
element = gst_element_factory_create (factory, NULL);
|
||||
if (!element) {
|
||||
g_print ("couldn't construct element for some reason\n");
|
||||
|
|
Loading…
Reference in a new issue