docs: convert the examples to use gtk-doc markup, instead of docbook
authorStefan Sauer <ensonic@users.sf.net>
Thu, 27 Feb 2014 17:06:56 +0000 (18:06 +0100)
committerStefan Sauer <ensonic@users.sf.net>
Thu, 27 Feb 2014 17:11:35 +0000 (18:11 +0100)
The gtk-doc markup is less intrusive and better handled when creating docs for
language bindings. The titles (where used) where not adding much.

gst/gstbuffer.c
gst/gstcaps.c
gst/gstevent.c
gst/gstinfo.c
gst/gstiterator.c
gst/gstmessage.c
gst/gstpadtemplate.c
gst/gstquery.c
gst/gsttypefindfactory.c

index b35fd7c..9204e3d 100644 (file)
@@ -33,9 +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.
- * <example>
- * <title>Creating a buffer for a video frame</title>
- *   <programlisting>
+ * |[
  *   GstBuffer *buffer;
  *   GstMemory *memory;
  *   gint size, width, height, bpp;
  *   memory = gst_allocator_alloc (NULL, size, NULL);
  *   gst_buffer_insert_memory (buffer, -1, memory);
  *   ...
- *   </programlisting>
- * </example>
+ * ]|
  *
- * Alternatively, use gst_buffer_new_allocate()
- * to create a buffer with preallocated data of a given size.
+ * Alternatively, use gst_buffer_new_allocate() to create a buffer with
+ * preallocated data of a given size.
  *
  * Buffers can contain a list of #GstMemory objects. You can retrieve how many
  * memory objects with gst_buffer_n_memory() and you can get a pointer
index 9106f9f..57272e2 100644 (file)
  * handle or produce at runtime.
  *
  * A #GstCaps can be constructed with the following code fragment:
- *
- * <example>
- *  <title>Creating caps</title>
- *  <programlisting>
- *  GstCaps *caps;
- *  caps = gst_caps_new_simple ("video/x-raw",
- *       "format", G_TYPE_STRING, "I420",
- *       "framerate", GST_TYPE_FRACTION, 25, 1,
- *       "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
- *       "width", G_TYPE_INT, 320,
- *       "height", G_TYPE_INT, 240,
- *       NULL);
- *  </programlisting>
- * </example>
+ * |[
+ *   GstCaps *caps = gst_caps_new_simple ("video/x-raw",
+ *      "format", G_TYPE_STRING, "I420",
+ *      "framerate", GST_TYPE_FRACTION, 25, 1,
+ *      "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+ *      "width", G_TYPE_INT, 320,
+ *      "height", G_TYPE_INT, 240,
+ *      NULL);
+ * ]|
  *
  * A #GstCaps is fixed when it has no properties with ranges or lists. Use
  * gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a
index 377706e..ab13cd2 100644 (file)
@@ -51,9 +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.
- * <example>
- * <title>performing a seek on a pipeline</title>
- *   <programlisting>
+ * [[
  *   GstEvent *event;
  *   gboolean result;
  *   ...
@@ -69,8 +67,7 @@
  *   if (!result)
  *     g_warning ("seek failed");
  *   ...
- *   </programlisting>
- * </example>
+ * ]|
  *
  * Last reviewed on 2012-03-28 (0.11.3)
  */
index 54d7a6c..1d05cac 100644 (file)
  * categories. This is easily done with 3 lines. At the top of your code,
  * declare
  * the variables and set the default category.
- * <informalexample>
- * <programlisting>
- * GST_DEBUG_CATEGORY_STATIC (my_category);     // define category (statically)
- * &hash;define GST_CAT_DEFAULT my_category     // set as default
- * </programlisting>
- * </informalexample>
+ * |[
+ *   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.
- * <informalexample>
- * <programlisting>
- * GST_DEBUG_CATEGORY_INIT (my_category, "my category",
- *                          0, "This is my very own");
- * </programlisting>
- * </informalexample>
+ * |[
+ *   GST_DEBUG_CATEGORY_INIT (my_category, "my category",
+ *                            0, "This is my very own");
+ * ]|
  * Initialization must be done before the category is used first.
  * Plugins do this
  * in their plugin_init function, libraries and applications should do that
index 92d4f5f..ffef504 100644 (file)
  * increased.  Your code is responsible for unreffing that object after use.
  *
  * The basic use pattern of an iterator is as follows:
- *
- * <example>
- * <title>Using an iterator</title>
- *   <programlisting>
- *    it = _get_iterator(object);
- *    done = FALSE;
- *    while (!done) {
- *      switch (gst_iterator_next (it, &amp;item)) {
- *        case GST_ITERATOR_OK:
- *          ... use/change item here...
- *          g_value_reset (&amp;item);
- *          break;
- *        case GST_ITERATOR_RESYNC:
- *          ...rollback changes to items...
- *          gst_iterator_resync (it);
- *          break;
- *        case GST_ITERATOR_ERROR:
- *          ...wrong parameters were given...
- *          done = TRUE;
- *          break;
- *        case GST_ITERATOR_DONE:
- *          done = TRUE;
- *          break;
- *      }
- *    }
- *    g_value_unset (&amp;item);
- *    gst_iterator_free (it);
- *   </programlisting>
- * </example>
+ * |[
+ *   GstIterator *it = _get_iterator(object);
+ *   done = FALSE;
+ *   while (!done) {
+ *     switch (gst_iterator_next (it, &amp;item)) {
+ *       case GST_ITERATOR_OK:
+ *         ... use/change item here...
+ *         g_value_reset (&amp;item);
+ *         break;
+ *       case GST_ITERATOR_RESYNC:
+ *         ...rollback changes to items...
+ *         gst_iterator_resync (it);
+ *         break;
+ *       case GST_ITERATOR_ERROR:
+ *         ...wrong parameters were given...
+ *         done = TRUE;
+ *         break;
+ *       case GST_ITERATOR_DONE:
+ *         done = TRUE;
+ *         break;
+ *     }
+ *   }
+ *   g_value_unset (&amp;item);
+ *   gst_iterator_free (it);
+ * ]|
  *
  * Last reviewed on 2009-06-16 (0.10.24)
  */
index 287a836..1402a67 100644 (file)
  * application using the #GstBus.
  *
  * The basic use pattern of posting a message on a #GstBus is as follows:
- *
- * <example>
- * <title>Posting a #GstMessage</title>
- *   <programlisting>
- *    gst_bus_post (bus, gst_message_new_eos());
- *   </programlisting>
- * </example>
+ * |[
+ *   gst_bus_post (bus, gst_message_new_eos());
+ * ]|
  *
  * A #GstElement usually posts messages on the bus provided by the parent
  * container using gst_element_post_message().
index c7c4914..c64f9a0 100644 (file)
@@ -54,9 +54,7 @@
  * (see gst_element_class_add_pad_template ()).
  *
  * The following code example shows the code to create a pad from a padtemplate.
- * <example>
- * <title>Create a pad from a padtemplate</title>
- *   <programlisting>
+ * |[
  *   GstStaticPadTemplate my_template =
  *   GST_STATIC_PAD_TEMPLATE (
  *     "sink",          // the name of the pad
  *     pad = gst_pad_new_from_static_template (&amp;my_template, "sink");
  *     ...
  *   }
- *   </programlisting>
- * </example>
+ * ]|
  *
  * 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:
- * <informalexample>
- *   <programlisting>
+ * |[
  *   static void
  *   my_element_class_init (GstMyElementClass *klass)
  *   {
  *     GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
- *
+ *   
  *     gst_element_class_add_pad_template (gstelement_class,
  *         gst_static_pad_template_get (&amp;my_template));
  *   }
- *   </programlisting>
- * </informalexample>
+ * ]|
  *
  * Last reviewed on 2006-02-14 (0.10.3)
  */
index 2de6fe3..64903b7 100644 (file)
  * gst_query_parse_*() helpers.
  *
  * The following example shows how to query the duration of a pipeline:
- *
- * <example>
- *  <title>Query duration on a pipeline</title>
- *  <programlisting>
- *  GstQuery *query;
- *  gboolean res;
- *  query = gst_query_new_duration (GST_FORMAT_TIME);
- *  res = gst_element_query (pipeline, query);
- *  if (res) {
- *    gint64 duration;
- *    gst_query_parse_duration (query, NULL, &amp;duration);
- *    g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
- *  }
- *  else {
- *    g_print ("duration query failed...");
- *  }
- *  gst_query_unref (query);
- *  </programlisting>
- * </example>
+ * |[
+ *   GstQuery *query;
+ *   gboolean res;
+ *   query = gst_query_new_duration (GST_FORMAT_TIME);
+ *   res = gst_element_query (pipeline, query);
+ *   if (res) {
+ *     gint64 duration;
+ *     gst_query_parse_duration (query, NULL, &amp;duration);
+ *     g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
+ *   } else {
+ *     g_print ("duration query failed...");
+ *   }
+ *   gst_query_unref (query);
+ * ]|
  *
  * Last reviewed on 2012-03-29 (0.11.3)
  */
index 92eb52b..de4f493 100644 (file)
  * the section <link linkend="gstreamer-Writing-typefind-functions">
  * "Writing typefind functions"</link>.
  *
- * <example>
- *   <title>how to write a simple typefinder</title>
- *   <programlisting>
+ * 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;
  *     g_list_free (type_list);
  *     return find.caps;
  *   };
- *   </programlisting>
- * </example>
- *
- * The above 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.
+ * ]|
  *
  * Last reviewed on 2005-11-09 (0.9.4)
  */