pitivi r1348 - trunk/pitivi/timeline
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1348 - trunk/pitivi/timeline
- Date: Mon, 3 Nov 2008 12:27:57 +0000 (UTC)
Author: edwardrv
Date: Mon Nov 3 12:27:57 2008
New Revision: 1348
URL: http://svn.gnome.org/viewvc/pitivi?rev=1348&view=rev
Log:
pitivi/timeline/ Fix usage of factory.duration and factory.default_duration
Modified:
trunk/pitivi/timeline/composition.py
trunk/pitivi/timeline/objects.py
trunk/pitivi/timeline/source.py
Modified: trunk/pitivi/timeline/composition.py
==============================================================================
--- trunk/pitivi/timeline/composition.py (original)
+++ trunk/pitivi/timeline/composition.py Mon Nov 3 12:27:57 2008
@@ -459,14 +459,14 @@
gst.info("start=%s, position=%d, existorder=%d, sourcelength=%s" % (gst.TIME_ARGS(start),
position,
existorder,
- gst.TIME_ARGS(source.factory.duration)))
+ gst.TIME_ARGS(source.duration)))
# set the correct start/duration time
- duration = source.factory.duration
+ duration = source.duration
source.setStartDurationTime(start, duration)
# pushing following
if push_following and not position in [-1, 0]:
- self.shiftSources(source.factory.duration, existorder, len(self.sources[position - 1][2]))
+ self.shiftSources(source.duration, existorder, len(self.sources[position - 1][2]))
self.addSource(source, position, auto_linked=auto_linked)
Modified: trunk/pitivi/timeline/objects.py
==============================================================================
--- trunk/pitivi/timeline/objects.py (original)
+++ trunk/pitivi/timeline/objects.py Mon Nov 3 12:27:57 2008
@@ -338,6 +338,8 @@
self.name = name
gst.log("new TimelineObject :%s %r" % (name, self))
self._start = start
+ if duration == 0 and factory:
+ duration = factory.default_duration
self._duration = duration
self._factory = None
# Set factory and media_type and then create the gnlobject
Modified: trunk/pitivi/timeline/source.py
==============================================================================
--- trunk/pitivi/timeline/source.py (original)
+++ trunk/pitivi/timeline/source.py Mon Nov 3 12:27:57 2008
@@ -191,14 +191,14 @@
if self.media_start == gst.CLOCK_TIME_NONE:
self.media_start = 0
if self.media_duration == 0:
- self.media_duration = self.factory.duration
+ self.media_duration = self.factory.default_duration
gnlobject = TimelineSource._makeGnlObject(self)
if gnlobject == None:
return None
# we override start/duration
- gnlobject.set_property("duration", long(self.factory.duration))
+ gnlobject.set_property("duration", long(self.factory.default_duration))
gnlobject.set_property("start", long(0))
return gnlobject
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]