mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
playback-test: wait for buffering after seek
Wait for buffering to finish before setting the element to the playing state after a seek.
This commit is contained in:
parent
0fa50b44f0
commit
2f2e3676b1
1 changed files with 12 additions and 4 deletions
|
@ -558,8 +558,12 @@ seek_cb (GtkRange * range, PlaybackApp * app)
|
|||
do_seek (app, GST_FORMAT_TIME, real);
|
||||
|
||||
if (app->play_scrub) {
|
||||
if (app->buffering) {
|
||||
GST_DEBUG ("do scrub seek, waiting for buffering");
|
||||
} else {
|
||||
GST_DEBUG ("do scrub seek, PLAYING");
|
||||
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
|
||||
}
|
||||
|
||||
if (app->seek_timeout_id == 0) {
|
||||
app->seek_timeout_id =
|
||||
|
@ -673,10 +677,14 @@ stop_seek (GtkRange * range, GdkEventButton * event, PlaybackApp * app)
|
|||
}
|
||||
} else {
|
||||
if (app->state == GST_STATE_PLAYING) {
|
||||
if (app->buffering) {
|
||||
GST_DEBUG ("stop scrub seek, waiting for buffering");
|
||||
} else {
|
||||
GST_DEBUG ("stop scrub seek, PLAYING");
|
||||
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue