mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
docs: convert the examples to use gtk-doc markup, instead of docbook
The gtk-doc markup is less intrusive and better handled when creating docs for language bindings. The titles (where used) where not adding much.
This commit is contained in:
parent
41cdfb710e
commit
c068b225fe
9 changed files with 75 additions and 112 deletions
|
@ -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;
|
||||
|
@ -45,11 +43,10 @@
|
|||
* 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
|
||||
|
|
|
@ -34,20 +34,15 @@
|
|||
* 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",
|
||||
* |[
|
||||
* 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);
|
||||
* </programlisting>
|
||||
* </example>
|
||||
* ]|
|
||||
*
|
||||
* 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
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
|
|
@ -50,19 +50,15 @@
|
|||
* 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>
|
||||
* #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>
|
||||
* ]|
|
||||
* Initialization must be done before the category is used first.
|
||||
* Plugins do this
|
||||
* in their plugin_init function, libraries and applications should do that
|
||||
|
|
|
@ -37,11 +37,8 @@
|
|||
* 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);
|
||||
* |[
|
||||
* GstIterator *it = _get_iterator(object);
|
||||
* done = FALSE;
|
||||
* while (!done) {
|
||||
* switch (gst_iterator_next (it, &item)) {
|
||||
|
@ -64,8 +61,7 @@
|
|||
* }
|
||||
* g_value_unset (&item);
|
||||
* gst_iterator_free (it);
|
||||
* </programlisting>
|
||||
* </example>
|
||||
* ]|
|
||||
*
|
||||
* Last reviewed on 2009-06-16 (0.10.24)
|
||||
*/
|
||||
|
|
|
@ -34,13 +34,9 @@
|
|||
* 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>
|
||||
* ]|
|
||||
*
|
||||
* A #GstElement usually posts messages on the bus provided by the parent
|
||||
* container using gst_element_post_message().
|
||||
|
|
|
@ -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
|
||||
|
@ -74,13 +72,11 @@
|
|||
* pad = gst_pad_new_from_static_template (&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)
|
||||
* {
|
||||
|
@ -89,8 +85,7 @@
|
|||
* gst_element_class_add_pad_template (gstelement_class,
|
||||
* gst_static_pad_template_get (&my_template));
|
||||
* }
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
* ]|
|
||||
*
|
||||
* Last reviewed on 2006-02-14 (0.10.3)
|
||||
*/
|
||||
|
|
|
@ -36,10 +36,7 @@
|
|||
* 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);
|
||||
|
@ -48,13 +45,11 @@
|
|||
* gint64 duration;
|
||||
* gst_query_parse_duration (query, NULL, &duration);
|
||||
* g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
|
||||
* }
|
||||
* else {
|
||||
* } else {
|
||||
* g_print ("duration query failed...");
|
||||
* }
|
||||
* gst_query_unref (query);
|
||||
* </programlisting>
|
||||
* </example>
|
||||
* ]|
|
||||
*
|
||||
* Last reviewed on 2012-03-29 (0.11.3)
|
||||
*/
|
||||
|
|
|
@ -28,9 +28,10 @@
|
|||
* 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;
|
||||
|
@ -70,12 +71,7 @@
|
|||
* 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)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue