RTP Source + multiple webrtcbin's - no on-negotiation-needed?

Dominik Röttsches d-r at roettsches.de
Sat Dec 8 13:08:24 UTC 2018


Hi Matthew and others,

I would like to implement a webrtc video server, where a permanent RTP packet source produces the video packets ready for delivery. Then multiple webrtcbin’s get added to the pipeline which handle the individual connections to peers and send them the video feed from the RTP packet source.

So I prepare a pipeline similar to this:

videotestsrc ! video/x-raw,width=640,height=480,framerate=15/1 ! clockoverlay halignment=right valignment=bottom shaded-background=true font-desc="monospace, 24" ! queue max-size-bytes=2500000 ! videoconvert ! vtenc_h264 ! video/x-h264,profile=baseline !  h264parse ! rtph264pay ! queue max-size-bytes=2500000 ! application/x-rtp,media=video,encoding-name=H264,payload=97 ! tee name=rtp_src ! queue ! fakesink

And set it to playing. It starts producing RTP packets.

For each new WebRTC connection, I now would like to add webrtcbins that connect to the rtp_src tee, hooked up with a queue, such as
“queue ! webrtcbin” (connected to tee name=rtp_src)”
So I make the element, link the queue to tee, and the webrtcbin to the queue.

The problem is, if the pipeline is already playing, I do not receive an “on-negotiation-needed” signal for the new webrtcbin. 

Do I need this signal? Or can I just emit a “create-offer” signal on the new one? 

I observed that if I set the pipeline state to NULL, then PLAYING, the newly added element sends the “on-negotiation-needed”. But doing it this way is not practical for multiple elements, as the original connections break when stopping the pipeline.

Any suggestions? Can I somehow tell the new element to trigger the on-negotiation-needed signal?

Thank you!

Dominik



More information about the gstreamer-devel mailing list