[pitivi/ges: 232/287] viewer: Only check the pipeline's position when playing
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 232/287] viewer: Only check the pipeline's position when playing
- Date: Thu, 15 Mar 2012 16:45:20 +0000 (UTC)
commit a4adcff9a5bca4dc4cab213ef276886c06e0c1a5
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Jan 26 16:39:44 2012 +0100
viewer: Only check the pipeline's position when playing
pitivi/viewer.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index c1ec772..8a07b16 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -147,8 +147,6 @@ class PitiviViewer(gtk.VBox, Loggable):
self.pipeline.set_state(gst.STATE_PAUSED)
self.currentState = gst.STATE_PAUSED
- gobject.timeout_add(300, self._positionCheckCb)
-
self._setUiActive()
self.seeker = self.app.projectManager.current.seeker
@@ -508,6 +506,8 @@ class PitiviViewer(gtk.VBox, Loggable):
self.previous_time = self.current_time
except:
self.debug("could not check timeline position for the viewer")
+ if self.currentState == gst.STATE_PAUSED:
+ return False
return True
def _currentStateCb(self, state):
@@ -515,6 +515,7 @@ class PitiviViewer(gtk.VBox, Loggable):
if int(state) == int(gst.STATE_PLAYING):
self.playpause_button.setPause()
self.system.inhibitScreensaver(self.INHIBIT_REASON)
+ gobject.timeout_add(300, self._positionCheckCb)
elif int(state) == int(gst.STATE_PAUSED):
self.playpause_button.setPlay()
self.system.uninhibitScreensaver(self.INHIBIT_REASON)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]