mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
webrtcbin: Remove queue after rtpfunnel
The original BUNDLE support commit placed a queue after the rtpfunnel that combines streams, but I don't see a good reason for it. It has default settings, so if network output is slow might accidentally store up to 1 second of pending data, increasing latency. Remove it in favour of doing any necessary buffering before webrtcbin. If it turns out that there is a reason for it to exist, the limits should probably be configurable and small. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3437>
This commit is contained in:
parent
8177588250
commit
dfb5e3365e
1 changed files with 5 additions and 11 deletions
|
@ -5782,10 +5782,9 @@ static void
|
||||||
_connect_rtpfunnel (GstWebRTCBin * webrtc, guint session_id)
|
_connect_rtpfunnel (GstWebRTCBin * webrtc, guint session_id)
|
||||||
{
|
{
|
||||||
gchar *pad_name;
|
gchar *pad_name;
|
||||||
GstPad *queue_srcpad;
|
GstPad *srcpad;
|
||||||
GstPad *rtp_sink;
|
GstPad *rtp_sink;
|
||||||
TransportStream *stream = _find_transport_for_session (webrtc, session_id);
|
TransportStream *stream = _find_transport_for_session (webrtc, session_id);
|
||||||
GstElement *queue;
|
|
||||||
|
|
||||||
g_assert (stream);
|
g_assert (stream);
|
||||||
|
|
||||||
|
@ -5796,19 +5795,14 @@ _connect_rtpfunnel (GstWebRTCBin * webrtc, guint session_id)
|
||||||
gst_bin_add (GST_BIN (webrtc), webrtc->rtpfunnel);
|
gst_bin_add (GST_BIN (webrtc), webrtc->rtpfunnel);
|
||||||
gst_element_sync_state_with_parent (webrtc->rtpfunnel);
|
gst_element_sync_state_with_parent (webrtc->rtpfunnel);
|
||||||
|
|
||||||
queue = gst_element_factory_make ("queue", NULL);
|
srcpad = gst_element_get_static_pad (webrtc->rtpfunnel, "src");
|
||||||
gst_bin_add (GST_BIN (webrtc), queue);
|
|
||||||
gst_element_sync_state_with_parent (queue);
|
|
||||||
|
|
||||||
gst_element_link (webrtc->rtpfunnel, queue);
|
|
||||||
|
|
||||||
queue_srcpad = gst_element_get_static_pad (queue, "src");
|
|
||||||
|
|
||||||
pad_name = g_strdup_printf ("send_rtp_sink_%d", session_id);
|
pad_name = g_strdup_printf ("send_rtp_sink_%d", session_id);
|
||||||
rtp_sink = gst_element_request_pad_simple (webrtc->rtpbin, pad_name);
|
rtp_sink = gst_element_request_pad_simple (webrtc->rtpbin, pad_name);
|
||||||
g_free (pad_name);
|
g_free (pad_name);
|
||||||
gst_pad_link (queue_srcpad, rtp_sink);
|
|
||||||
gst_object_unref (queue_srcpad);
|
gst_pad_link (srcpad, rtp_sink);
|
||||||
|
gst_object_unref (srcpad);
|
||||||
gst_object_unref (rtp_sink);
|
gst_object_unref (rtp_sink);
|
||||||
|
|
||||||
pad_name = g_strdup_printf ("send_rtp_src_%d", session_id);
|
pad_name = g_strdup_printf ("send_rtp_src_%d", session_id);
|
||||||
|
|
Loading…
Reference in a new issue