mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
transcodebin: Minor error message enhancement
This commit is contained in:
parent
eb0d72f382
commit
8eb0e637c7
2 changed files with 10 additions and 5 deletions
|
@ -341,12 +341,16 @@ gst_transcode_bin_link_encodebin_pad (GstTranscodeBin * self, GstPad * pad,
|
||||||
GstCaps *othercaps = gst_pad_query_caps (stream->encodebin_pad, NULL);
|
GstCaps *othercaps = gst_pad_query_caps (stream->encodebin_pad, NULL);
|
||||||
caps = gst_pad_get_current_caps (pad);
|
caps = gst_pad_get_current_caps (pad);
|
||||||
|
|
||||||
|
if (!caps)
|
||||||
|
caps = gst_pad_query_caps (pad, NULL);
|
||||||
|
|
||||||
GST_ELEMENT_ERROR_WITH_DETAILS (self, CORE, PAD,
|
GST_ELEMENT_ERROR_WITH_DETAILS (self, CORE, PAD,
|
||||||
(NULL),
|
(NULL),
|
||||||
("Couldn't link pads:\n %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT
|
("Couldn't link pads:\n %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT
|
||||||
"\nand:\n"
|
"\nand:\n"
|
||||||
" %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT "\n\n",
|
" %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT "\n\n Error: %s\n",
|
||||||
pad, caps, stream->encodebin_pad, othercaps),
|
pad, caps, stream->encodebin_pad, othercaps,
|
||||||
|
gst_pad_link_get_name (lret)),
|
||||||
("linking-error", GST_TYPE_PAD_LINK_RETURN, lret,
|
("linking-error", GST_TYPE_PAD_LINK_RETURN, lret,
|
||||||
"source-pad", GST_TYPE_PAD, pad,
|
"source-pad", GST_TYPE_PAD, pad,
|
||||||
"source-caps", GST_TYPE_CAPS, caps,
|
"source-caps", GST_TYPE_CAPS, caps,
|
||||||
|
|
|
@ -236,10 +236,11 @@ _error_cb (GstTranscoder * transcoder, GError * err, GstStructure * details)
|
||||||
GST_TYPE_PAD_LINK_RETURN, &lret,
|
GST_TYPE_PAD_LINK_RETURN, &lret,
|
||||||
"msg-source-type", G_TYPE_GTYPE, &type, NULL) &&
|
"msg-source-type", G_TYPE_GTYPE, &type, NULL) &&
|
||||||
type == g_type_from_name ("GstTranscodeBin")) {
|
type == g_type_from_name ("GstTranscodeBin")) {
|
||||||
|
const gchar *debug = gst_structure_get_string (details, "debug");
|
||||||
|
|
||||||
error ("\nCould not setup transcoding pipeline,"
|
error ("\nCould not setup transcoding pipeline,"
|
||||||
" make sure that your transcoding format parameters"
|
" make sure that your transcoding format parameters"
|
||||||
" are compatible with the input stream.");
|
" are compatible with the input stream.\n\n%s", debug);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue