webrtcbin: Limit sink query to sink pads

This allows the reception of streams that don't exactly match
the codec preferences. In particular, the ssrc in the codec preferences
is local sender SSRC, the other side is expected to send a different SSRC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2615>
This commit is contained in:
Olivier Crête 2022-06-15 15:06:20 -04:00 committed by GStreamer Marge Bot
parent b90d02741e
commit c4971a456e

View file

@ -459,8 +459,10 @@ gst_webrtc_bin_pad_new (const gchar * name, GstPadDirection direction)
direction, "template", template, NULL);
gst_object_unref (template);
gst_pad_set_event_function (GST_PAD (pad), gst_webrtcbin_sink_event);
gst_pad_set_query_function (GST_PAD (pad), gst_webrtcbin_sink_query);
if (direction == GST_PAD_SINK) {
gst_pad_set_event_function (GST_PAD (pad), gst_webrtcbin_sink_event);
gst_pad_set_query_function (GST_PAD (pad), gst_webrtcbin_sink_query);
}
GST_DEBUG_OBJECT (pad, "new visible pad with direction %s",
direction == GST_PAD_SRC ? "src" : "sink");