[pitivi] formatters.etree: save and restore object factory duration
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] formatters.etree: save and restore object factory duration
- Date: Sun, 19 Apr 2009 10:13:57 -0400 (EDT)
commit d28582fd94f4a292d5dd08de149c984c65589287
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Fri Apr 17 23:12:43 2009 -0700
formatters.etree: save and restore object factory duration
---
pitivi/formatters/etree.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pitivi/formatters/etree.py b/pitivi/formatters/etree.py
index 01c7656..7116552 100644
--- a/pitivi/formatters/etree.py
+++ b/pitivi/formatters/etree.py
@@ -136,6 +136,8 @@ class ElementTreeFormatter(Formatter):
element = Element("source")
element.attrib["id"] = self._new_element_id()
element.attrib["type"] = qual(factory.__class__)
+ element.attrib["default_duration"] = str(factory.default_duration)
+ element.attrib["duration"] = str(factory.duration)
input_streams_element = SubElement(element, "input-streams")
input_streams = factory.getInputStreams()
@@ -161,6 +163,9 @@ class ElementTreeFormatter(Formatter):
else:
factory = klass()
+ factory.duration = long(element.attrib["duration"])
+ factory.default_duration = long(element.attrib["default_duration"])
+
input_streams = element.find("input-streams") or []
for stream_element in input_streams:
stream = self._loadStream(stream_element)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]