webrtcbin plumbing/caps negotiation race condition

Florian Echtler floe at butterbrot.org
Wed Jan 11 13:00:25 UTC 2023


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/b5cba56f/attachment.sig>


More information about the gstreamer-devel mailing list