From 2a49d34c3e79dc392be453985bfb26342e1bbf9b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 23 Dec 2010 16:25:15 +0100 Subject: [PATCH] rtspsrc: on-npt-stop is a manager signal --- gst/rtsp/gstrtspsrc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 5b2e84d70..b8e6cc6e6 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2284,13 +2284,17 @@ on_timeout (GObject * session, GObject * source, GstRTSPStream * stream) } static void -on_npt_stop (GObject * session, GObject * source, GstRTSPStream * stream) +on_npt_stop (GstElement * rtpbin, guint session, guint ssrc, GstRTSPSrc * src) { - GstRTSPSrc *src = stream->parent; + GstRTSPStream *stream; - GST_DEBUG_OBJECT (src, "source in session %u reached NPT stop", stream->id); + GST_DEBUG_OBJECT (src, "source in session %u reached NPT stop", session); - gst_rtspsrc_do_stream_eos (src, stream); + /* get stream for session */ + stream = find_stream (src, &session, (gpointer) find_stream_by_id); + if (stream) { + gst_rtspsrc_do_stream_eos (src, stream); + } } static void @@ -2391,6 +2395,9 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream, src->manager_ptmap_id = g_signal_connect (src->manager, "request-pt-map", (GCallback) request_pt_map, src); + + g_signal_connect (src->manager, "on-npt-stop", (GCallback) on_npt_stop, + src); } /* we stream directly to the manager, get some pads. Each RTSP stream goes @@ -2436,8 +2443,6 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream, stream); g_signal_connect (rtpsession, "on-timeout", (GCallback) on_timeout, stream); - g_signal_connect (rtpsession, "on-npt-stop", (GCallback) on_npt_stop, - stream); g_signal_connect (rtpsession, "on-ssrc-active", (GCallback) on_ssrc_active, stream); } -- 2.34.1