From 6a07ced605dfc8f061e801f40314a633e54dea0f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 29 Feb 2024 12:06:25 +1100 Subject: [PATCH] rtspsrc: Handle queries and events with no manager When doing direct output with no session manager, we still want to respond to queries and events from downstream, so install the handlers Part-of: --- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 8423d48540..26d9c67b76 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -4362,7 +4362,13 @@ gst_rtspsrc_stream_configure_tcp (GstRTSPSrc * src, GstRTSPStream * stream, /* create a new pad we will use to stream to */ name = g_strdup_printf ("stream_%u", stream->id); template = gst_static_pad_template_get (&rtptemplate); - stream->channelpad[0] = gst_pad_new_from_template (template, name); + pad0 = gst_pad_new_from_template (template, name); + stream->channelpad[0] = pad0; + + gst_pad_set_event_function (pad0, gst_rtspsrc_handle_internal_src_event); + gst_pad_set_query_function (pad0, gst_rtspsrc_handle_internal_src_query); + gst_pad_set_element_private (pad0, src); + gst_object_unref (template); g_free (name);