[pitivi] ElementTreeFormatter: Also save/load Stream.pad_name



commit db107ad8300d82ef5181f8e68d68de62ca8695e8
Author: Edward Hervey <bilboed bilboed com>
Date:   Sun Apr 19 16:09:41 2009 +0200

    ElementTreeFormatter: Also save/load Stream.pad_name
    
    Fixme : We should really switch to another name for that attribute.
---
 pitivi/formatters/etree.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pitivi/formatters/etree.py b/pitivi/formatters/etree.py
index 7116552..2658185 100644
--- a/pitivi/formatters/etree.py
+++ b/pitivi/formatters/etree.py
@@ -94,6 +94,7 @@ class ElementTreeFormatter(Formatter):
         element.attrib["id"] = self._new_element_id()
         element.attrib["type"] = qual(stream.__class__)
         element.attrib["caps"] = str(stream.caps)
+        element.attrib["name"] = str(stream.pad_name)
 
         self._context.streams[stream] = element
 
@@ -104,7 +105,7 @@ class ElementTreeFormatter(Formatter):
         klass = namedAny(element.attrib["type"])
         caps = gst.Caps(element.attrib["caps"])
 
-        stream = klass(caps)
+        stream = klass(caps, element.attrib.get("name", None))
 
         self._context.streams[id_] = stream
 



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