[gst-devel] Playbin2 with file whose length changes
Jeffrey Barish
jeff_barish at earthlink.net
Tue Jan 19 21:22:05 CET 2010
Philippe Normand wrote:
> On Tue, 2010-01-19 at 17:37 +0200, Stefan Kost wrote:
>> Jeffrey Barish wrote:
>> > Does anyone know what happens with playbin2 when the length of the file
>> > increases after initiating play? Does playbin2 read the duration of
>> > the file either when it updates the uri property or when it goes into
>> > play mode?
>> >
>> playbin2 itself does not care about the length. The length can also
>> change in the case of vbr when betetr stimates are available.
>>
>> Stefan
>
> You can listen for GST_MESSAGE_DURATION messages on the bus to get
> notified of duration changes.
>
> My 2 cents :)
> Philippe
The GST_MESSAGE_DURATION message is interesting, although in my quick test I
don't seem to be getting it. In any case, I don't really need to know that
the length changed, I just need for playbin2 to play the entire file. Is
that what is meant by "does not care about the length"?
Here's what I observe, by way of example: Suppose that I start playing when
the sound file has a length of 1 sec. A short time after starting play (and
well before play reaches the end of the sound file), the length of the sound
file grows to 10 seconds. No matter. Play stops at 1 second and there is
an EOS message on the bus.
There is nothing in my code that reads the length of the file, so I think
the problem has to be with GStreamer or with the way I am using it.
--
Jeffrey Barish
More information about the gstreamer-devel
mailing list