rtspsrc: on-npt-stop is a manager signal

This commit is contained in:
Wim Taymans 2010-12-23 16:25:15 +01:00
parent 12bc7258b9
commit 2a49d34c3e

View file

@ -2284,13 +2284,17 @@ on_timeout (GObject * session, GObject * source, GstRTSPStream * stream)
} }
static void 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);
/* get stream for session */
stream = find_stream (src, &session, (gpointer) find_stream_by_id);
if (stream) {
gst_rtspsrc_do_stream_eos (src, stream); gst_rtspsrc_do_stream_eos (src, stream);
}
} }
static void static void
@ -2391,6 +2395,9 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
src->manager_ptmap_id = src->manager_ptmap_id =
g_signal_connect (src->manager, "request-pt-map", g_signal_connect (src->manager, "request-pt-map",
(GCallback) request_pt_map, src); (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 /* 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); stream);
g_signal_connect (rtpsession, "on-timeout", (GCallback) on_timeout, g_signal_connect (rtpsession, "on-timeout", (GCallback) on_timeout,
stream); stream);
g_signal_connect (rtpsession, "on-npt-stop", (GCallback) on_npt_stop,
stream);
g_signal_connect (rtpsession, "on-ssrc-active", g_signal_connect (rtpsession, "on-ssrc-active",
(GCallback) on_ssrc_active, stream); (GCallback) on_ssrc_active, stream);
} }