mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/gstplugin.c: Make some error messages more end-user friendly.
Original commit message from CVS: * gst/gstplugin.c: (gst_plugin_load_file): Make some error messages more end-user friendly. * tools/gst-inspect.c: (main): Check if command-line argument is a file and attempt to load that file as a plugin.
This commit is contained in:
parent
18682cacc1
commit
1ba0964a87
3 changed files with 27 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-09-29 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* gst/gstplugin.c: (gst_plugin_load_file): Make some error messages
|
||||||
|
more end-user friendly.
|
||||||
|
* tools/gst-inspect.c: (main): Check if command-line argument is
|
||||||
|
a file and attempt to load that file as a plugin.
|
||||||
|
|
||||||
2005-09-29 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-09-29 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* check/gst/gstbin.c:
|
* check/gst/gstbin.c:
|
||||||
|
|
|
@ -422,7 +422,7 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
GST_PLUGIN_ERROR,
|
GST_PLUGIN_ERROR,
|
||||||
GST_PLUGIN_ERROR_MODULE,
|
GST_PLUGIN_ERROR_MODULE,
|
||||||
"Could not find plugin entry point in \"%s\"", filename);
|
"File \"%s\" is not a GStreamer plugin", filename);
|
||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
plugin->orig_desc = (GstPluginDesc *) ptr;
|
plugin->orig_desc = (GstPluginDesc *) ptr;
|
||||||
|
@ -445,7 +445,8 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
GST_PLUGIN_ERROR,
|
GST_PLUGIN_ERROR,
|
||||||
GST_PLUGIN_ERROR_MODULE,
|
GST_PLUGIN_ERROR_MODULE,
|
||||||
"gst_plugin_register_func failed for plugin \"%s\"", filename);
|
"File \"%s\" appears to be a GStreamer plugin, but it failed to initialize",
|
||||||
|
filename);
|
||||||
g_module_close (module);
|
g_module_close (module);
|
||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1125,12 +1125,27 @@ main (int argc, char *argv[])
|
||||||
if (plugin) {
|
if (plugin) {
|
||||||
print_plugin_info (plugin);
|
print_plugin_info (plugin);
|
||||||
print_plugin_features (plugin);
|
print_plugin_features (plugin);
|
||||||
|
} else {
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (g_file_test (arg, G_FILE_TEST_EXISTS)) {
|
||||||
|
plugin = gst_plugin_load_file (arg, &error);
|
||||||
|
|
||||||
|
if (plugin) {
|
||||||
|
print_plugin_info (plugin);
|
||||||
|
print_plugin_features (plugin);
|
||||||
|
} else {
|
||||||
|
g_print ("Error loading plugin file: %s\n", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
g_print ("No such element or plugin '%s'\n", arg);
|
g_print ("No such element or plugin '%s'\n", arg);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue