another simple question about duration
Andres Gonzalez
andres.agoralabs at gmail.com
Fri Jul 7 22:31:57 UTC 2017
Hi,
I have a simple pipeline: filesrc -> decodebin ..... -> appsrc
which works just fine but I am having problems getting an accurate duration
query. I am using:
gst_element_query_duration(GST_ELEMENT(pGstPipeline), GST_FORMAT_TIME,
&lDuration));
which always gives me a duration of 99:99:99.999999999.
The files I am using are the big buck bunny files which appear to be
correctly formatted containers. When I use gst-discoverer-1.0 on these files
its reports the correct duration of 0:09:56.461666666. So it appears that
container files have the duration. I have tried to call the query on various
elements in the pipeline but still I get the incorrect duration. In a
similar way, I am querying the position during playback using:
gst_element_query_position(GST_ELEMENT(pGstPipeline), GST_FORMAT_TIME,
&lPosition));
and it works correctly.
So what is the secret to getting the duration of a media file?
-Andres
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/another-simple-question-about-duration-tp4683735.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list