gstreamer playbin2 gst_element_query_duration fail
Tim-Philipp Müller
t.i.m at zen.co.uk
Sun Jun 2 15:12:38 PDT 2013
On Thu, 2013-05-30 at 01:22 +0000, Lelong Tristan-B44337 wrote:
> I am trying to read the duration of a mp3 file in a custom basic player
> made using playbin2. I noticed that the duration is wrong
> (99:99:99.999999999) as long as I don't spend a few millisecond in the
> PLAYING state. Is that normal, and is there an easy way to modify this?
>
> I am using gstreamer 0.10.35 with gst-plugins-base 0.10.35
This version is almost 2 years old.
In general you should be able to query the duration once the pipeline
has prerolled. However, some parsers may not return a duration estimate
yet unless they've processed a minimum number of frames.
99:99:99.999999999 is how GST_CLOCK_TIME_NONE gets printed in the debug
log. I suspect the duration query returned FALSE.
So yes, may be kind of normal, to reduce the risk of giving completely
bogus duration estimates.
Cheers
-Tim
More information about the gstreamer-devel
mailing list