|
I am trying to build a MCU that mixes streams from multiple webrtcbin elements and sends that single mixed stream over RTP (not webRTC). A user joins the room, a webrtc bin elements gets added to the pipeline, that webrtcbin audio is decoded and sent to the mixer that outputs one stream that is encoded and sent over RTP via udp.
The problem I am facing is with the timing. For example, the server starts up and the pipeline plays, 45 seconds later a user joins the room, a webrtcbin is dynamically added to the pipeline and audio starts flowing. The issue is the mixed audio going out RTP via UDP is delayed by 45 seconds (since the user joined the room 45 seconds after the pipeline started). I am very new to GStreamer so I am not too sure how to fix this or really what is occurring. I assume it has something to do with the clock. Most of what I have found regarding this suggests setting sync=false on all sinks which is what I have done. The audio is definitely being sent as soon as it arrives, but I believe the timestamps are what are doing me in.
These are live streams so sync does not matter and I have set sync=False on the udpsink. Using wireshark I can see the packets are arriving on time and in order, but the clockdrift is equal to the time that passed from when the pipeline started and when the webrtcbin got added and started sending to the udp sink.
|