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