Caps is empty - can anyone explain why?
Sebastian Dröge
sebastian at centricular.com
Sun Sep 6 02:45:33 PDT 2015
On Sa, 2015-09-05 at 22:26 +0200, Graham Leggett wrote:
> 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"?
While the template caps are certainly compatible, maybe one of the pads
is returning EMPTY caps in the CAPS query, which is done during
linking.
Can you provide a full debug log with GST_DEBUG=6 from the time
gst_pad_link() is called to the lines you pasted above? That will tell
the exact caps it is checking for compatibility.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150906/f73c0f43/attachment.sig>
More information about the gstreamer-devel
mailing list