Looping audio file section using segments

Tim Müller tim at centricular.com
Mon Nov 16 14:28:14 UTC 2020


Hi Gabriele,

It will depend a bit on the file type and the demuxer/parser elements
involved whether segment seeks work well or not. But they should work
fine with common elements.

One thing you might want to remove is the queue element between filesrc
and decodebin (or just use uridecodebin/uridecodebin3 directly and set
a file:// uri like you did with playbin). The queue element after
filesrc will force the demuxer/parser into a suboptimal code path for
seeking.

Also, the initial set_state() should probably be to PAUSED state, so
you can then do a flushing segment seek to the start position without
outputting anything yet.

Cheers
 Tim




More information about the gstreamer-devel mailing list