gst/gstcaps.c: Actually do something in these functions, like before the big caps...
authorDavid Schleef <ds@schleef.org>
Sat, 3 Jul 2004 23:49:51 +0000 (23:49 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 3 Jul 2004 23:49:51 +0000 (23:49 +0000)
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_save_thyself), (gst_caps_load_thyself):
Actually do something in these functions, like before the big
caps change.  (bug #145137)

ChangeLog
gst/gstcaps.c

index d0c99f1..27e0fe1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-03  David Schleef  <ds@schleef.org>
+
+       * gst/gstcaps.c: (gst_caps_save_thyself), (gst_caps_load_thyself):
+       Actually do something in these functions, like before the big
+       caps change.  (bug #145137)
+
 2004-07-03  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * gst/gstelement.c: (gst_element_get_compatible_pad_template),
index 8682956..93f4f06 100644 (file)
@@ -1294,8 +1294,8 @@ gst_caps_do_simplify (GstCaps * caps)
 xmlNodePtr
 gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent)
 {
-
-  return 0;
+  xmlNewChild (parent, NULL, "caps", gst_caps_to_string (caps));
+  return parent;
 }
 
 /**
@@ -1309,6 +1309,9 @@ gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent)
 GstCaps *
 gst_caps_load_thyself (xmlNodePtr parent)
 {
+  if (strcmp ("caps", parent->name) == 0) {
+    return gst_caps_from_string (xmlNodeGetContent (parent));
+  }
 
   return NULL;
 }