From 4322a015c1483daf8c97a9462f43df42b44a63c5 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Sun, 7 May 2006 19:57:48 +0000 Subject: [PATCH] gst/gstcaps.c: Docs about how to print caps for debug purposes. 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 | 8 ++++++++ gst/gstcaps.c | 6 ++++++ gst/gstpadtemplate.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a1f0617405..6a15914115 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-05-07 Stefan Kost + + * 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 * gst/gstelement.c: diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 116c1d1c5f..1a426a91fa 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -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: + * + * GST_LOG ("caps are %" GST_PTR_FORMAT, caps); + * + * This prints the caps in human readble form. + * * Returns: a newly allocated string representing @caps. */ gchar * diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c index 42a027fbc3..bff35fb060 100644 --- a/gst/gstpadtemplate.c +++ b/gst/gstpadtemplate.c @@ -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; }