[gst-devel] GstElement statistic retrieval

Wim Taymans wim.taymans at gmail.com
Tue Dec 29 12:41:29 CET 2009


On Tue, 2009-12-29 at 14:00 +0300, Ivan Murashko wrote:
> Hi,
> 
> I have an GstElement instance and want to know how many time the
> element was in PLAYING state. 

If you mean 'for how long the pipeline has been in the playing state'
then you can use gst_element_get_start_time() on the pipeline, which
gives you the running_time of when the pipeline was last paused. If you
set a pipeline to NULL and then get the start_time, you will get the
total amount of time spent in the playing state.

Note however that this time resets to 0 after a flushing seek.

Wim

> As I understood gst_element_get_base_time() can help in the case the
> element is in the RUNNING state but is it possible to retrieve such
> info after the main pipeline was stopped (set in NULL state)?
> 
> -- 
> Best regards,
> Ivan
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel






More information about the gstreamer-devel mailing list