Question about playback loops inside a decoder

Tim-Philipp Müller t.i.m at zen.co.uk
Fri May 31 15:33:39 PDT 2013


On Fri, 2013-05-31 at 19:26 +0200, Carlos Rafael Giani wrote:

> I am finishing some elements that decode old video game music files. One 
> common property of these files is that they often loop.
> Traditionally, the looping is handled by the decoder directly. However, 
> this seems to be in conflict with the way it is done in GStreamer,
> since this would mean that a decoder element emits seek events along 
> with the newsegment ones.
> 
> Now I wonder how to do this properly. When the loop happens, it is 
> equivalent to seeking backwards (to the point where the loop begins).
> Should the element then send a seek event downstream, and a newsegment 
> one afterwards?

Why would it send a seek downstream? Seek events only go upstream. I
don't think there should be any seek events here.

The decoder could just continue to send the same data again but with
appropriately offset timestamps, as if it was a continuous stream. Or it
could send a new segment event but move the base offset along like a
demuxer/parser would when it loops (and then start from 0 again).

 Cheers
  -Tim



More information about the gstreamer-devel mailing list