pitivi r1312 - in trunk: . pitivi/ui
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1312 - in trunk: . pitivi/ui
- Date: Fri, 10 Oct 2008 08:53:47 +0000 (UTC)
Author: edwardrv
Date: Fri Oct 10 08:53:46 2008
New Revision: 1312
URL: http://svn.gnome.org/viewvc/pitivi?rev=1312&view=rev
Log:
* pitivi/ruler.py:
Fix similar pending-seek behaviour as did previously in the viewer.
Modified:
trunk/ChangeLog
trunk/pitivi/ui/ruler.py
Modified: trunk/pitivi/ui/ruler.py
==============================================================================
--- trunk/pitivi/ui/ruler.py (original)
+++ trunk/pitivi/ui/ruler.py Fri Oct 10 08:53:46 2008
@@ -63,7 +63,7 @@
# position is in nanoseconds
self.position = 0
- self.requested_time = long(0)
+ self.requested_time = gst.CLOCK_TIME_NONE
self.currentlySeeking = False
self.pressed = False
@@ -76,7 +76,7 @@
## timeline position changed method
- def timelinePositionChanged(self, value, unused_frame):
+ def timelinePositionChanged(self, value, unused_frame=None):
gst.debug("value : %r" % value)
ppos = max(self.nsToPixel(self.position) - 1, 0)
self.position = value
@@ -152,18 +152,24 @@
def _seekTimeoutCb(self):
gst.debug("timeout")
self.currentlySeeking = False
- if not self.position == self.requested_time:
+ if (self.requested_time != gst.CLOCK_TIME_NONE) and (self.position != self.requested_time):
self._doSeek(self.requested_time)
return False
def _doSeek(self, value, format=gst.FORMAT_TIME):
gst.debug("seeking to %s / currentlySeeking %r" % (gst.TIME_ARGS (value),
self.currentlySeeking))
+ if (format == gst.FORMAT_TIME) and (value > self.getDuration()):
+ gst.debug("you can't seek outside of the timeline")
+ return
if not self.currentlySeeking:
+ self.currentlySeeking = True
if instance.PiTiVi.playground.seekInCurrent(value, format=format):
- self.currentlySeeking = True
- self.requested_time = value
+ self.requested_time = gst.CLOCK_TIME_NONE
gobject.timeout_add(80, self._seekTimeoutCb)
+ self.timelinePositionChanged(value)
+ else:
+ self.currentlySeeking = False
elif format == gst.FORMAT_TIME:
self.requested_time = value
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]