[pitivi: 21/28] checkpoint



commit 35eea1f10a1d260e214137426b3644ae28a199e9
Author: Alessandro Decina <alessandro d gmail com>
Date:   Thu Feb 25 21:58:27 2010 +0100

    checkpoint

 pitivi/timeline/track.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 29ad9fa..cec39d2 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -700,8 +700,9 @@ class Track(Signallable):
         return track_object
 
     def updateDefaultSources(self):
-        for object in self.default_sources:
-            self.composition.remove(object)
+        for source in self.default_sources:
+            self.composition.remove(source)
+            source.set_state(gst.STATE_NULL)
         gaps = Gap.findAllGaps(self.track_objects)
 
         self.default_sources = []
@@ -712,6 +713,7 @@ class Track(Signallable):
             gnl_object.props.duration = gap.initial_duration
             self.composition.add(gnl_object)
             self.default_sources.append(gnl_object)
+            gnl_object.sync_state_with_parent()
 
     def _getMixerForStream(self, stream):
         if isinstance(stream, AudioStream):
@@ -793,6 +795,7 @@ class Track(Signallable):
         track_object.track = self
 
         start_insort_right(self.track_objects, track_object)
+        self.updateDefaultSources()
 
         try:
             self.composition.add(track_object.gnl_object)
@@ -803,7 +806,6 @@ class Track(Signallable):
 
         self._updateMaxPriority()
         self._connectToTrackObject(track_object)
-        self.updateDefaultSources()
 
         self.emit('track-object-added', track_object)
 



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