What is a way of detecting any buffer going through pipeline?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

What is a way of detecting any buffer going through pipeline?

killerrats
I am connecting to a live source rtsp. If the rtsp server is disconnected how can you detect no more buffer and end the pipeline? I am currently using a g_timeout_add_seconds every second.
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: What is a way of detecting any buffer going through pipeline?

Baby Octopus
See GstPadProbe. You can add different types of probes to probe activity on the pad such as buffers, events, etc

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html
Reply | Threaded
Open this post in threaded view
|

Re: What is a way of detecting any buffer going through pipeline?

Mandar Joshi
In reply to this post by killerrats
> I am connecting to a live source rtsp. If the rtsp server is disconnected how
> can you detect no more buffer and end the pipeline? I am currently using a
> g_timeout_add_seconds every second.

Can you check if adding gst_bus_add_watch (GstBus *bus, GstMessage
*msg, gpointer data) and looking for GST_MESSAGE_EOS in
GST_MESSAGE_TYPE (msg) works for you.

Regards
Mandar Joshi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: What is a way of detecting any buffer going through pipeline?

Sebastian Dröge-3
In reply to this post by killerrats
On Thu, 2016-11-17 at 14:47 -0800, killerrats wrote:
> I am connecting to a live source rtsp. If the rtsp server is
> disconnected how can you detect no more buffer and end the pipeline?
> I am currently using a g_timeout_add_seconds every second.

Additional to what others said, there's also the watchdog element which
will post a custom message on the bus whenever there was no data after
a configurable amount of time.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment