[pitivi] previewer.py: constant tdur for AudioPreviewer
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] previewer.py: constant tdur for AudioPreviewer
- Date: Wed, 30 Sep 2009 09:24:17 +0000 (UTC)
commit 08cee470b11e0691c0ee1d1a2480431e2784281a
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Wed Jul 29 16:09:57 2009 -0700
previewer.py: constant tdur for AudioPreviewer
pitivi/ui/previewer.py | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index 81da890..d7d9a1e 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -196,7 +196,6 @@ class RandomAccessPreviewer(Previewer):
# assume 50 pixel height
self.theight = 50
- self.twidth = int(self.aspect * self.theight)
self.waiting_timestamp = None
self._pipelineInit(factory, bin)
@@ -343,6 +342,10 @@ class RandomAccessPreviewer(Previewer):
class RandomAccessVideoPreviewer(RandomAccessPreviewer):
@property
+ def twidth(self):
+ return int(self.aspect * self.theight)
+
+ @property
def tdur(self):
return Zoomable.pixelToNs(self.twidth)
@@ -401,10 +404,13 @@ class StillImagePreviewer(RandomAccessVideoPreviewer):
class RandomAccessAudioPreviewer(RandomAccessPreviewer):
def __init__(self, factory, stream_):
- RandomAccessPreviewer.__init__(self, factory, stream_)
- self.theight = 50
- self.tdur = gst.SECOND / 10
+ self.tdur = gst.SECOND
self.base_width = 50
+ RandomAccessPreviewer.__init__(self, factory, stream_)
+
+ @property
+ def twidth(self):
+ return Zoomable.nsToPixel(self.tdur)
def _pipelineInit(self, factory, sbin):
self.spacing = 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]