[gst-devel] Signals and parsing of files...

Thomas Nyberg thomas at codefactory.se
Wed Mar 7 14:51:01 CET 2001

Image the case where you want to play only a portion of a file. You 
want to start right in the middle. How can this be done?

Does there already exists an easy way of starting playing at
arbitrary positions? Or is it a feature yet-to-come?

Most formats have a header containing information about the 
data in the file. The depth, rate, sample-size and so on.
But, this header would be lost if you simple seeked to the middle
and did nothing more.

Somehow, you need to feed the parsers enough data for it to be able 
to determine this information about the audio. Then do the seek-

One way, would to define a signal that gets emitted when a
parser/decoder/encoder has enough information for it to be able
to decode/encode the stream. However, there still exists an issue
with the amount of information sent to the parser. Too much or too 
little would not be good.

To start playing in the middle, one could connect to the signal
described above, and then do a flush/seek-sequence to the 
position in question. But that looks a little bit ugly from
my point of perspective. There should be a much nicer way
of doing this. I am sure someone here have thought about it,
or is thinking about it.

/Thomas <thomas at codefactory.se>

Thomas Nyberg                    thomas.nyberg at codefactory.se
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 10       Cell: +46 (0)70 335 61 64

More information about the gstreamer-devel mailing list