Caps negotiation when there are multiple src pads

Jack Buffington jbuffington at redzone.com
Wed May 20 02:28:23 UTC 2020


I have a gstreamer element that I am writing where I have multiple src
pads.   All of them should have the same caps since they are all created
from the same template.  I see the pads when I use gst-inspect.  If I run a
pipeline where I connect to the original 'src' pad that is currently a
leftover from the code that I am building from, everything works great.  My
chain function is running and I push to the src pad.

If I change things so that my chain function pushes to one of the other
pads and then build a pipeline that connects to that pad, the pipeline gets
built but fails in the chain function because the caps weren't negotiated.

Similarly, if I make it so that it pushes to both the src pad and one of
the other pads and then construct a pipeline that connects to src and the
other pad, the buffer successfully comes out of the src pad and then it
hangs when trying to push to the other pad.  When I look at a graph of that
pipeline (created using dot) then I can see that indeed, the src pad has
fully been negotiated but the other pad has not and I see all of the
possible options that it could output.

So...

What should I do to make this element negotiate caps for all pads rather
than just the original sink and src?  I have everything else in my element
working but this part is stumping me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200519/96833ef5/attachment-0001.htm>


More information about the gstreamer-devel mailing list