summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-09-23 19:30:32 +0300
committerTim-Philipp Müller <tim@centricular.com>2021-10-31 12:16:55 +0000
commit7391ff719c7e7ce3d70c265feb69c9bd5d808f57 (patch)
tree5bf94c5f75a5382bdb115764a88ddeb7f2db4976
parent5c000cb023618bc566748c024a2742bea9df6bc5 (diff)
downloadgstreamer-plugins-bad-7391ff719c7e7ce3d70c265feb69c9bd5d808f57.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2556>
-rw-r--r--ext/webrtc/gstwebrtcbin.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c
index f1c8b7914..34d0b10ea 100644
--- a/ext/webrtc/gstwebrtcbin.c
+++ b/ext/webrtc/gstwebrtcbin.c
@@ -6568,6 +6568,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));