validate: Properly notify user about missing plugins

This way it is clear in gst-validate-launcher that the failure is due
to a missing plugin
This commit is contained in:
Thibault Saunier 2015-02-18 10:05:55 +01:00
parent f0511cc3a2
commit 3b6f187d85

View file

@ -125,8 +125,14 @@ _bus_handler (GstBus * bus, GstMessage * message,
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
gst_message_parse_error (message, &err, &debug);
if (g_error_matches (err, GST_CORE_ERROR, GST_CORE_ERROR_MISSING_PLUGIN)) {
GST_VALIDATE_REPORT (monitor, MISSING_PLUGIN,
"Error: %s -- Debug message: %s", err->message, debug);
} else {
GST_VALIDATE_REPORT (monitor, ERROR_ON_BUS,
"Got error: %s -- Debug message: %s", err->message, debug);
}
g_error_free (err);
g_free (debug);
break;