docs: annotate C examples as such
authorEvan Nemerson <evan@nemerson.com>
Thu, 5 Jun 2014 20:27:28 +0000 (13:27 -0700)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 15 Feb 2016 17:45:15 +0000 (17:45 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=731292

18 files changed:
gst/gstbuffer.c
gst/gstcaps.c
gst/gstcapsfeatures.c
gst/gstclock.h
gst/gstevent.c
gst/gstinfo.c
gst/gstinfo.h
gst/gstiterator.c
gst/gstmessage.c
gst/gstpadtemplate.c
gst/gstpluginfeature.c
gst/gstquery.c
gst/gststructure.c
gst/gsttagsetter.c
gst/gsttypefindfactory.c
libs/gst/base/gstadapter.c
libs/gst/base/gstbasesink.c
libs/gst/base/gstbasesrc.c

index b569387..db4a237 100644 (file)
@@ -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.
- * |[
+ * |[<!-- language="C" -->
  *   GstBuffer *buffer;
  *   GstMemory *memory;
  *   gint size, width, height, bpp;
index 0d00926..e2145b3 100644 (file)
@@ -34,7 +34,7 @@
  * handle or produce at runtime.
  *
  * A #GstCaps can be constructed with the following code fragment:
- * |[
+ * |[<!-- language="C" -->
  *   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:
- * |[
+ * |[<!-- language="C" -->
  * GST_LOG ("caps are %" GST_PTR_FORMAT, caps);
  * ]|
  * This prints the caps in human readable form.
index dade216..ea06f0c 100644 (file)
@@ -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:
- * |[
+ * |[<!-- language="C" -->
  * GST_LOG ("features is %" GST_PTR_FORMAT, features);
  * ]|
  * This prints the features in human readable form.
index dcd47c4..7b0d6c4 100644 (file)
@@ -221,7 +221,7 @@ G_STMT_START {                                                    \
  * the matching arguments.
  *
  * Example:
- * |[
+ * |[<!-- language="C" -->
  * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts));
  * ]|
  */
index baeb0f4..7eb41d3 100644 (file)
@@ -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.
- * |[
+ * |[<!-- language="C" -->
  *   GstEvent *event;
  *   gboolean result;
  *   ...
index 203277e..8bfa33b 100644 (file)
  * categories. This is easily done with 3 lines. At the top of your code,
  * declare
  * the variables and set the default category.
- * |[
+ * |[<!-- language="C" -->
  *   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.
- * |[
+ * |[<!-- language="C" -->
  *   GST_DEBUG_CATEGORY_INIT (my_category, "my category",
  *                            0, "This is my very own");
  * ]|
index 6ef058d..3b7ccd5 100644 (file)
@@ -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.
  *
- * |[
+ * |[<!-- language="C" -->
  * GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug);
  * #define GST_CAT_DEFAULT gst_myplugin_debug
  * GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
index 4aed7c7..77f0c02 100644 (file)
@@ -38,7 +38,7 @@
  * if it wants to continue using it later.
  *
  * The basic use pattern of an iterator is as follows:
- * |[
+ * |[<!-- language="C" -->
  *   GstIterator *it = _get_iterator(object);
  *   GValue item = G_VALUE_INIT;
  *   done = FALSE;
index 066635d..299ecfb 100644 (file)
@@ -34,7 +34,7 @@
  * application using the #GstBus.
  *
  * The basic use pattern of posting a message on a #GstBus is as follows:
- * |[
+ * |[<!-- language="C" -->
  *   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:
- * |[
+ * |[<!-- language="C" -->
  *   ...
  *   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:
- * |[
+ * |[<!-- language="C" -->
  *   ...
  *   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:
- * |[
+ * |[<!-- language="C" -->
  *   ...
  *   switch (GST_MESSAGE_TYPE (msg)) {
  *     case GST_MESSAGE_ERROR: {
index 8eac996..a7789d4 100644 (file)
@@ -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.
- * |[
+ * |[<!-- language="C" -->
  *   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:
- * |[
+ * |[<!-- language="C" -->
  *   static void
  *   my_element_class_init (GstMyElementClass *klass)
  *   {
index ef24eaf..4b6062a 100644 (file)
@@ -81,7 +81,7 @@ gst_plugin_feature_finalize (GObject * object)
  * unaffected; use the return value instead.
  *
  * Normally this function is used like this:
- * |[
+ * |[<!-- language="C" -->
  * GstPluginFeature *loaded_feature;
  *
  * loaded_feature = gst_plugin_feature_load (feature);
index 72d783d..63ad182 100644 (file)
@@ -36,7 +36,7 @@
  * gst_query_parse_*() helpers.
  *
  * The following example shows how to query the duration of a pipeline:
- * |[
+ * |[<!-- language="C" -->
  *   GstQuery *query;
  *   gboolean res;
  *   query = gst_query_new_duration (GST_FORMAT_TIME);
index 659660c..3c705f3 100644 (file)
@@ -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:
- * |[
+ * |[<!-- language="C" -->
  * GST_LOG ("structure is %" GST_PTR_FORMAT, structure);
  * ]|
  * This prints the structure in human readable form.
index 7ed457e..dca1ccb 100644 (file)
@@ -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:
  *
- * |[
+ * |[<!-- language="C" -->
  * GstTagMergeMode merge_mode;
  * const GstTagList *application_tags;
  * const GstTagList *event_tags;
index 8a1b239..87a1573 100644 (file)
@@ -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.
- * |[
+ * |[<!-- language="C" -->
  *   typedef struct {
  *     guint8 *data;
  *     guint size;
index 3661db4..c017486 100644 (file)
@@ -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:
- * |[
+ * |[<!-- language="C" -->
  * static GstFlowReturn
  * sink_pad_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer)
  * {
index 34ccdac..9ad65c8 100644 (file)
@@ -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:
- * |[
+ * |[<!-- language="C" -->
  * static void
  * my_element_class_init (GstMyElementClass *klass)
  * {
index ed10d82..35b7a2e 100644 (file)
  * 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:
- * |[
+ * |[<!-- language="C" -->
  * static void
  * my_element_class_init (GstMyElementClass *klass)
  * {