From d11e657412e657f9a5146680ca8fd703574b63f2 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Thu, 5 Jun 2014 13:27:28 -0700 Subject: [PATCH] docs: annotate C examples as such https://bugzilla.gnome.org/show_bug.cgi?id=731292 --- gst/gstbuffer.c | 2 +- gst/gstcaps.c | 4 ++-- gst/gstcapsfeatures.c | 2 +- gst/gstclock.h | 2 +- gst/gstevent.c | 2 +- gst/gstinfo.c | 4 ++-- gst/gstinfo.h | 2 +- gst/gstiterator.c | 2 +- gst/gstmessage.c | 8 ++++---- gst/gstpadtemplate.c | 4 ++-- gst/gstpluginfeature.c | 2 +- gst/gstquery.c | 2 +- gst/gststructure.c | 2 +- gst/gsttagsetter.c | 2 +- gst/gsttypefindfactory.c | 2 +- libs/gst/base/gstadapter.c | 2 +- libs/gst/base/gstbasesink.c | 2 +- libs/gst/base/gstbasesrc.c | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index b56938743b..db4a2379c2 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -33,7 +33,7 @@ * created one will typically allocate memory for it and add it to the buffer. * The following example creates a buffer that can hold a given video frame * with a given width, height and bits per plane. - * |[ + * |[ * GstBuffer *buffer; * GstMemory *memory; * gint size, width, height, bpp; diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 0d00926bf1..e2145b32c9 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -34,7 +34,7 @@ * handle or produce at runtime. * * A #GstCaps can be constructed with the following code fragment: - * |[ + * |[ * GstCaps *caps = gst_caps_new_simple ("video/x-raw", * "format", G_TYPE_STRING, "I420", * "framerate", GST_TYPE_FRACTION, 25, 1, @@ -2163,7 +2163,7 @@ gst_caps_fixate (GstCaps * caps) * 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 readable form. diff --git a/gst/gstcapsfeatures.c b/gst/gstcapsfeatures.c index dade216405..ea06f0cfa1 100644 --- a/gst/gstcapsfeatures.c +++ b/gst/gstcapsfeatures.c @@ -414,7 +414,7 @@ gst_caps_features_free (GstCapsFeatures * features) * Converts @features to a human-readable string representation. * * For debugging purposes its easier to do something like this: - * |[ + * |[ * GST_LOG ("features is %" GST_PTR_FORMAT, features); * ]| * This prints the features in human readable form. diff --git a/gst/gstclock.h b/gst/gstclock.h index dcd47c462b..7b0d6c4b57 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -221,7 +221,7 @@ G_STMT_START { \ * the matching arguments. * * Example: - * |[ + * |[ * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts)); * ]| */ diff --git a/gst/gstevent.c b/gst/gstevent.c index baeb0f42a2..7eb41d3dee 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -51,7 +51,7 @@ * construct and use seek events. * To do that gst_event_new_seek() is used to create a seek event. It takes * the needed parameters to specify seeking time and mode. - * |[ + * |[ * GstEvent *event; * gboolean result; * ... diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 203277efce..8bfa33ba8a 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -50,12 +50,12 @@ * categories. This is easily done with 3 lines. At the top of your code, * declare * the variables and set the default category. - * |[ + * |[ * GST_DEBUG_CATEGORY_STATIC (my_category); // define category (statically) * #define GST_CAT_DEFAULT my_category // set as default * ]| * After that you only need to initialize the category. - * |[ + * |[ * GST_DEBUG_CATEGORY_INIT (my_category, "my category", * 0, "This is my very own"); * ]| diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 6ef058def1..3b7ccd5084 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -493,7 +493,7 @@ G_STMT_START{ \ * category is not found, but GST_CAT_DEFAULT is defined, that is assigned to * @cat. Otherwise @cat will be %NULL. * - * |[ + * |[ * GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug); * #define GST_CAT_DEFAULT gst_myplugin_debug * GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); diff --git a/gst/gstiterator.c b/gst/gstiterator.c index 4aed7c75c6..77f0c02c3a 100644 --- a/gst/gstiterator.c +++ b/gst/gstiterator.c @@ -38,7 +38,7 @@ * if it wants to continue using it later. * * The basic use pattern of an iterator is as follows: - * |[ + * |[ * GstIterator *it = _get_iterator(object); * GValue item = G_VALUE_INIT; * done = FALSE; diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 066635d448..299ecfb1ab 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -34,7 +34,7 @@ * application using the #GstBus. * * The basic use pattern of posting a message on a #GstBus is as follows: - * |[ + * |[ * gst_bus_post (bus, gst_message_new_eos()); * ]| * @@ -994,7 +994,7 @@ gst_message_has_name (GstMessage * message, const gchar * name) * output argument is a copy; the caller must free it when done. * * Typical usage of this function might be: - * |[ + * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_TAG: { @@ -1117,7 +1117,7 @@ gst_message_parse_buffering_stats (GstMessage * message, * Extracts the old and new states from the GstMessage. * * Typical usage of this function might be: - * |[ + * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_STATE_CHANGED: { @@ -1304,7 +1304,7 @@ gst_message_parse_structure_change (GstMessage * message, * in the output arguments are copies; the caller must free them when done. * * Typical usage of this function might be: - * |[ + * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_ERROR: { diff --git a/gst/gstpadtemplate.c b/gst/gstpadtemplate.c index 8eac996761..a7789d4051 100644 --- a/gst/gstpadtemplate.c +++ b/gst/gstpadtemplate.c @@ -54,7 +54,7 @@ * (see gst_element_class_add_pad_template ()). * * The following code example shows the code to create a pad from a padtemplate. - * |[ + * |[ * GstStaticPadTemplate my_template = * GST_STATIC_PAD_TEMPLATE ( * "sink", // the name of the pad @@ -76,7 +76,7 @@ * * The following example shows you how to add the padtemplate to an * element class, this is usually done in the class_init of the class: - * |[ + * |[ * static void * my_element_class_init (GstMyElementClass *klass) * { diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c index ef24eaf690..4b6062a9f1 100644 --- a/gst/gstpluginfeature.c +++ b/gst/gstpluginfeature.c @@ -81,7 +81,7 @@ gst_plugin_feature_finalize (GObject * object) * unaffected; use the return value instead. * * Normally this function is used like this: - * |[ + * |[ * GstPluginFeature *loaded_feature; * * loaded_feature = gst_plugin_feature_load (feature); diff --git a/gst/gstquery.c b/gst/gstquery.c index 72d783d319..63ad182bfa 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -36,7 +36,7 @@ * gst_query_parse_*() helpers. * * The following example shows how to query the duration of a pipeline: - * |[ + * |[ * GstQuery *query; * gboolean res; * query = gst_query_new_duration (GST_FORMAT_TIME); diff --git a/gst/gststructure.c b/gst/gststructure.c index 659660c705..3c705f317d 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -1993,7 +1993,7 @@ priv__gst_structure_append_template_to_gstring (GQuark field_id, * Converts @structure to a human-readable string representation. * * For debugging purposes its easier to do something like this: - * |[ + * |[ * GST_LOG ("structure is %" GST_PTR_FORMAT, structure); * ]| * This prints the structure in human readable form. diff --git a/gst/gsttagsetter.c b/gst/gsttagsetter.c index 7ed457edf2..dca1ccb1bb 100644 --- a/gst/gsttagsetter.c +++ b/gst/gsttagsetter.c @@ -43,7 +43,7 @@ * any tags received from upstream and the tags set by the application via * the interface. This can be done like this: * - * |[ + * |[ * GstTagMergeMode merge_mode; * const GstTagList *application_tags; * const GstTagList *event_tags; diff --git a/gst/gsttypefindfactory.c b/gst/gsttypefindfactory.c index 8a1b239a93..87a15738ad 100644 --- a/gst/gsttypefindfactory.c +++ b/gst/gsttypefindfactory.c @@ -31,7 +31,7 @@ * The following example shows how to write a very simple typefinder that * identifies the given data. You can get quite a bit more complicated than * that though. - * |[ + * |[ * typedef struct { * guint8 *data; * guint size; diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c index 3661db4318..c0174868c5 100644 --- a/libs/gst/base/gstadapter.c +++ b/libs/gst/base/gstadapter.c @@ -43,7 +43,7 @@ * * For example, a sink pad's chain function that needs to pass data to a library * in 512-byte chunks could be implemented like this: - * |[ + * |[ * static GstFlowReturn * sink_pad_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer) * { diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 34ccdac9d6..9ad65c8053 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -37,7 +37,7 @@ * #GstBaseSink provides support for exactly one sink pad, which should be * named "sink". A sink implementation (subclass of #GstBaseSink) should * install a pad template in its class_init function, like so: - * |[ + * |[ * static void * my_element_class_init (GstMyElementClass *klass) * { diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index ed10d82584..35b7a2ee5f 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -112,7 +112,7 @@ * There is only support in #GstBaseSrc for exactly one source pad, which * should be named "src". A source implementation (subclass of #GstBaseSrc) * should install a pad template in its class_init function, like so: - * |[ + * |[ * static void * my_element_class_init (GstMyElementClass *klass) * {