[pitivi] Fixe the transition problem



commit ce4e6c3e95b52ee14018c3df03071b736d3bc2d8
Author: Thibault Saunier <tsaunier src gnome org>
Date:   Thu Jun 3 12:28:15 2010 -0300

    Fixe the transition problem

 pitivi/timeline/track.py |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 4f1af22..e3a8bdb 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -523,13 +523,23 @@ class TrackObject(Signallable, Loggable):
             self._updatePriority(priority)
 
     def _updatePriority(self, priority):
-        if self.stream_type is VideoStream:
-            true_priority = 2 + self._stagger + (3 * priority)
+        if type(self) is TrackEffect:
+            #pdb.set_trace()
+            if self.stream_type is VideoStream:
+                true_priority = 2 + self._stagger + (3 * priority)
+            elif self.stream_type is AudioStream:
+                true_priority  = 3 + (2 * self._stagger) + (4 * priority)
+        elif self.stream_type is VideoStream:
+            true_priority = 3 + self._stagger + (3 * priority)
         elif self.stream_type is AudioStream:
-            true_priority  = 2 + (2 * self._stagger) + (4 * priority)
+            true_priority  = 3 + (2 * self._stagger) + (4 * priority)
+
         if self.gnl_object.props.priority != true_priority:
             self.gnl_object.props.priority = true_priority
 
+        self.debug("Update priority: %s %s" %(self,
+                                              self.gnl_object.props.priority))
+
     priority = property(_getPriority, setPriority)
 
     def _getStagger(self):
@@ -1192,7 +1202,8 @@ class Track(Signallable, Loggable):
     def getTrackObjectsGroupedByLayer(self):
         layers = [[] for x in xrange(0, self.max_priority + 1)]
         for track_object in self.track_objects:
-            layers[int(track_object.priority)].append(track_object)
+            if not isinstance(track_object, TrackEffect):
+                layers[int(track_object.priority)].append(track_object)
         return layers
 
     def getValidTransitionSlots(self, objs):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]