RTSP - rtspsrc how to catch stream timeout

Federico Zamperini fzamperini at tiscali.it
Tue Jan 29 01:29:19 PST 2013


Another nice way to do this is to add an identity element after the 
source and then connect to the handoff signal; I tried it after reading 
a recent message on this list.
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-identity.html
Cheers

Federico

Il 29/01/2013 10:17, Paddy ha scritto:
> The way that I did this was install a buffer probe in the rtspsrc pad added
> callback on the src pad:
>
> h_probe = gst_pad_add_buffer_probe(src_pad,
> G_CALLBACK(buffer_handler_callback), data);
>
> & in this callback handler just cancelled & rearmed a timer
>
> if (timer_id)
> {
>      (void)g_source_remove(timer_id);
>      timer_id = 0;
> }
> timer_id = g_timeout_add_seconds(T, rtp_loss_callback, data);
>
> The rtp_loss_callback() callback function gets invoked when no buffers have
> been seen for 'T' secs - do what you want to in there.
>
> It works for me.
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/RTSP-rtspsrc-how-to-catch-stream-timeout-tp4658172p4658195.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list