[pitivi] pipeline: Handle negative position when pausing
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] pipeline: Handle negative position when pausing
- Date: Tue, 4 Feb 2014 21:51:42 +0000 (UTC)
commit 1af6c48813c290c01d314724c3ac92835aa87dee
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Jan 6 18:19:13 2014 +0100
pipeline: Handle negative position when pausing
This happens immediately after a render operation.
pitivi/utils/pipeline.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index 244d35e..6bd544c 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -244,10 +244,12 @@ class SimplePipeline(Signallable, Loggable):
# is only emitted every 300ms and the playhead jumps
# during the playback.
try:
- self.emit("position", self.getPosition())
+ position = self.getPosition()
except PipelineError:
# Getting the position failed
- pass
+ return
+ if position != Gst.CLOCK_TIME_NONE and position >= 0:
+ self.emit("position", position)
def stop(self):
"""
@@ -273,7 +275,6 @@ class SimplePipeline(Signallable, Loggable):
@rtype: L{long}
@raise PipelineError: If the position couldn't be obtained.
"""
- self.log("format %r", format)
try:
res, cur = self._pipeline.query_position(format)
except Exception, e:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]