gst-player: How to seek

Jonathan Miles jonathan.miles at cambridgeaudio.com
Wed Sep 14 13:24:29 UTC 2016


Hello,


What's the correct way to perform a seek when using gst-player?


At the moment, after pausing playback when the UI start the seek, I'm calling gst_player_play() immediately after gst_player_seek() and appear to end up in an odd state where the player playing, but the player state is buffering:


[2016-09-14 14:16:53.815318]   GPLAY:  <>-[GStreamerPlayer vSeek:] self = 0x361a40 t=57
0:01:01.169877924  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:3341:gst_player_seek_internal_locked:<player0> Seek with rate 1.00 to 0:00:57.000000000
[2016-09-14 14:16:53.826589]   GPLAY:  <>-[GStreamerPlayer vResumePlayback] self = 0x361a40
0:01:01.203182382  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:2931:gst_player_play_internal:<player0> Play
0:01:01.207496882  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PAUSED new: PAUSED pending: PAUSED
0:01:01.213627049  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:911:change_state:<player0> Changing app state from paused to buffering
[2016-09-14 14:16:53.866358] GPLAYCB:    <>vStateChanged buffering
0:01:01.276247840  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PAUSED new: PAUSED pending: PLAYING
0:01:01.408422257  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PAUSED new: PLAYING pending: VOID_PENDING

Then, when you pause, the seek completes:

[2016-09-14 14:18:34.319064]   GPLAY:  <>-[GStreamerPlayer vPausePlayback] self = 0x361a40
0:02:41.673416977  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:3047:gst_player_pause_internal:<player0> Pause
0:02:41.715190061  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PLAYING new: PAUSED pending: VOID_PENDING
0:02:41.717461644  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:1670:state_changed_cb:<player0> Seek finished
[2016-09-14 14:18:34.371081] GPLAYCB:<>vSeekDone 157250000000
[2016-09-14 14:18:34.374338] GPLAYCB:<>vPositionUpdated 157250000000
0:02:41.727308352  1955   0x30c9b0 DEBUG             gst-player gstplayer.c:911:change_state:<player0> Changing app state from buffering to paused
[2016-09-14 14:18:34.379079] GPLAYCB:<>vStateChanged paused

Does this mean I should be waiting for the 'seek-done' signal before trying to restart playback?

Thanks,

Jonathan

Audio Partnership PLC, Gallery Court, Hankey Place, London SE1 4BB, UK 
Reg No. 2953313
This e-mail is confidential and for the addressee only. 
Please refer to Disclaimer  for important notices.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160914/6d25df80/attachment.html>


More information about the gstreamer-devel mailing list