[gst-devel] seeking for testaudiosrc, volume etc

Stefan Kost ensonic at hora-obscura.de
Sun Oct 23 10:44:04 CEST 2005


hi wtay,

I noticed that you did lots of seeking related changes. I'd like to add
seeking to some audio-elements I use like: testaudiosrc, sinesrc,
volume. I know that it may source absurd to add seeking to generator
elements and effects. All these elements have controllable parameters
and the controller works on timestamps. Thus the data-processing is
time-dependent. Seeking for those elements basically mean to adjust that
local timestamp, so that they request the corrent controller data the
next time thay sync their parameters.

I was looking at the wavparse element to find out what one needs to do
to support seeking. Is that the most complete one? Is there one that is
simpler?

Is that the right way to do it?

* add srcpad_event function to element and handle GST_EVENT_SEEK
* parse seek event and eventualy convert position into the wanted format
(TIME, BYTES, ...)
** woudn't that be a canditate for utils
* perform the seeking
** send flush event or pause task
** take stream_lock
** update element timestamps
** stop flush
** ev. send new_segemnt
** start task
** release stream_lock

I wonder a bit about the asymetrie
* at start the is flush *or* pausing the task, but at end the task is
always started
* the stream_lock is taken after flush/pausing, but not release before
unflush/starting

Ciao
  Stefan




More information about the gstreamer-devel mailing list