Commit ce67b0e5 authored by Wim Taymans's avatar Wim Taymans

docs: update more documentation

parent 9aa97519
This diff is collapsed.
...@@ -488,7 +488,7 @@ GstBuffer* gst_buffer_append (GstBuffer *buf1, GstBuffer *buf ...@@ -488,7 +488,7 @@ GstBuffer* gst_buffer_append (GstBuffer *buf1, GstBuffer *buf
#include <gst/gstmeta.h> #include <gst/gstmeta.h>
/** /**
* GstBufferMetaFunc: * GstBufferForeachMetaFunc:
* @buffer: a #GstBuffer * @buffer: a #GstBuffer
* @meta: a pointer to a #GstMeta * @meta: a pointer to a #GstMeta
* @user_data: user data passed to gst_buffer_foreach_meta() * @user_data: user data passed to gst_buffer_foreach_meta()
......
...@@ -280,6 +280,15 @@ gst_buffer_list_insert (GstBufferList * list, guint idx, GstBuffer * buffer) ...@@ -280,6 +280,15 @@ gst_buffer_list_insert (GstBufferList * list, guint idx, GstBuffer * buffer)
} }
} }
/**
* gst_buffer_list_remove:
* @list: a #GstBufferList
* @idx: the index
* @length: the amount to remove
*
* Remove @length buffers starting from @idx in @list. The following buffers are
* moved to close the gap.
*/
void void
gst_buffer_list_remove (GstBufferList * list, guint idx, guint length) gst_buffer_list_remove (GstBufferList * list, guint idx, guint length)
{ {
......
...@@ -1437,16 +1437,44 @@ invalid: ...@@ -1437,16 +1437,44 @@ invalid:
} }
} }
/**
* gst_clock_set_timeout:
* @clock: a #GstClock
* @timeout: a timeout
*
* Set the amount of time, in nanoseconds, to sample master and slave
* clocks
*/
void void
gst_clock_set_timeout (GstClock * clock, GstClockTime timeout) gst_clock_set_timeout (GstClock * clock, GstClockTime timeout)
{ {
g_return_if_fail (GST_IS_CLOCK (clock));
GST_CLOCK_SLAVE_LOCK (clock);
clock->priv->timeout = timeout; clock->priv->timeout = timeout;
GST_CLOCK_SLAVE_UNLOCK (clock);
} }
/**
* gst_clock_get_timeout:
* @clock: a #GstClock
*
* Get the amount of time that master and slave clocks are sampled.
*
* Returns: the interval between samples.
*/
GstClockTime GstClockTime
gst_clock_get_timeout (GstClock * clock) gst_clock_get_timeout (GstClock * clock)
{ {
return clock->priv->timeout; GstClockTime result;
g_return_val_if_fail (GST_IS_CLOCK (clock), GST_CLOCK_TIME_NONE);
GST_CLOCK_SLAVE_LOCK (clock);
result = clock->priv->timeout;
GST_CLOCK_SLAVE_UNLOCK (clock);
return result;
} }
static void static void
...@@ -1476,9 +1504,7 @@ gst_clock_set_property (GObject * object, guint prop_id, ...@@ -1476,9 +1504,7 @@ gst_clock_set_property (GObject * object, guint prop_id,
GST_CLOCK_SLAVE_UNLOCK (clock); GST_CLOCK_SLAVE_UNLOCK (clock);
break; break;
case PROP_TIMEOUT: case PROP_TIMEOUT:
GST_CLOCK_SLAVE_LOCK (clock); gst_clock_set_timeout (clock, g_value_get_uint64 (value));
priv->timeout = g_value_get_uint64 (value);
GST_CLOCK_SLAVE_UNLOCK (clock);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
...@@ -1508,9 +1534,7 @@ gst_clock_get_property (GObject * object, guint prop_id, ...@@ -1508,9 +1534,7 @@ gst_clock_get_property (GObject * object, guint prop_id,
GST_CLOCK_SLAVE_UNLOCK (clock); GST_CLOCK_SLAVE_UNLOCK (clock);
break; break;
case PROP_TIMEOUT: case PROP_TIMEOUT:
GST_CLOCK_SLAVE_LOCK (clock); g_value_set_uint64 (value, gst_clock_get_timeout (clock));
g_value_set_uint64 (value, priv->timeout);
GST_CLOCK_SLAVE_UNLOCK (clock);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......
...@@ -492,6 +492,16 @@ gst_element_factory_get_element_type (GstElementFactory * factory) ...@@ -492,6 +492,16 @@ gst_element_factory_get_element_type (GstElementFactory * factory)
return factory->type; return factory->type;
} }
/**
* gst_element_factory_get_metadata:
* @factory,: a #GstElementFactory
* @key: a key
*
* Get the metadata on @factory with @key.
*
* Returns: the metadata with @key on @factory or %NULL when there was no
* metadata with the given @key.
*/
const gchar * const gchar *
gst_element_factory_get_metadata (GstElementFactory * factory, gst_element_factory_get_metadata (GstElementFactory * factory,
const gchar * key) const gchar * key)
......
...@@ -592,6 +592,7 @@ gst_event_new_gap (GstClockTime timestamp, GstClockTime duration) ...@@ -592,6 +592,7 @@ gst_event_new_gap (GstClockTime timestamp, GstClockTime duration)
/** /**
* gst_event_parse_gap: * gst_event_parse_gap:
* @event: a #GstEvent of type #GST_EVENT_GAP
* @timestamp: (out) (allow-none): location where to store the * @timestamp: (out) (allow-none): location where to store the
* start time (pts) of the gap, or %NULL * start time (pts) of the gap, or %NULL
* @duration: (out) (allow-none): location where to store the duration of * @duration: (out) (allow-none): location where to store the duration of
...@@ -738,7 +739,7 @@ gst_event_set_stream_config_setup_data (GstEvent * event, GstBuffer * buf) ...@@ -738,7 +739,7 @@ gst_event_set_stream_config_setup_data (GstEvent * event, GstBuffer * buf)
} }
/** /**
* gst_event_set_stream_config_setup_data: * gst_event_parse_stream_config_setup_data:
* @event: a stream config event * @event: a stream config event
* @buf: (out) (transfer none): location where to store the #GstBuffer with setup data * @buf: (out) (transfer none): location where to store the #GstBuffer with setup data
* *
......
...@@ -62,7 +62,6 @@ typedef enum { ...@@ -62,7 +62,6 @@ typedef enum {
/** /**
* GST_EVENT_MAKE_TYPE: * GST_EVENT_MAKE_TYPE:
* @num: the event number to create * @num: the event number to create
* @idx: the index in the sticky array
* @flags: the event flags * @flags: the event flags
* *
* when making custom event types, use this macro with the num and * when making custom event types, use this macro with the num and
......
...@@ -73,6 +73,14 @@ ...@@ -73,6 +73,14 @@
#include "gst_private.h" #include "gst_private.h"
#include <gst/gstiterator.h> #include <gst/gstiterator.h>
/**
* gst_iterator_copy:
* @it: a #GstIterator
*
* Copy the iterator and its state.
*
* Returns: a new copy of @it.
*/
GstIterator * GstIterator *
gst_iterator_copy (const GstIterator * it) gst_iterator_copy (const GstIterator * it)
{ {
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
* *
* New allocators can be registered with gst_allocator_register(). * New allocators can be registered with gst_allocator_register().
* Allocators are identified by name and can be retrieved with * Allocators are identified by name and can be retrieved with
* gst_allocator_find(). * gst_allocator_find(). gst_allocator_set_default() can be used to change the
* default allocator.
* *
* New memory can be created with gst_memory_new_wrapped() that wraps the memory * New memory can be created with gst_memory_new_wrapped() that wraps the memory
* allocated elsewhere. * allocated elsewhere.
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
* *
* Memory can be efficiently merged when gst_memory_is_span() returns TRUE. * Memory can be efficiently merged when gst_memory_is_span() returns TRUE.
* *
* Last reviewed on 2011-06-08 (0.11.0) * Last reviewed on 2012-03-28 (0.11.3)
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
...@@ -86,12 +87,6 @@ G_DEFINE_BOXED_TYPE (GstAllocationParams, gst_allocation_params, ...@@ -86,12 +87,6 @@ G_DEFINE_BOXED_TYPE (GstAllocationParams, gst_allocation_params,
(GBoxedCopyFunc) gst_allocation_params_copy, (GBoxedCopyFunc) gst_allocation_params_copy,
(GBoxedFreeFunc) gst_allocation_params_free); (GBoxedFreeFunc) gst_allocation_params_free);
/**
* gst_memory_alignment:
*
* The default memory alignment in bytes - 1
* an alignment of 7 would be the same as what malloc() guarantees.
*/
#if defined(MEMORY_ALIGNMENT_MALLOC) #if defined(MEMORY_ALIGNMENT_MALLOC)
size_t gst_memory_alignment = 7; size_t gst_memory_alignment = 7;
#elif defined(MEMORY_ALIGNMENT_PAGESIZE) #elif defined(MEMORY_ALIGNMENT_PAGESIZE)
...@@ -815,7 +810,7 @@ gst_memory_is_span (GstMemory * mem1, GstMemory * mem2, gsize * offset) ...@@ -815,7 +810,7 @@ gst_memory_is_span (GstMemory * mem1, GstMemory * mem2, gsize * offset)
} }
/** /**
* gst_allocator_register: * gst_allocator_new:
* @info: a #GstMemoryInfo * @info: a #GstMemoryInfo
* @user_data: user data * @user_data: user data
* @notify: a #GDestroyNotify for @user_data * @notify: a #GDestroyNotify for @user_data
...@@ -865,7 +860,7 @@ gst_allocator_new (const GstMemoryInfo * info, gpointer user_data, ...@@ -865,7 +860,7 @@ gst_allocator_new (const GstMemoryInfo * info, gpointer user_data,
} }
/** /**
* gst_alocator_get_memory_type: * gst_allocator_get_memory_type:
* @allocator: a #GstAllocator * @allocator: a #GstAllocator
* *
* Get the memory type allocated by this allocator * Get the memory type allocated by this allocator
...@@ -881,7 +876,7 @@ gst_allocator_get_memory_type (GstAllocator * allocator) ...@@ -881,7 +876,7 @@ gst_allocator_get_memory_type (GstAllocator * allocator)
} }
/** /**
* gst_alocator_ref: * gst_allocator_ref:
* @allocator: a #GstAllocator * @allocator: a #GstAllocator
* *
* Increases the refcount of @allocator. * Increases the refcount of @allocator.
...@@ -893,7 +888,7 @@ gst_allocator_ref (GstAllocator * allocator) ...@@ -893,7 +888,7 @@ gst_allocator_ref (GstAllocator * allocator)
{ {
g_return_val_if_fail (allocator != NULL, NULL); g_return_val_if_fail (allocator != NULL, NULL);
GST_CAT_TRACE (GST_CAT_MEMORY, "alocator %p, %d->%d", allocator, GST_CAT_TRACE (GST_CAT_MEMORY, "allocator %p, %d->%d", allocator,
allocator->refcount, allocator->refcount + 1); allocator->refcount, allocator->refcount + 1);
g_atomic_int_inc (&allocator->refcount); g_atomic_int_inc (&allocator->refcount);
......
...@@ -43,6 +43,12 @@ typedef struct _GstMemoryInfo GstMemoryInfo; ...@@ -43,6 +43,12 @@ typedef struct _GstMemoryInfo GstMemoryInfo;
typedef struct _GstAllocator GstAllocator; typedef struct _GstAllocator GstAllocator;
typedef struct _GstAllocationParams GstAllocationParams; typedef struct _GstAllocationParams GstAllocationParams;
/**
* gst_memory_alignment:
*
* The default memory alignment in bytes - 1
* an alignment of 7 would be the same as what malloc() guarantees.
*/
GST_EXPORT gsize gst_memory_alignment; GST_EXPORT gsize gst_memory_alignment;
#define GST_MEMORY_CAST(mem) ((GstMemory *)(mem)) #define GST_MEMORY_CAST(mem) ((GstMemory *)(mem))
...@@ -181,6 +187,11 @@ typedef struct { ...@@ -181,6 +187,11 @@ typedef struct {
gpointer user_data[4]; gpointer user_data[4];
} GstMapInfo; } GstMapInfo;
/**
* GST_MAP_INFO_INIT:
*
* Initializer for #GstMapInfo
*/
#define GST_MAP_INFO_INIT { NULL, 0, NULL, 0, 0, } #define GST_MAP_INFO_INIT { NULL, 0, NULL, 0, 0, }
/** /**
...@@ -345,6 +356,13 @@ struct _GstMemoryInfo { ...@@ -345,6 +356,13 @@ struct _GstMemoryInfo {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
/**
* GstAllocator:
*
* An opaque type returned from gst_allocator_new() or gst_allocator_find()
* that can be used to allocator memory.
*/
/* allocators */ /* allocators */
GstAllocator * gst_allocator_new (const GstMemoryInfo * info, GstAllocator * gst_allocator_new (const GstMemoryInfo * info,
gpointer user_data, GDestroyNotify notify); gpointer user_data, GDestroyNotify notify);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
* *
* Messages are posted by objects in the pipeline and are passed to the * Messages are posted by objects in the pipeline and are passed to the
* application using the #GstBus. * application using the #GstBus.
*
* The basic use pattern of posting a message on a #GstBus is as follows: * The basic use pattern of posting a message on a #GstBus is as follows:
* *
* <example> * <example>
......
...@@ -23,7 +23,27 @@ ...@@ -23,7 +23,27 @@
* SECTION:gstmeta * SECTION:gstmeta
* @short_description: Buffer metadata * @short_description: Buffer metadata
* *
* Last reviewed on December 17th, 2009 (0.10.26) * The #GstMeta structure should be included as the first member of a #GstBuffer
* metadata structure. The structure defines the API of the metadata and should
* be accessible to all elements using the metadata.
*
* A metadata API is registered with gst_meta_api_type_register() which takes a
* name for the metadata API and some tags associated with the metadata.
* With gst_meta_api_type_has_tag() one can check if a certain metadata API
* contains a given tag.
*
* Multiple implementations of a metadata API can be registered.
* To implement a metadata API, gst_meta_register() should be used. This
* function takes all parameters needed to create, free and transform metadata
* along with the size of the metadata. The function returns a #GstMetaInfo
* structure that contains the information for the implementation of the API.
*
* A specific implementation can be retrieved by name with gst_meta_get_info().
*
* See #GstBuffer for how the metadata can be added, retrieved and removed from
* buffers.
*
* Last reviewed on 2012-03-28 (0.11.3)
*/ */
#include "gst_private.h" #include "gst_private.h"
......
...@@ -119,6 +119,12 @@ typedef void (*GstMetaFreeFunction) (GstMeta *meta, GstBuffer *buffer); ...@@ -119,6 +119,12 @@ typedef void (*GstMetaFreeFunction) (GstMeta *meta, GstBuffer *buffer);
*/ */
GST_EXPORT GQuark _gst_meta_transform_copy; GST_EXPORT GQuark _gst_meta_transform_copy;
/**
* GST_META_TRANSFORM_IS_COPY:
* @type: a transform type
*
* Check if the transform type is a copy transform
*/
#define GST_META_TRANSFORM_IS_COPY(type) ((type) == _gst_meta_transform_copy) #define GST_META_TRANSFORM_IS_COPY(type) ((type) == _gst_meta_transform_copy)
/** /**
......
...@@ -22,12 +22,25 @@ ...@@ -22,12 +22,25 @@
* SECTION:gstminiobject * SECTION:gstminiobject
* @short_description: Lightweight base class for the GStreamer object hierarchy * @short_description: Lightweight base class for the GStreamer object hierarchy
* *
* #GstMiniObject is a baseclass like #GObject, but has been stripped down of * #GstMiniObject is a simple structure that can be used to implement refcounted
* features to be fast and small. * types.
* It offers sub-classing and ref-counting in the same way as #GObject does.
* It has no properties and no signal-support though.
* *
* Last reviewed on 2005-11-23 (0.9.5) * Subclasses will include #GstMiniObject as the first member in their structure
* and then call gst_mini_object_init() to initialize the #GstMiniObject fields.
*
* gst_mini_object_ref() and gst_mini_object_unref() increment and decrement the
* refcount respectively. When the refcount of a mini-object reaches 0, the
* dispose function is called first and when this returns %TRUE, the free
* function of the miniobject is called.
*
* A copy can be made with gst_mini_object_copy().
*
* gst_mini_object_is_writable() will return %TRUE when the refcount of the
* object is exactly 1, meaning the current caller has the only reference to the
* object. gst_mini_object_make_writable() will return a writable version of the
* object, which might be a new copy when the refcount was not 1.
*
* Last reviewed on 2012-03-28 (0.11.3)
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
......
...@@ -84,10 +84,10 @@ typedef void (*GstMiniObjectWeakNotify) (gpointer data, ...@@ -84,10 +84,10 @@ typedef void (*GstMiniObjectWeakNotify) (gpointer data,
GstMiniObject * where_the_mini_object_was); GstMiniObject * where_the_mini_object_was);
/** /**
* GST_MINI_OBJECT_FLAGS: * GST_MINI_OBJECT_TYPE:
* @obj: MiniObject to return flags for. * @obj: MiniObject to return type for.
* *
* This macro returns the entire set of flags for the mini-object. * This macro returns the type of the mini-object.
*/ */
#define GST_MINI_OBJECT_TYPE(obj) (GST_MINI_OBJECT_CAST(obj)->type) #define GST_MINI_OBJECT_TYPE(obj) (GST_MINI_OBJECT_CAST(obj)->type)
/** /**
...@@ -217,6 +217,13 @@ gboolean gst_mini_object_replace (GstMiniObject **olddata, GstMin ...@@ -217,6 +217,13 @@ gboolean gst_mini_object_replace (GstMiniObject **olddata, GstMin
gboolean gst_mini_object_take (GstMiniObject **olddata, GstMiniObject *newdata); gboolean gst_mini_object_take (GstMiniObject **olddata, GstMiniObject *newdata);
GstMiniObject * gst_mini_object_steal (GstMiniObject **olddata); GstMiniObject * gst_mini_object_steal (GstMiniObject **olddata);
/**
* GST_DEFINE_MINI_OBJECT_TYPE:
* @TypeName: name of the new type in CamelCase
* @type_name: name of the new type
*
* Define a new mini-object type with the given name
*/
#define GST_DEFINE_MINI_OBJECT_TYPE(TypeName,type_name) \ #define GST_DEFINE_MINI_OBJECT_TYPE(TypeName,type_name) \
G_DEFINE_BOXED_TYPE(TypeName,type_name, \ G_DEFINE_BOXED_TYPE(TypeName,type_name, \
(GBoxedCopyFunc) gst_mini_object_ref, \ (GBoxedCopyFunc) gst_mini_object_ref, \
......
...@@ -27,54 +27,16 @@ ...@@ -27,54 +27,16 @@
* *
* #GstObject provides a root for the object hierarchy tree filed in by the * #GstObject provides a root for the object hierarchy tree filed in by the
* GStreamer library. It is currently a thin wrapper on top of * GStreamer library. It is currently a thin wrapper on top of
* #GObject. It is an abstract class that is not very usable on its own. * #GInitiallyUnowned. It is an abstract class that is not very usable on its own.
* *
* #GstObject gives us basic refcounting, parenting functionality and locking. * #GstObject gives us basic refcounting, parenting functionality and locking.
* Most of the function are just extended for special GStreamer needs and can be * Most of the function are just extended for special GStreamer needs and can be
* found under the same name in the base class of #GstObject which is #GObject * found under the same name in the base class of #GstObject which is #GObject
* (e.g. g_object_ref() becomes gst_object_ref()). * (e.g. g_object_ref() becomes gst_object_ref()).
* *
* The most interesting difference between #GstObject and #GObject is the * Since #GstObject dereives from #GInitiallyUnowned, it also inherits the
* "floating" reference count. A #GObject is created with a reference count of * floating reference. Be aware that functions such as gst_bin_add() and
* 1, owned by the creator of the #GObject. (The owner of a reference is the * gst_element_add_pad() take ownership of the floating reference.
* code section that has the right to call gst_object_unref() in order to
* remove that reference.) A #GstObject is created with a reference count of 1
* also, but it isn't owned by anyone; Instead, the initial reference count
* of a #GstObject is "floating". The floating reference can be removed by
* anyone at any time, by calling gst_object_sink(). gst_object_sink() does
* nothing if an object is already sunk (has no floating reference).
*
* When you add a #GstElement to its parent container, the parent container will
* do this:
* <informalexample>
* <programlisting>
* gst_object_ref (GST_OBJECT (child_element));
* gst_object_sink (GST_OBJECT (child_element));
* </programlisting>
* </informalexample>
* This means that the container now owns a reference to the child element
* (since it called gst_object_ref()), and the child element has no floating
* reference.
*
* The purpose of the floating reference is to keep the child element alive
* until you add it to a parent container, which then manages the lifetime of
* the object itself:
* <informalexample>
* <programlisting>
* element = gst_element_factory_make (factoryname, name);
* // element has one floating reference to keep it alive
* gst_bin_add (GST_BIN (bin), element);
* // element has one non-floating reference owned by the container
* </programlisting>
* </informalexample>
*
* Another effect of this is, that calling gst_object_unref() on a bin object,
* will also destoy all the #GstElement objects in it. The same is true for
* calling gst_bin_remove().
*
* Special care has to be taken for all methods that gst_object_sink() an object
* since if the caller of those functions had a floating reference to the object,
* the object reference is now invalid.
* *
* In contrast to #GObject instances, #GstObject adds a name property. The functions * In contrast to #GObject instances, #GstObject adds a name property. The functions
* gst_object_set_name() and gst_object_get_name() are used to set/get the name * gst_object_set_name() and gst_object_get_name() are used to set/get the name
...@@ -131,7 +93,7 @@ ...@@ -131,7 +93,7 @@
* </para> * </para>
* </refsect2> * </refsect2>
* *
* Last reviewed on 2005-11-09 (0.9.4) * Last reviewed on 2012-03-29 (0.11.3)
*/ */
#include "gst_private.h" #include "gst_private.h"
......
...@@ -23,41 +23,69 @@ ...@@ -23,41 +23,69 @@
* SECTION:gstpad * SECTION:gstpad
* @short_description: Object contained by elements that allows links to * @short_description: Object contained by elements that allows links to
* other elements * other elements
* @see_also: #GstPadTemplate, #GstElement, #GstEvent * @see_also: #GstPadTemplate, #GstElement, #GstEvent, #GstQuery, #GstBuffer
* *
* A #GstElement is linked to other elements via "pads", which are extremely * A #GstElement is linked to other elements via "pads", which are extremely
* light-weight generic link points. * light-weight generic link points.
* After two pads are retrieved from an element with gst_element_get_pad(),
* the pads can be link with gst_pad_link(). (For quick links,
* you can also use gst_element_link(), which will make the obvious
* link for you if it's straightforward.)
* *
* Pads are typically created from a #GstPadTemplate with * Pads have a #GstPadDirection, source pads produce data, sink pads consume
* gst_pad_new_from_template(). * data.
* *
* Pads have #GstCaps attached to it to describe the media type they are * Pads are typically created from a #GstPadTemplate with
* capable of dealing with. gst_pad_query_caps() and gst_pad_set_caps() are * gst_pad_new_from_template() and are then added to a #GstElement. This usually
* used to manipulate the caps of the pads. * happens when the element is created but it can also happen dynamically based
* Pads created from a pad template cannot set capabilities that are * on the data that the element is processing or based on the pads that the
* incompatible with the pad template capabilities. * application requests.
* *
* Pads without pad templates can be created with gst_pad_new(), * Pads without pad templates can be created with gst_pad_new(),
* which takes a direction and a name as an argument. If the name is NULL, * which takes a direction and a name as an argument. If the name is NULL,
* then a guaranteed unique name will be assigned to it. * then a guaranteed unique name will be assigned to it.
* *
* A #GstElement creating a pad will typically use the various
* gst_pad_set_*_function() calls to register callbacks for events, queries or
* dataflow on the pads.
*
* gst_pad_get_parent() will retrieve the #GstElement that owns the pad. * gst_pad_get_parent() will retrieve the #GstElement that owns the pad.
* *
* A #GstElement creating a pad will typically use the various * After two pads are retrieved from an element with gst_element_get_pad(),
* gst_pad_set_*_function() calls to register callbacks for various events * the pads can be linked with gst_pad_link(). (For quick links,
* on the pads. * you can also use gst_element_link(), which will make the obvious
* link for you if it's straightforward.). Pads can be unlinked again with
* gst_pad_unlink(). gst_pad_get_peer() can be used to check what the pad is
* linked to.
*
* Before dataflow is possible on the pads, they need to be activated with
* gst_pad_set_active().
*
* gst_pad_query() and gst_pad_peer_query() can be used to query various
* properties of the pad and the stream.
*
* To send a #GstEvent on a pad, use gst_pad_send_event() and
* gst_pad_push_event(). Some events will be sticky on the pad, meaning that
* after they pass on the pad they can be queried later with
* gst_pad_get_sticky_event() and gst_pad_sticky_events_foreach().
* gst_pad_get_current_caps() and gst_pad_has_current_caps() are convenience
* functions to query the current sticky CAPS event on a pad.
* *
* GstElements will use gst_pad_push() and gst_pad_pull_range() to push out * GstElements will use gst_pad_push() and gst_pad_pull_range() to push out
* or pull in a buffer. * or pull in a buffer.
* *
* To send a #GstEvent on a pad, use gst_pad_send_event() and * The dataflow, events and queries that happen on a pad can be monitored with
* gst_pad_push_event(). * probes that can be installed with gst_pad_add_probe(). gst_pad_is_blocked()
* can be used to check if a block probe is installed on the pad.
* gst_pad_is_blocking() checks if the blocking probe is currently blocking the
* pad. gst_pad_remove_probe() is used to remove a previously installed probe