From 3b6f187d85db29bce6ba25e78205291fcb2c598c Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 18 Feb 2015 10:05:55 +0100 Subject: [PATCH] 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 --- validate/gst/validate/gst-validate-pipeline-monitor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/validate/gst/validate/gst-validate-pipeline-monitor.c b/validate/gst/validate/gst-validate-pipeline-monitor.c index 25c655a463..eeb4f112ab 100644 --- a/validate/gst/validate/gst-validate-pipeline-monitor.c +++ b/validate/gst/validate/gst-validate-pipeline-monitor.c @@ -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); - GST_VALIDATE_REPORT (monitor, ERROR_ON_BUS, - "Got error: %s -- Debug message: %s", err->message, 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;