From: Sebastian Dröge Date: Thu, 23 Sep 2021 16:30:32 +0000 (+0300) Subject: webrtcbin: Always set SINK/SRC flags X-Git-Tag: 1.19.3~448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d9ca9c679f1c5b825176df727e6d24b59727b11;p=platform%2Fupstream%2Fgstreamer.git webrtcbin: Always set SINK/SRC flags webrtcbin can act as a sink/source depending on the SDP later. Without setting this here already, surrounding bins might not notice this and the pipeline configuration might become inconsistent, e.g. with regards to latency. See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/737 Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index fe48300..1bd9d46 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -7498,6 +7498,16 @@ _transport_free (GObject * object) static void gst_webrtc_bin_init (GstWebRTCBin * webrtc) { + /* Set SINK/SRC flags as webrtcbin can act as one depending on the + * SDP later. Without setting this here already, surrounding bins might not + * notice this and the pipeline configuration might become inconsistent, + * e.g. with regards to latency. + * See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/737 + */ + gst_bin_set_suppressed_flags (GST_BIN_CAST (webrtc), + GST_ELEMENT_FLAG_SINK | GST_ELEMENT_FLAG_SOURCE); + GST_OBJECT_FLAG_SET (webrtc, GST_ELEMENT_FLAG_SINK | GST_ELEMENT_FLAG_SOURCE); + webrtc->priv = gst_webrtc_bin_get_instance_private (webrtc); g_mutex_init (PC_GET_LOCK (webrtc)); g_cond_init (PC_GET_COND (webrtc));