[gst-devel] Elapsed time of a pipeline

Ronald Bultje rbultje at ronald.bitfreak.net
Wed Jul 16 13:11:13 CEST 2003


Hi Mattias,

On Wed, 2003-07-16 at 19:33, Mattias Wadman wrote:
> I would like to know how to get the elapsed time of a pipline

gint64 time;
gst_element_query (element, GST_QUERY_POSITION,
		   GST_FORMAT_TIME, &time);
g_print ("Elapsed time: %f seconds\n",
	 1.0 * time / GST_SECOND);

And the length of a track can be retrieved using GST_QUERY_TOTAL. :).

HTH,
Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>





More information about the gstreamer-devel mailing list