gst/gstcaps.c: Docs about how to print caps for debug purposes.
authorStefan Kost <ensonic@users.sourceforge.net>
Sun, 7 May 2006 19:57:48 +0000 (19:57 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Sun, 7 May 2006 19:57:48 +0000 (19:57 +0000)
Original commit message from CVS:
* gst/gstcaps.c:
Docs about how to print caps for debug purposes.
* gst/gstpadtemplate.c: (gst_static_pad_template_get):
use gst_caps_make_writable instead of gst_caps_copy, Fixes #340608

ChangeLog
gst/gstcaps.c
gst/gstpadtemplate.c

index a1f0617..6a15914 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2006-05-07  Stefan Kost  <ensonic@users.sf.net>
 
+       * gst/gstcaps.c:
+          Docs about how to print caps for debug purposes.
+        
+       * gst/gstpadtemplate.c: (gst_static_pad_template_get):
+          use gst_caps_make_writable instead of gst_caps_copy, Fixes #340608
+
+2006-05-07  Stefan Kost  <ensonic@users.sf.net>
+
        * gst/gstelement.c:
          use full enum names and preprend a '%' in docs strings to make recent 
          gtk-doc turn that into a link
index 116c1d1..1a426a9 100644 (file)
@@ -1589,6 +1589,12 @@ gst_caps_replace (GstCaps ** caps, GstCaps * newcaps)
  * Converts @caps to a string representation.  This string representation
  * can be converted back to a #GstCaps by gst_caps_from_string().
  *
+ * For debugging purposes its easier to do something like this:
+ * <programlisting>
+ *  GST_LOG ("caps are %" GST_PTR_FORMAT, caps);
+ * </programlisting>
+ * This prints the caps in human readble form.
+ *
  * Returns: a newly allocated string representing @caps.
  */
 gchar *
index 42a027f..bff35fb 100644 (file)
@@ -277,7 +277,7 @@ gst_static_pad_template_get (GstStaticPadTemplate * pad_template)
   GST_PAD_TEMPLATE_PRESENCE (new) = pad_template->presence;
 
   GST_PAD_TEMPLATE_CAPS (new) =
-      gst_caps_copy (gst_static_caps_get (&pad_template->static_caps));
+      gst_caps_make_writable (gst_static_caps_get (&pad_template->static_caps));
 
   return new;
 }