provides all the state necessary to define a region of memory as part of a
stream. Sub-buffer are also supported, allowing a smaller region of a
buffer to become its own buffer, with mechanisms in place to ensure that
-nither memory space goes away. Metadata is supported as a list of
+neither memory space goes away. Metadata is supported as a list of
pointers to arbitrary metadata.
</para>
+<para>
+Buffers are usually created with gst_buffer_new(). After a buffer has been
+created one will typically allocate memory for it and set the size of the
+buffer data.
+<programlisting>
+ GstBuffer *buffer;
+ gint size, widht, height, bpp;
+
+ size = width * height * bpp;
+
+ buffer = gst_buffer_new ();
+ GST_BUFFER_SIZE (buffer) = size;
+ GST_BUFFER_DATA (buffer) = g_alloc (size);
+ ...
+
+</programlisting>
+</para>
+<para>
+GstBuffers can also be created from a GstBufferPool with
+gst_buffer_new_from_pool(). The bufferpool can be obtained from a
+peer element with gst_pad_get_bufferpool().
+</para>
+<para>
+gst_buffer_ref() is used to increase the refcount of a buffer. This must be
+done when you want to keep a handle to the buffer after pushing it to the
+next element.
+</para>
+<para>
+To efficiently create a smaller buffer out of an existing one, you can
+use gst_buffer_create_sub().
+</para>
+<para>
+Several flags of the buffer can be set and unset with the GST_BUFFER_FLAG_SET()
+and GST_BUFFER_FLAG_UNSET() macros. Use GST_BUFFER_FLAG_IS_SET() to test it
+a certain flag is set.
+</para>
+<para>
+Buffers usually are freed by unreffing them with gst_buffer_unref().
+gst_buffer_destroy() can also be used to effectively destroy the buffer
+regardless of the refcount (dangerous).
+</para>
<!-- ##### SECTION See_Also ##### -->
<para>
-
+#GstBufferPool, #GstPad
</para>
<!-- ##### MACRO GST_BUFFER_FLAGS ##### -->
<!-- ##### MACRO GST_BUFFER_MAXSIZE ##### -->
<para>
-
+Gets the maximun size of this buffer.
</para>
@buf: GstBuffer
</para>
-<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
+<!-- ##### FUNCTION gst_fdsink_chain ##### -->
<para>
</para>
@pad:
-@parent:
+@buf:
-<!-- ##### FUNCTION gst_fdsink_chain ##### -->
+<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
<para>
</para>
@pad:
-@buf:
+@parent:
<!-- ##### ARG GstHttpSrc:location ##### -->
<para>
@pad:
@buf:
-<!-- ##### FUNCTION gst_connection_get_type ##### -->
+<!-- ##### FUNCTION gst_audiosink_chain ##### -->
<para>
</para>
-@Returns:
+@pad:
+@buf:
-<!-- ##### FUNCTION gst_audiosink_chain ##### -->
+<!-- ##### FUNCTION gst_connection_get_type ##### -->
<para>
</para>
-@pad:
-@buf:
+@Returns:
<!-- ##### MACRO GST_PIPELINE_CLASS ##### -->
<para>
@gstsrc: the object which received the signal.
@arg1: the object which received the signal
-<!-- ##### TYPEDEF GstCapsFactoryEntry ##### -->
+<!-- ##### FUNCTION gst_disksrc_get_type ##### -->
<para>
</para>
+@Returns:
-<!-- ##### FUNCTION gst_disksrc_get_type ##### -->
+<!-- ##### TYPEDEF GstCapsFactoryEntry ##### -->
<para>
</para>
-@Returns:
<!-- ##### MACRO GST_IS_DISKSRC_CLASS ##### -->
<para>
@audiosink:
@channels:
-<!-- ##### SECTION ./tmpl/gstconnection.sgml:Short_Description ##### -->
-Generic connection between elements.
-
-
<!-- ##### STRUCT GstSinkClass ##### -->
<para>
</para>
+<!-- ##### SECTION ./tmpl/gstconnection.sgml:Short_Description ##### -->
+Generic connection between elements.
+
+
<!-- ##### STRUCT GstFilterClass ##### -->
<para>
@sheight:
@bytes_per_line:
-<!-- ##### SECTION ./tmpl/GstElement.sgml:Long_Description ##### -->
+<!-- ##### ARG GstAudioSink:format ##### -->
<para>
</para>
-<!-- ##### ARG GstAudioSink:format ##### -->
+<!-- ##### SECTION ./tmpl/GstElement.sgml:Long_Description ##### -->
<para>
</para>
@name:
@Returns:
-<!-- ##### STRUCT GstConnection ##### -->
+<!-- ##### STRUCT GstQueueClass ##### -->
<para>
</para>
-<!-- ##### STRUCT GstQueueClass ##### -->
+<!-- ##### STRUCT GstConnection ##### -->
<para>
</para>
-<!-- ##### FUNCTION gst_fakesrc_push ##### -->
+<!-- ##### FUNCTION gst_type_add_sink ##### -->
<para>
</para>
-@src:
+@id:
+@sink:
-<!-- ##### FUNCTION gst_type_add_sink ##### -->
+<!-- ##### FUNCTION gst_fakesrc_push ##### -->
<para>
</para>
-@id:
-@sink:
+@src:
<!-- ##### MACRO GST_IS_IDENTITY_CLASS ##### -->
<para>
@obj:
-<!-- ##### MACRO GST_IS_QUEUE_CLASS ##### -->
+<!-- ##### FUNCTION gst_fdsrc_get_type ##### -->
<para>
</para>
-@obj:
+@Returns:
-<!-- ##### FUNCTION gst_fdsrc_get_type ##### -->
+<!-- ##### MACRO GST_IS_QUEUE_CLASS ##### -->
<para>
</para>
-@Returns:
+@obj:
<!-- ##### FUNCTION gst_pad_get_type_id ##### -->
<para>
@pad:
@Returns:
-<!-- ##### FUNCTION gst_thread_iterate ##### -->
-<para>
-
-</para>
-
-@thread:
-
<!-- ##### STRUCT OverlayClip ##### -->
<para>
@y1:
@y2:
+<!-- ##### FUNCTION gst_thread_iterate ##### -->
+<para>
+
+</para>
+
+@thread:
+
<!-- ##### ENUM GstSrcFlags ##### -->
<para>
Flags for the GstSrc element
@obj:
-<!-- ##### FUNCTION gst_asyncdisksrc_get_type ##### -->
+<!-- ##### MACRO GST_AUDIOSINK_CLASS ##### -->
<para>
</para>
-@Returns:
+@klass:
-<!-- ##### MACRO GST_AUDIOSINK_CLASS ##### -->
+<!-- ##### FUNCTION gst_asyncdisksrc_get_type ##### -->
<para>
</para>
-@klass:
+@Returns:
<!-- ##### MACRO GST_PAD_FACTORY_SINK ##### -->
<para>
@pad:
@Returns:
-<!-- ##### MACRO GST_PROPS_FOURCC_ID ##### -->
+<!-- ##### FUNCTION gst_esdsink_new ##### -->
<para>
</para>
+@name:
+@Returns:
-<!-- ##### FUNCTION gst_esdsink_new ##### -->
+<!-- ##### MACRO GST_PROPS_FOURCC_ID ##### -->
<para>
</para>
-@name:
-@Returns:
<!-- ##### FUNCTION gst_element_request_pad ##### -->
<para>
@flag: Flag to set, can by any number of bits in guint32.
@obj: GstSrc to set flag in.
-<!-- ##### MACRO GST_PROPS_FLOAT_STRING ##### -->
+<!-- ##### MACRO DEBUG_LEAVE_STRING ##### -->
<para>
</para>
-@a:
-<!-- ##### MACRO DEBUG_LEAVE_STRING ##### -->
+<!-- ##### MACRO GST_PROPS_FLOAT_STRING ##### -->
<para>
</para>
+@a:
<!-- ##### FUNCTION gst_filter_get_type ##### -->
<para>
</para>
-<!-- ##### SECTION ./tmpl/gstsink.sgml:Title ##### -->
-GstSink
-
-
<!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
<para>
A flag indicating that MMX instructions are supported.
</para>
+<!-- ##### SECTION ./tmpl/gstsink.sgml:Title ##### -->
+GstSink
+
+
<!-- ##### FUNCTION gst_object_get_type ##### -->
<para>
</para>
-<!-- ##### MACRO GST_IS_BIN_CLASS ##### -->
+<!-- ##### FUNCTION gst_esdsink_get_type ##### -->
<para>
</para>
-@obj:
+@Returns:
-<!-- ##### FUNCTION gst_esdsink_get_type ##### -->
+<!-- ##### MACRO GST_IS_BIN_CLASS ##### -->
<para>
</para>
-@Returns:
+@obj:
<!-- ##### SECTION ./tmpl/GstElement.sgml:See_Also ##### -->
<para>
@obj: Element to query for multiple input pads.
-<!-- ##### SECTION ./tmpl/gstfilter.sgml:See_Also ##### -->
+<!-- ##### MACRO DEBUG_NOPREFIX ##### -->
<para>
</para>
+@format:
+@args...:
-<!-- ##### MACRO DEBUG_NOPREFIX ##### -->
+<!-- ##### SECTION ./tmpl/gstfilter.sgml:See_Also ##### -->
<para>
</para>
-@format:
-@args...:
<!-- ##### ARG GstAudioSink:frequency ##### -->
<para>
@audiosink:
-<!-- ##### MACRO GST_IS_FAKESINK ##### -->
-<para>
-
-</para>
-
-@obj:
-
<!-- ##### MACRO GST_STATE_UNSET ##### -->
<para>
This macro unsets the given state on the element.
@obj: Element to unset state of.
@flag: State to unset, can be any number of bits in guint32.
+<!-- ##### MACRO GST_IS_FAKESINK ##### -->
+<para>
+
+</para>
+
+@obj:
+
<!-- ##### MACRO GST_QUEUE_CLASS ##### -->
<para>
@obj:
-<!-- ##### MACRO ERROR_OBJECT ##### -->
+<!-- ##### FUNCTION gst_sinesrc_get_type ##### -->
<para>
</para>
-@element:
-@object:
-@format:
-@args...:
+@Returns:
-<!-- ##### FUNCTION gst_sinesrc_get_type ##### -->
+<!-- ##### MACRO ERROR_OBJECT ##### -->
<para>
</para>
-@Returns:
+@element:
+@object:
+@format:
+@args...:
<!-- ##### MACRO GST_IS_IDENTITY ##### -->
<para>
@obj:
-<!-- ##### SECTION ./tmpl/videoraw.sgml:Short_Description ##### -->
-Information about video buffers.
+<!-- ##### FUNCTION gst_src_push_region ##### -->
+<para>
+
+</para>
+@src:
+@offset:
+@size:
<!-- ##### FUNCTION gst_fdsink_get_type ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gst_src_push_region ##### -->
-<para>
-
-</para>
+<!-- ##### SECTION ./tmpl/videoraw.sgml:Short_Description ##### -->
+Information about video buffers.
-@src:
-@offset:
-@size:
<!-- ##### STRUCT GstPipelineClass ##### -->
<para>
@obj:
-<!-- ##### ARG GstAsyncDiskSrc:size ##### -->
+<!-- ##### STRUCT GstDiskSrcClass ##### -->
<para>
</para>
-<!-- ##### STRUCT GstDiskSrcClass ##### -->
+<!-- ##### ARG GstAsyncDiskSrc:size ##### -->
<para>
</para>
</para>
-<!-- ##### FUNCTION plugin_initialize ##### -->
+<!-- ##### FUNCTION gst_caps_register ##### -->
<para>
</para>
+@factory:
+@Returns:
-<!-- ##### FUNCTION gst_caps_register ##### -->
+<!-- ##### FUNCTION plugin_initialize ##### -->
<para>
</para>
-@factory:
-@Returns:
<!-- ##### ARG GstAsyncDiskSrc:location ##### -->
<para>
</para>
-<!-- ##### FUNCTION gst_sinesrc_new ##### -->
+<!-- ##### MACRO GST_IS_ASYNCDISKSRC_CLASS ##### -->
<para>
</para>
-@name:
-@Returns:
+@obj:
-<!-- ##### MACRO GST_IS_ASYNCDISKSRC_CLASS ##### -->
+<!-- ##### FUNCTION gst_sinesrc_new ##### -->
<para>
</para>
-@obj:
+@name:
+@Returns:
<!-- ##### ARG GstAudioSrc:curoffset ##### -->
<para>
@klass:
-<!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
+<!-- ##### MACRO GST_ASYNCDISKSRC ##### -->
<para>
</para>
-@klass:
+@obj:
-<!-- ##### MACRO GST_ASYNCDISKSRC ##### -->
+<!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
<para>
</para>
-@obj:
+@klass:
<!-- ##### ARG GstPad:active ##### -->
<para>