How to trigger action on certain position in a stream?

Nicolas Dufresne nicolas.dufresne at collabora.com
Sun Jul 28 00:27:47 PDT 2013


Le samedi 27 juillet 2013 à 21:47 +0200, marcin at saepia.net a écrit 
> 
> Is there any other way than just setting timeout that queries current
> stream position every let's say 10 ms? Kind of event that I can listen
> to?

There is multiple options here. One of the option is to use segment
seeks. Note you need to preroll your pipeline (setting pipeline to pause
and wait for first async done message). With segment seek, you will be
able to seek you pipeline with a stop time that match the point you of
playback you want to be notified. You can update that point by seeking
again, without changing the start time. When this point is reached,
you'll receive a SEGMENT_DONE message. At this point, you will need to
issue a non-flushing seek, to update the new stop position.

Nicolas 



More information about the gstreamer-devel mailing list