[gst-devel] how to define NEW_SEGMENT values after GST_MESSAGE_SEGMENT_DONE

Stefan Kost ensonic at hora-obscura.de
Mon Dec 28 10:02:12 CET 2009


Am 22.12.2009 08:48, schrieb Jyoti:
> Hi All,
> 
> For my player application am required to frequently update the playback
> segment values. Currently am seeking the first segment as below:
> 
> gst_element_seek
> (
>                              pipeline,
>                              1.0,
>                              GST_FORMAT_TIME,
>                              GST_SEEK_FLAG_SEGMENT, SEEK_TYPE_SET,
>                              (0 * GST_SECOND),
>                             GST_SEEK_TYPE_NONE,
>                             -1
> );

This is simply requesting to play from the start to EOS.

> 
> After sometime I get GST_MESSAGE_SEGMENT_DONE. Now I want to update the
> my NEW_SEGMENT from the last
> played value to the total duration.

When you receive SEGMENT_DONE, you can seek again to replay from somewhere or
loop. If it does not work, you will need to debug. E.g. when gst_element_seek()
fails dump a pipeline as a dot-graph and check that all pads are active and not
flushing. Maybe some element you use has bugs with seek handling.

Stefan

> 
> Can someone tell me how can I define the NEW_SEGMENT values.
> And what changes to be done with pipeline state, before or after doing
> the seek for
> NEW_SEGMENT?
> 
> Thanks,
> Jyoti
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list