Caps is empty - can anyone explain why?
Graham Leggett
minfrin at sharp.fm
Sat Sep 5 13:26:59 PDT 2015
Hi all,
I am currently developing an element that exposes the following src:
static GstStaticPadTemplate gst_xxx_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("text/x-raw, format=(string)utf8")
);
I am trying to link my element to fakesink with “xxx ! fakesink”, but am having no luck at all:
0:00:22.440949542 3551 0x21880 INFO GST_PADS gstpad.c:2186:gst_pad_link_prepare: trying to link xxx0:src and fakesink0:sink
0:00:22.441148030 3551 0x21880 INFO GST_PADS gstpad.c:3745:gst_pad_peer_query:<xxx0:sink> pad has no peer
0:00:22.441339851 3551 0x21880 INFO GST_PADS gstpad.c:2242:gst_pad_link_prepare: caps are incompatible
0:00:22.441522089 3551 0x21880 INFO default gstutils.c:1891:gst_element_link_pads_filtered: Could not link pads: xxx0:(null) - fakesink0:(null)
0:00:22.441684170 3551 0x21880 ERROR GST_PIPELINE ./grammar.y:616:gst_parse_perform_link: could not link xxx0 to fakesink0
WARNING: erroneous pipeline: could not link xxx0 to fakesink0
Picking apart the gstreamer code we fail inside gst_caps_can_intersect() as follows:
/* empty caps on either side, return empty */
if (G_UNLIKELY (CAPS_IS_EMPTY (caps1) || CAPS_IS_EMPTY (caps2)))
return FALSE;
How does a caps become empty?
Looking at gst-inspect-1.0 we have the following caps:
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
text/x-raw
format: utf8
linking to
Pad Templates:
SINK template: 'sink'
Availability: Always
Capabilities:
ANY
Can anyone give me a clue why these two caps are interpreted as “empty"?
Regards,
Graham
—
More information about the gstreamer-devel
mailing list