Tracking time for which a pipeline has been in Playing state.
Yogesh Marwaha
yogeshm.007 at gmail.com
Sun Feb 20 06:46:58 PST 2011
Hi,
I'm coding a transcoding application (not using encodebin).
Upto now I had been using following code to get time for which the pipeline
has been in Playing state (To show user information like xx minutes/seconds
the operation has run for or to calcutate averate speed and estimate remaining
time etc.): -
GstClockTime elapsedTime = GST_CLOCK_TIME_NONE;
GstClock *clock = gst_element_get_clock(m_pPipeline);
if(clock)
elapsedTime = (gst_clock_get_time(clock) -
gst_element_get_base_time(m_pPipeline)) / GST_SECOND;
Pipeline is like this: -
gst_bin_add_many(GST_BIN(m_pPipeline), source, queue, audioConvert,
audioEncoder, container, sink, NULL);
But then I added code to allow pausing the operation like this: -
gst_element_set_state(m_pPipeline, GST_STATE_PAUSED);
Now pipeline is paused but the clock is not. It is running always.
What should I do achieve my target?
Regards,
Yogesh Marwaha
http://sparklemedia.sourceforge.net/
_______________________________________________
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