RTSP - rtspsrc how to catch stream timeout

Paddy pat.blanchon at gmail.com
Tue Jan 29 01:17:09 PST 2013


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.


More information about the gstreamer-devel mailing list