webrtcbin plumbing/caps negotiation race condition

Florian Echtler floe at butterbrot.org
Wed Jan 11 18:13:15 UTC 2023


Okay, well, solved it - this had an entirely different root cause, namely that 
the mixers feeding into the webrtcbin had the "ignore-inactive-pads" flag set.

Which obviously means that I completely misunderstood how this flag actually 
works - can somebody shed a bit of light on why this can cause caps negotiation 
downstream to randomly fail?

Thanks and best, Florian

On 11.01.23 14:00, Florian Echtler via gstreamer-devel wrote:
> Hello everyone,
> 
> I currently have some issues with setting up a webrtcbin on my server for 
> incoming clients. In particular, there seems to be a race condition regarding 
> the sink pad caps negotiation.
> 
> I've already read through 
> https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1055 and 
> https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1644, and 
> tried several of the workarounds/mitigations mentioned there, but to no avail.
> 
> I still get "<webrtcbin> no negotiation possible until caps have been received 
> on all sink pads" quite a lot - and it's not predictable which sink pads 
> actually will have caps and which won't, this seems entirely random (I have two 
> video sink pads and one audio sink pad).
> 
> The flow is roughly as follows:
> 
> 1. new client connects
> 2. create webrtcbin and encoders using parse_bin_from_description (*)
> 3. add ghostpads to bin
> 4. add the bin to pipeline
> 5. connect all the webrtcbin signals
> 6. link the running video and audio sources to the ghostpads
> 7. set the bin to PLAYING
> 
> (*) I'm aware this isn't ideal, but I'm just connecting to my own clients for 
> now, so I know exactly what the SDP will look like.
> 
> However, in general, this looks to me like it should work - any ideas where I'm 
> going wrong?
> 
> Thanks and best, Florian

-- 
SENT FROM MY DEC VT50 TERMINAL

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230111/0977a7b0/attachment.sig>


More information about the gstreamer-devel mailing list