mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
transcodebin: fix logs when failing to link filter
- Display caps of the pad we actually tried to link. - Use the template caps as the filter is likely to not have any caps set yet. - Log pad name as well.
This commit is contained in:
parent
a0423ee20f
commit
667eadac92
1 changed files with 4 additions and 3 deletions
|
@ -147,13 +147,14 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad,
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (self), gst_object_ref (filter));
|
gst_bin_add (GST_BIN (self), gst_object_ref (filter));
|
||||||
if (G_UNLIKELY (gst_pad_link (pad, filter_sink) != GST_PAD_LINK_OK)) {
|
if (G_UNLIKELY (gst_pad_link (pad, filter_sink) != GST_PAD_LINK_OK)) {
|
||||||
GstCaps *othercaps = gst_pad_get_current_caps (sinkpad);
|
GstCaps *othercaps = gst_pad_get_pad_template_caps (filter_sink);
|
||||||
caps = gst_pad_get_current_caps (pad);
|
caps = gst_pad_get_current_caps (pad);
|
||||||
|
|
||||||
GST_ELEMENT_ERROR (self, CORE, PAD,
|
GST_ELEMENT_ERROR (self, CORE, PAD,
|
||||||
(NULL),
|
(NULL),
|
||||||
("Couldn't link pads \n\n%" GST_PTR_FORMAT "\n\n and \n\n %"
|
("Couldn't link pads \n\n %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT
|
||||||
GST_PTR_FORMAT "\n\n", caps, othercaps));
|
"\n\n and \n\n %" GST_PTR_FORMAT ": %" GST_PTR_FORMAT
|
||||||
|
"\n\n", pad, caps, filter_sink, othercaps));
|
||||||
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
|
|
Loading…
Reference in a new issue