<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head><body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello,</p>
<p><br>
</p>
<p>What's the correct way to perform a seek when using gst-player?</p>
<p></p>
<p><br>
</p>
<p>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:</p>
<p><br>
</p>
<p></p>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:16:53.815318] GPLAY: <>-[GStreamerPlayer vSeek:] self = 0x361a40 t=57</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">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</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:16:53.826589] GPLAY: <>-[GStreamerPlayer vResumePlayback] self = 0x361a40</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:01:01.203182382 1955 0x30c9b0 DEBUG gst-player gstplayer.c:2931:gst_player_play_internal:<player0> Play</span><br>
</div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:01:01.207496882 1955 0x30c9b0 DEBUG gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PAUSED new: PAUSED pending: PAUSED</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:01:01.213627049 1955 0x30c9b0 DEBUG gst-player gstplayer.c:911:change_state:<player0> Changing app state from paused to buffering</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:16:53.866358] GPLAYCB: <>vStateChanged buffering</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:01:01.276247840 1955 0x30c9b0 DEBUG gst-player gstplayer.c:1606:state_changed_cb:<player0> Changed state old: PAUSED new: PAUSED pending: PLAYING</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">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</span><br>
</div>
<div><br>
</div>
<div>Then, when you pause, the seek completes:</div>
<div><br>
</div>
<div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:18:34.319064] GPLAY: <>-[GStreamerPlayer vPausePlayback] self = 0x361a40</span><br>
</div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:02:41.673416977 1955 0x30c9b0 DEBUG gst-player gstplayer.c:3047:gst_player_pause_internal:<player0> Pause</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">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</span><br>
</div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:02:41.717461644 1955 0x30c9b0 DEBUG gst-player gstplayer.c:1670:state_changed_cb:<player0> Seek finished</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:18:34.371081] GPLAYCB:<>vSeekDone 157250000000</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:18:34.374338] GPLAYCB:<>vPositionUpdated 157250000000</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">0:02:41.727308352 1955 0x30c9b0 DEBUG gst-player gstplayer.c:911:change_state:<player0> Changing app state from buffering to paused</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">[2016-09-14 14:18:34.379079] GPLAYCB:<>vStateChanged paused</span></div>
<div><br>
</div>
</div>
<div><span style="font-size: 12pt;">Does this mean I should be waiting for the 'seek-done' signal before trying to restart playback?</span><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Jonathan</div>
<br>
<p></p>
</div>
<br />
<br />
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 <a href="https://www.cambridgeaudio.com/disclaimer" target="_blank">Disclaimer</a> for important notices.
</body></html>