Playback from within a file
Tim Müller
tim at centricular.com
Wed Sep 9 18:09:10 UTC 2020
On Wed, 2020-09-09 at 11:58 -0500, IgalKroyter wrote:
Hi,
> is there a way to start playback a pipeline from the middle of a
> file?
> gst_element_seek() requires a running pipeline, which displays the
> first few frames, a situation I try to avoid.
You can set the pipeline to PAUSED state, then it will only show the
first frame.
Wait for the ASYNC_DONE message on the bus, then do a flushing seek to
your new position.
Most video sinks have a "show-preroll-frame" property which you can set
to FALSE, then it will not render the initial frame in PAUSED state
either, but only render frames when you go into PLAYING state.
If you have some other type of sink in the pipeline, we'd need to know
more details to see how to best handle that.
Cheers
Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list