From: Thibault Saunier Date: Fri, 20 Nov 2020 14:29:46 +0000 (-0300) Subject: transcodebin: Minor error message enhancement X-Git-Tag: 1.19.3~507^2~990 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8eb0e637c7bd2a4b58f0aebdc56d44bc9a6eda6b;p=platform%2Fupstream%2Fgstreamer.git transcodebin: Minor error message enhancement --- diff --git a/gst/transcode/gsttranscodebin.c b/gst/transcode/gsttranscodebin.c index 5858081..e5c041c 100644 --- a/gst/transcode/gsttranscodebin.c +++ b/gst/transcode/gsttranscodebin.c @@ -55,7 +55,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", * * The sometimes source pad, it will be exposed depending on the * #transcodebin:profile in use. - * + * * Note: in GStreamer 1.18 it was a static * srcpad but in the the 1.20 cycle it was decided that we should make it a * sometimes pad as part of the development of #encodebin2. @@ -341,12 +341,16 @@ gst_transcode_bin_link_encodebin_pad (GstTranscodeBin * self, GstPad * pad, GstCaps *othercaps = gst_pad_query_caps (stream->encodebin_pad, NULL); caps = gst_pad_get_current_caps (pad); + if (!caps) + caps = gst_pad_query_caps (pad, NULL); + GST_ELEMENT_ERROR_WITH_DETAILS (self, CORE, PAD, (NULL), ("Couldn't link pads:\n %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT "\nand:\n" - " %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT "\n\n", - pad, caps, stream->encodebin_pad, othercaps), + " %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT "\n\n Error: %s\n", + pad, caps, stream->encodebin_pad, othercaps, + gst_pad_link_get_name (lret)), ("linking-error", GST_TYPE_PAD_LINK_RETURN, lret, "source-pad", GST_TYPE_PAD, pad, "source-caps", GST_TYPE_CAPS, caps, diff --git a/tools/gst-transcoder.c b/tools/gst-transcoder.c index 1b5bbc5..d805c76 100644 --- a/tools/gst-transcoder.c +++ b/tools/gst-transcoder.c @@ -236,10 +236,11 @@ _error_cb (GstTranscoder * transcoder, GError * err, GstStructure * details) GST_TYPE_PAD_LINK_RETURN, &lret, "msg-source-type", G_TYPE_GTYPE, &type, NULL) && type == g_type_from_name ("GstTranscodeBin")) { + const gchar *debug = gst_structure_get_string (details, "debug"); + error ("\nCould not setup transcoding pipeline," " make sure that your transcoding format parameters" - " are compatible with the input stream."); - + " are compatible with the input stream.\n\n%s", debug); return; } }