mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
rtspsrc: Intercept and handle events when using no manager too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3409>
This commit is contained in:
parent
e6a2e41c06
commit
4099fd064b
1 changed files with 13 additions and 0 deletions
|
@ -4931,6 +4931,8 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
|
|||
add_backchannel_fakesink (src, stream, outpad);
|
||||
gst_object_unref (outpad);
|
||||
} else if (outpad) {
|
||||
GstPad *internal_src;
|
||||
|
||||
GST_DEBUG_OBJECT (src, "creating ghostpad for stream %p", stream);
|
||||
|
||||
gst_pad_use_fixed_caps (outpad);
|
||||
|
@ -4945,6 +4947,17 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
|
|||
gst_object_unref (template);
|
||||
g_free (name);
|
||||
|
||||
/* We intercept and modify the stream start event */
|
||||
internal_src =
|
||||
GST_PAD (gst_proxy_pad_get_internal (GST_PROXY_PAD (stream->srcpad)));
|
||||
gst_pad_set_element_private (internal_src, stream);
|
||||
gst_pad_set_event_function (internal_src,
|
||||
gst_rtspsrc_handle_src_sink_event);
|
||||
gst_object_unref (internal_src);
|
||||
|
||||
gst_pad_set_event_function (stream->srcpad, gst_rtspsrc_handle_src_event);
|
||||
gst_pad_set_query_function (stream->srcpad, gst_rtspsrc_handle_src_query);
|
||||
|
||||
gst_object_unref (outpad);
|
||||
}
|
||||
/* mark pad as ok */
|
||||
|
|
Loading…
Reference in a new issue