webrtc: Use the dtlssrtenc rtp-sync property

Instead of synchronising at the ICE transport, do clock sync for the
RTP stream at the DTLS transport via the dtlssrtpenc rtp-sync
property. This avoids delaying RTCP while waiting until it is time
to output an RTP packet when rtcp-mux is enabled.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1212
This commit is contained in:
Jan Schmidt 2020-02-14 01:42:34 +11:00 committed by GStreamer Merge Bot
parent 0c72a41767
commit 8e3472faee
2 changed files with 2 additions and 4 deletions

View file

@ -221,9 +221,7 @@ gst_webrtc_nice_transport_constructed (GObject * object)
if (ice->sink) {
g_object_set (ice->sink, "agent", agent, "stream", our_stream_id,
"component", component, "async", FALSE, "enable-last-sample", FALSE,
NULL);
if (ice->component == GST_WEBRTC_ICE_COMPONENT_RTCP)
g_object_set (ice->sink, "sync", FALSE, NULL);
"sync", FALSE, NULL);
}
g_object_unref (agent);

View file

@ -189,7 +189,7 @@ gst_webrtc_dtls_transport_constructed (GObject * object)
webrtc->dtlssrtpenc = gst_element_factory_make ("dtlssrtpenc", NULL);
g_object_set (webrtc->dtlssrtpenc, "connection-id", connection_id,
"is-client", webrtc->client, NULL);
"is-client", webrtc->client, "rtp-sync", TRUE, NULL);
webrtc->dtlssrtpdec = gst_element_factory_make ("dtlssrtpdec", NULL);
g_object_set (webrtc->dtlssrtpdec, "connection-id", connection_id, NULL);