best way to start playback at 01:22, playback rate 1.3x?

Tim Müller tim at centricular.com
Tue Nov 12 05:41:50 PST 2013


On Tue, 2013-11-12 at 15:00 +0200, Dan wrote:

Hi Dan,

> > Out of curiosity, what bugs have you seen with seeking in PAUSED? It's a
> > really common pattern, so I would expect this to work fine.
> 
> An (admittedly superficial) googling of "gst seek while paused" turned
> up a "Seek failing on paused pipeline" result and one "[Bug 702697]
> New: adder: Seek while paused causes deadlock".

Right, I was thinking in terms of playbin/playback pipelines.


> > The usual way of doing this (for non-live playback) is
> 
> Re: "non-live playback": out of curiosity, I see that playbin2 has
> "uri" and "current-video" writable properties -- can I change the
> video on-the-fly *and* start the playback from an arbitrary position?

With "non-live" I meant that the source is not a "live" source (which
you would have to set to PLAYING state to produce data).

The "current-video" property is to select between different video
streams if there are multiple ones. (Not sure anyone has ever tested
this, it's quite rare.)

The "uri" property can only be set when playbin2 is in NULL or READY
state (or you're trying to do gapless playback and you're in the
about-to-finish callback).


> Great -- that worked, thanks! And ASYNC_DONE seems to be a good time
> to grab the video duration as well.

Yes.

> Would it have also worked to track STATE_CHANGED messages and seek
> upon first seeing current_state == PAUSED?

Yes *if* you also check message->src == pipeline (since you'll get state
changed messages for all the elements inside the pipeline as well)

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com






More information about the gstreamer-devel mailing list