[gst-devel] seeking for testaudiosrc, volume etc

Wim Taymans wim at fluendo.com
Tue Oct 25 06:00:38 CEST 2005


On Tue, 2005-10-25 at 13:45 +0200, Stefan Kost wrote:
> Hi Wim,
> 
> thanks alot for your other expalantions.
> 
> Wim Taymans wrote:
> > On Sun, 2005-10-23 at 19:41 +0200, Stefan Kost wrote:
> > 
> >>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?
> > 
> > Wavparse is the most complete one. Basesrc also implements all seeking
> > now.
> 
> BaseSrc does seeking to byte positions. Whats the 'correct' way for subclasses 
> to react on position changes.

I think the easiest for now is to implement your own event handler on
the source pad and not use the basesrc seek implementation at all. Have
to think a little more about how to make the seek work on non-byte
formats. I think making the subclasses override an event handler,
convert the seek format to bytes and then call the parent seek handler
sounds the most convenient. This goes together with sending out the
newsegment in the right format.

Wim

> 
> * they react not at all, they just access basesrc->offset, which will always be 
> in bytes and the convert it to the format they need
> 
> * the beasrc class forwards the events, so that subclasses adjust their own 
> offset counter
> 
> Stefan
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-- 
Wim Taymans <wim at fluendo.com>





More information about the gstreamer-devel mailing list