[gst-devel] Segment Seeking

Wim Taymans wim.taymans at gmail.com
Wed Sep 5 00:35:17 CEST 2007


On Tue, 2007-09-04 at 23:55 +0200, Andy Wingo wrote:
> On Sat 01 Sep 2007 17:03, Andoni Morales Alastruey <ylatuya at gmail.com> writes:
> 
> > What I don't realy know is if it's possible to perform a start-stop
> > seek without using the GST_SEEK_FLAG_SEGMENT flag.
> 
> We call it a segment seek, and you have to set the flag.

In fact, you can also seek with start-stop without setting the SEGMENT
flag. The SEGMENT flag only controls what will happen after the stop
position is reached, without the flag, EOS will be pushed and no
SEGMENT_DONE is posted, with the flag a SEGMENT_DONE message is posted
and no EOS is pushed.

The SEGMENT flag is useful if you want to perform other (non-flushing)
seeks when you receive the SEGMENT_DONE message such as looping back to
the beginning or seeking to some other part in the media. 

Wim

> 
> > To implementing the option for viewing various segments at once I
> > think the best option is to perform a segment seeking and wait to
> > SEGMENT_DONE signal to advance through the segments array.
> 
> Yep.
> 
> > And finally, to perform the frame stepping, I think the best option is
> > to perform a seek 1/fps seconds after the current positon (where fps
> > is the actual Frame Per Secondsrate of the video):
> 
> In theory you should be able to seek in integer DEFAULT_UNIT steps,
> which would map to frames, but in practice your suggestion is the best.
> Alternately you can set the rate to positive or negative, and block the
> pipeline in the sink, unblocking when the user steps.
> 
> > But I don't know what kind of GstSeekType I have to choose to do that...
> 
> > I think GST_SEEK_TYPE_CUR is the good one
> 
> Yep.
> 
> Good luck, and let us know how it goes.
> 
> Cheers,
> 
> Andy





More information about the gstreamer-devel mailing list