docs: annotate C examples as such

https://bugzilla.gnome.org/show_bug.cgi?id=731292
This commit is contained in:
Evan Nemerson 2014-06-05 13:27:28 -07:00 committed by Tim-Philipp Müller
parent ac12ad076f
commit d11e657412
18 changed files with 24 additions and 24 deletions

View 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;

View 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.

View 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.

View file

@ -221,7 +221,7 @@ G_STMT_START { \
* the matching arguments.
*
* Example:
* |[
* |[<!-- language="C" -->
* printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts));
* ]|
*/

View 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;
* ...

View file

@ -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.
* |[
* |[<!-- 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");
* ]|

View 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);

View 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;

View 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: {

View 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)
* {

View 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);

View 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);

View 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.

View 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;

View 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;

View 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)
* {

View 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)
* {

View file

@ -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:
* |[
* |[<!-- language="C" -->
* static void
* my_element_class_init (GstMyElementClass *klass)
* {