Duration recalculation

arnaud tonda arnaud.tonda at gmail.com
Thu Aug 11 06:52:16 PDT 2011

Hi everybody,

i'm facing a little annoying problem.

to give you the context, i get some satellite DVB streams from a DVB card.
this stream is saved on a .ts file.

i must record the stream to be able to control this "pseudo-llive" stream.

the idea is to play this file with gstreamer.

the problem i have is that the duration of the stream is never updated.
So when i get the duration with a gst_element_query_duration(), the returned
duration is the one calculated at gstreamer start time. but in my case it's
not right the file is filled permanently and the duration evolves.

as mentioned here


Is posted by an element that detected a change in the stream duration. *The
default bin behaviour is to clear any cached duration values so that the
next duration query will perform a full duration recalculation.* The
duration change is posted to the application so that it can refetch the new
duration with a duration query. Note that these messages can be posted
before the bin is prerolled, in which case the duration query might fail.

but i never receive this message.

is there any way to force the pipeline (or playbin, or some other element)
to update this duration?
or a method to manually clear the cached duration?

i hope i was clear

Best regards

Arnaud Tonda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110811/cf9ed55c/attachment.htm>

More information about the gstreamer-devel mailing list