[totem] backend: Pause the backend when seeking



commit 73a2fb678079033ede4608db258503ff00a47943
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jul 17 17:26:20 2012 +0100

    backend: Pause the backend when seeking
    
    And start playing back again when seeking has finished and
    not other seek events are scheduled to take place.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680053

 src/backend/bacon-video-widget.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 5fb38ad..f77466a 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2090,6 +2090,9 @@ bvw_bus_message_cb (GstBus * bus, GstMessage * message, BaconVideoWidget *bvw)
 	if (_time >= 0) {
 	  GST_DEBUG ("Have an old seek to schedule, doing it now");
 	  bacon_video_widget_seek_time_no_lock (bvw, _time, 0, NULL);
+	} else if (bvw->priv->target_state == GST_STATE_PLAYING) {
+	  GST_DEBUG ("Maybe starting deferred playback after seek");
+	  bacon_video_widget_play (bvw, NULL);
 	}
 	bvw_get_navigation_if_available (bvw);
 	bacon_video_widget_get_stream_length (bvw);
@@ -3621,6 +3624,8 @@ bacon_video_widget_seek_time_no_lock (BaconVideoWidget *bvw,
 
   bvw->priv->seek_time = -1;
 
+  gst_element_set_state (bvw->priv->play, GST_STATE_PAUSED);
+
   gst_element_seek (bvw->priv->play, bvw->priv->rate,
 		    GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | flag,
 		    GST_SEEK_TYPE_SET, _time * GST_MSECOND,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]