msmith - in flumotion/trunk: .
flumotion/component/producers/playlist
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Wed May 9 17:04:17 CEST 2007
Author: msmith
Date: Wed May 9 17:04:14 2007
New Revision: 4914
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/component/producers/playlist/playlistparser.py
Log:
* flumotion/component/producers/playlist/playlistparser.py:
Fix duration adjustment for making sources fit into timeline.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Wed May 9 17:04:14 2007
@@ -1,3 +1,8 @@
+2007-05-09 Michael Smith <msmith at fluendo.com>
+
+ * flumotion/component/producers/playlist/playlistparser.py:
+ Fix duration adjustment for making sources fit into timeline.
+
2007-05-09 Thomas Vander Stichele <thomas at apestaart dot org>
* flumotion/component/misc/httpfile/file.py (File.renderAuthenticated,
Modified: flumotion/trunk/flumotion/component/producers/playlist/playlistparser.py
==============================================================================
--- flumotion/trunk/flumotion/component/producers/playlist/playlistparser.py (original)
+++ flumotion/trunk/flumotion/component/producers/playlist/playlistparser.py Wed May 9 17:04:14 2007
@@ -89,8 +89,8 @@
while item:
if item.timestamp < newitem.timestamp:
prev = item
- elif (not next and item.timestamp >
- newitem.timestamp + newitem.duration):
+ elif (not next and item.timestamp > newitem.timestamp and
+ newitem.timestamp + newitem.duration > item.timestamp):
next = item
break
item = item.next
@@ -117,6 +117,8 @@
# Duration adjustments -> Reflect into gnonlin timeline
if prev and prev.timestamp + prev.duration > newitem.timestamp:
+ self.debug("Changing duration of previous item from %d to %d",
+ prev.duration, newitem.timestamp - prev.timestamp)
prev.duration = newitem.timestamp - prev.timestamp
if prev.asrc:
prev.asrc.props.duration = prev.duration
@@ -124,7 +126,9 @@
if prev.vsrc:
prev.vsrc.props.duration = prev.duration
prev.vsrc.props.media_duration = prev.duration
- if next and timestamp + newitem.duration > next.timestamp:
+ if next and newitem.timestamp + newitem.duration > next.timestamp:
+ self.debug("Changing duration of new item from %d to %d to fit",
+ newitem.duration, next.timestamp - newitem.timestamp)
newitem.duration = next.timestamp - newitem.timestamp
# Then we need to actually add newitem into the gnonlin timeline
More information about the flumotion-commit
mailing list