inspect caps match, but pad link fails with EMPTY caps

Tim Müller tim at centricular.com
Fri Nov 11 09:48:50 UTC 2016


On Thu, 2016-11-10 at 17:09 -0800, PeterT wrote:

Hi Peter,

> How can gst-inspect return the proper caps for both pads, but then
> gst_pad_link fail to query the cap for only one of the two stages?

This is hard to answer without seeing the code of your elements :)

What you see in gst-inspect-1.0 are the "pad template caps". They tell
you all the formats the element can handle in theory. In practice an
element might just be able to handle a smaller subset of what's
advertised in the pad template. So there's a run-time caps query
mechanism as well. Depending on what base class you use, look for a
get_caps or query_caps vfunc or implement a query handler on your pads
and make it handle GST_QUERY_CAPS.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list