From bd1c4506b864ad30098e7a2d1504c6621136a780 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 16 May 2011 16:10:49 +0200 Subject: [PATCH] update manual code examples for new _get_caps() --- docs/manual/advanced-autoplugging.xml | 7 ++++--- docs/manual/highlevel-components.xml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/manual/advanced-autoplugging.xml b/docs/manual/advanced-autoplugging.xml index 58889da771..3e24f71082 100644 --- a/docs/manual/advanced-autoplugging.xml +++ b/docs/manual/advanced-autoplugging.xml @@ -344,7 +344,7 @@ cb_newpad (GstElement *element, { GstCaps *caps; - caps = gst_pad_get_caps (pad); + caps = gst_pad_get_caps (pad, NULL); try_to_plug (pad, caps); gst_caps_unref (caps); } @@ -389,7 +389,7 @@ close_link (GstPad *srcpad, switch (templ->presence) { case GST_PAD_ALWAYS: { GstPad *pad = gst_element_get_static_pad (sinkelement, templ->name_template); - GstCaps *caps = gst_pad_get_caps (pad); + GstCaps *caps = gst_pad_get_caps (pad, NULL); /* link */ try_to_plug (pad, caps); @@ -436,7 +436,8 @@ try_to_plug (GstPad *pad, } /* can it link to the audiopad? */ - audiocaps = gst_pad_get_caps (gst_element_get_static_pad (audiosink, "sink")); + audiocaps = gst_pad_get_caps (gst_element_get_static_pad (audiosink, "sink"), + NULL); res = gst_caps_intersect (caps, audiocaps); if (res && !gst_caps_is_empty (res)) { g_print ("Found pad to link to audiosink - plugging is now done\n"); diff --git a/docs/manual/highlevel-components.xml b/docs/manual/highlevel-components.xml index 87d1d5fbf2..b65df9adc7 100644 --- a/docs/manual/highlevel-components.xml +++ b/docs/manual/highlevel-components.xml @@ -253,7 +253,7 @@ cb_newpad (GstElement *decodebin, } /* check media type */ - caps = gst_pad_get_caps (pad); + caps = gst_pad_get_caps (pad, NULL); str = gst_caps_get_structure (caps, 0); if (!g_strrstr (gst_structure_get_name (str), "audio")) { gst_caps_unref (caps);