| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GstBuffer</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual"> |
| <link rel="up" href="libgstreamer.html" title="GStreamer Core Library"> |
| <link rel="prev" href="GstBin.html" title="GstBin"> |
| <link rel="next" href="gstreamer-GstBufferList.html" title="GstBufferList"> |
| <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="GstBin.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th> |
| <td><a accesskey="n" href="gstreamer-GstBufferList.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#gstreamer-GstBuffer.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#gstreamer-GstBuffer.description" class="shortcut">Description</a> |
| </td></tr> |
| </table> |
| <div class="refentry"> |
| <a name="gstreamer-GstBuffer"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="gstreamer-GstBuffer.top_of_page"></a>GstBuffer</span></h2> |
| <p>GstBuffer — Data-passing buffer type, supporting sub-buffers.</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv"> |
| <a name="gstreamer-GstBuffer.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> |
| #include <gst/gst.h> |
| |
| struct <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer">GstBuffer</a>; |
| enum <a class="link" href="gstreamer-GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags">GstBufferFlags</a>; |
| enum <a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags">GstBufferCopyFlags</a>; |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAGS:CAPS" title="GST_BUFFER_FLAGS()">GST_BUFFER_FLAGS</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-IS-SET:CAPS" title="GST_BUFFER_FLAG_IS_SET()">GST_BUFFER_FLAG_IS_SET</a> (buf, |
| flag) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-SET:CAPS" title="GST_BUFFER_FLAG_SET()">GST_BUFFER_FLAG_SET</a> (buf, |
| flag) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-UNSET:CAPS" title="GST_BUFFER_FLAG_UNSET()">GST_BUFFER_FLAG_UNSET</a> (buf, |
| flag) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-META-TIMING-INFO:CAPS" title="GST_META_TIMING_INFO">GST_META_TIMING_INFO</a> |
| struct <a class="link" href="gstreamer-GstBuffer.html#GstMetaTiming" title="struct GstMetaTiming">GstMetaTiming</a>; |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-TIMESTAMP:CAPS" title="GST_BUFFER_TIMESTAMP()">GST_BUFFER_TIMESTAMP</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-DURATION:CAPS" title="GST_BUFFER_DURATION()">GST_BUFFER_DURATION</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET:CAPS" title="GST_BUFFER_OFFSET()">GST_BUFFER_OFFSET</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-END:CAPS" title="GST_BUFFER_OFFSET_END()">GST_BUFFER_OFFSET_END</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE">GST_BUFFER_OFFSET_NONE</a> |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-DURATION-IS-VALID:CAPS" title="GST_BUFFER_DURATION_IS_VALID()">GST_BUFFER_DURATION_IS_VALID</a> (buffer) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-TIMESTAMP-IS-VALID:CAPS" title="GST_BUFFER_TIMESTAMP_IS_VALID()">GST_BUFFER_TIMESTAMP_IS_VALID</a> (buffer) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-IS-VALID:CAPS" title="GST_BUFFER_OFFSET_IS_VALID()">GST_BUFFER_OFFSET_IS_VALID</a> (buffer) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-END-IS-VALID:CAPS" title="GST_BUFFER_OFFSET_END_IS_VALID()">GST_BUFFER_OFFSET_END_IS_VALID</a> (buffer) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-IS-DISCONT:CAPS" title="GST_BUFFER_IS_DISCONT()">GST_BUFFER_IS_DISCONT</a> (buffer) |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-TRACE-NAME:CAPS" title="GST_BUFFER_TRACE_NAME">GST_BUFFER_TRACE_NAME</a> |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new" title="gst_buffer_new ()">gst_buffer_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new-and-alloc" title="gst_buffer_new_and_alloc()">gst_buffer_new_and_alloc</a> (s) |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new-allocate" title="gst_buffer_new_allocate ()">gst_buffer_new_allocate</a> (<em class="parameter"><code>const <a class="link" href="gstreamer-GstMemory.html#GstAllocator" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> align</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new-wrapped" title="gst_buffer_new_wrapped ()">gst_buffer_new_wrapped</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new-wrapped-full" title="gst_buffer_new_wrapped_full ()">gst_buffer_new_wrapped_full</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#GFreeFunc"><span class="type">GFreeFunc</span></a> free_func</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-ref" title="gst_buffer_ref ()">gst_buffer_ref</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-unref" title="gst_buffer_unref ()">gst_buffer_unref</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-get-sizes" title="gst_buffer_get_sizes ()">gst_buffer_get_sizes</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *maxsize</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-get-size" title="gst_buffer_get_size()">gst_buffer_get_size</a> (b) |
| <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-resize" title="gst_buffer_resize ()">gst_buffer_resize</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-set-size" title="gst_buffer_set_size()">gst_buffer_set_size</a> (b, |
| s) |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-n-memory" title="gst_buffer_n_memory ()">gst_buffer_n_memory</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-take-memory" title="gst_buffer_take_memory ()">gst_buffer_take_memory</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> idx</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>); |
| <a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="returnvalue">GstMemory</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-peek-memory" title="gst_buffer_peek_memory ()">gst_buffer_peek_memory</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-remove-memory" title="gst_buffer_remove_memory()">gst_buffer_remove_memory</a> (b, |
| i) |
| <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-remove-memory-range" title="gst_buffer_remove_memory_range ()">gst_buffer_remove_memory_range</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> length</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-join" title="gst_buffer_join ()">gst_buffer_join</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-merge" title="gst_buffer_merge ()">gst_buffer_merge</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-map" title="gst_buffer_map ()">gst_buffer_map</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *maxsize</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-unmap" title="gst_buffer_unmap ()">gst_buffer_unmap</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-memcmp" title="gst_buffer_memcmp ()">gst_buffer_memcmp</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-extract" title="gst_buffer_extract ()">gst_buffer_extract</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-fill" title="gst_buffer_fill ()">gst_buffer_fill</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-memset" title="gst_buffer_memset ()">gst_buffer_memset</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> val</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-COPY-METADATA:CAPS" title="GST_BUFFER_COPY_METADATA">GST_BUFFER_COPY_METADATA</a> |
| #define <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-COPY-ALL:CAPS" title="GST_BUFFER_COPY_ALL">GST_BUFFER_COPY_ALL</a> |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy" title="gst_buffer_copy ()">gst_buffer_copy</a> (<em class="parameter"><code>const <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-into" title="gst_buffer_copy_into ()">gst_buffer_copy_into</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *dest</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *src</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-region" title="gst_buffer_copy_region ()">gst_buffer_copy_region</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *parent</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()">gst_buffer_is_writable</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-make-writable" title="gst_buffer_make_writable()">gst_buffer_make_writable</a> (buf) |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-replace" title="gst_buffer_replace()">gst_buffer_replace</a> (obuf, |
| nbuf) |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-span-fast" title="gst_buffer_is_span_fast ()">gst_buffer_is_span_fast</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>); |
| <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-span" title="gst_buffer_span ()">gst_buffer_span</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>); |
| <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-get-meta" title="gst_buffer_get_meta ()">gst_buffer_get_meta</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> *info</code></em>); |
| <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-add-meta" title="gst_buffer_add_meta ()">gst_buffer_add_meta</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> params</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-remove-meta" title="gst_buffer_remove_meta ()">gst_buffer_remove_meta</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> *meta</code></em>); |
| <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-iterate-meta" title="gst_buffer_iterate_meta ()">gst_buffer_iterate_meta</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *state</code></em>); |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-add-meta-timing" title="gst_buffer_add_meta_timing()">gst_buffer_add_meta_timing</a> (b) |
| #define <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-get-meta-timing" title="gst_buffer_get_meta_timing()">gst_buffer_get_meta_timing</a> (b) |
| const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * <a class="link" href="gstreamer-GstBuffer.html#gst-meta-timing-get-info" title="gst_meta_timing_get_info ()">gst_meta_timing_get_info</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="gstreamer-GstBuffer.description"></a><h2>Description</h2> |
| <p> |
| Buffers are the basic unit of data transfer in GStreamer. The <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| type provides all the state necessary to define the regions of memory as |
| part of a stream. Region copies are also supported, allowing a smaller |
| region of a buffer to become its own buffer, with mechanisms in place to |
| ensure that neither memory space goes away prematurely. |
| </p> |
| <p> |
| Buffers are usually created with <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new" title="gst_buffer_new ()"><code class="function">gst_buffer_new()</code></a>. After a buffer has been |
| created one will typically allocate memory for it and set the size of the |
| buffer data. The following example creates a buffer that can hold a given |
| video frame with a given width, height and bits per plane. |
| </p> |
| <div class="example"> |
| <a name="id483276"></a><p class="title"><b>Example 3. Creating a buffer for a video frame</b></p> |
| <div class="example-contents"><pre class="programlisting"> |
| GstBuffer *buffer; |
| gint size, width, height, bpp; |
| ... |
| size = width * height * bpp; |
| buffer = gst_buffer_new (); |
| GST_BUFFER_SIZE (buffer) = size; |
| GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); |
| GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); |
| ... |
| </pre></div> |
| </div> |
| <p><br class="example-break"> |
| </p> |
| <p> |
| Alternatively, use <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-new-and-alloc" title="gst_buffer_new_and_alloc()"><code class="function">gst_buffer_new_and_alloc()</code></a> |
| to create a buffer with preallocated data of a given size. |
| </p> |
| <p> |
| The data pointed to by the buffer can be retrieved with the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GST-BUFFER-DATA:CAPS"><code class="function">GST_BUFFER_DATA()</code></a> |
| macro. The size of the data can be found with <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GST-BUFFER-SIZE:CAPS"><code class="function">GST_BUFFER_SIZE()</code></a>. For buffers |
| of size 0, the data pointer is undefined (usually NULL) and should never be used. |
| </p> |
| <p> |
| If an element knows what pad you will push the buffer out on, it should use |
| <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-alloc-buffer"><code class="function">gst_pad_alloc_buffer()</code></a> instead to create a buffer. This allows downstream |
| elements to provide special buffers to write in, like hardware buffers. |
| </p> |
| <p> |
| A buffer has a pointer to a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> describing the media type of the data |
| in the buffer. Attach caps to the buffer with <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#gst-buffer-set-caps"><code class="function">gst_buffer_set_caps()</code></a>; this |
| is typically done before pushing out a buffer using <a class="link" href="GstPad.html#gst-pad-push" title="gst_pad_push ()"><code class="function">gst_pad_push()</code></a> so that |
| the downstream element knows the type of the buffer. |
| </p> |
| <p> |
| A buffer will usually have a timestamp, and a duration, but neither of these |
| are guaranteed (they may be set to <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a>). Whenever a |
| meaningful value can be given for these, they should be set. The timestamp |
| and duration are measured in nanoseconds (they are <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> values). |
| </p> |
| <p> |
| A buffer can also have one or both of a start and an end offset. These are |
| media-type specific. For video buffers, the start offset will generally be |
| the frame number. For audio buffers, it will be the number of samples |
| produced so far. For compressed data, it could be the byte offset in a |
| source or destination file. Likewise, the end offset will be the offset of |
| the end of the buffer. These can only be meaningfully interpreted if you |
| know the media type of the buffer (the <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> set on it). Either or both |
| can be set to <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE"><span class="type">GST_BUFFER_OFFSET_NONE</span></a>. |
| </p> |
| <p> |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-ref" title="gst_buffer_ref ()"><code class="function">gst_buffer_ref()</code></a> 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. |
| </p> |
| <p> |
| To efficiently create a smaller buffer out of an existing one, you can |
| use <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-region" title="gst_buffer_copy_region ()"><code class="function">gst_buffer_copy_region()</code></a>. |
| </p> |
| <p> |
| If a plug-in wants to modify the buffer data or metadata in-place, it should |
| first obtain a buffer that is safe to modify by using |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-make-writable" title="gst_buffer_make_writable()"><code class="function">gst_buffer_make_writable()</code></a>. This function is optimized so that a copy will |
| only be made when it is necessary. |
| </p> |
| <p> |
| Several flags of the buffer can be set and unset with the |
| <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-SET:CAPS" title="GST_BUFFER_FLAG_SET()"><code class="function">GST_BUFFER_FLAG_SET()</code></a> and <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-UNSET:CAPS" title="GST_BUFFER_FLAG_UNSET()"><code class="function">GST_BUFFER_FLAG_UNSET()</code></a> macros. Use |
| <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-FLAG-IS-SET:CAPS" title="GST_BUFFER_FLAG_IS_SET()"><code class="function">GST_BUFFER_FLAG_IS_SET()</code></a> to test if a certain <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBufferFlag"><span class="type">GstBufferFlag</span></a> is set. |
| </p> |
| <p> |
| Buffers can be efficiently merged into a larger buffer with |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-span" title="gst_buffer_span ()"><code class="function">gst_buffer_span()</code></a>, which avoids memory copies when the <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-span-fast" title="gst_buffer_is_span_fast ()"><code class="function">gst_buffer_is_span_fast()</code></a> |
| function returns TRUE. |
| </p> |
| <p> |
| An element should either unref the buffer or push it out on a src pad |
| using <a class="link" href="GstPad.html#gst-pad-push" title="gst_pad_push ()"><code class="function">gst_pad_push()</code></a> (see <a class="link" href="GstPad.html" title="GstPad"><span class="type">GstPad</span></a>). |
| </p> |
| <p> |
| Buffers are usually freed by unreffing them with <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-unref" title="gst_buffer_unref ()"><code class="function">gst_buffer_unref()</code></a>. When |
| the refcount drops to 0, any data pointed to by the buffer is unreffed as |
| well. |
| </p> |
| <p> |
| Last reviewed on March 30, 2011 (0.11.0) |
| </p> |
| </div> |
| <div class="refsect1"> |
| <a name="gstreamer-GstBuffer.details"></a><h2>Details</h2> |
| <div class="refsect2"> |
| <a name="GstBuffer"></a><h3>struct GstBuffer</h3> |
| <pre class="programlisting">struct GstBuffer { |
| GstMiniObject mini_object; |
| |
| GstBufferPool *pool; |
| |
| /* timestamp */ |
| GstClockTime timestamp; |
| GstClockTime duration; |
| |
| /* media specific offset */ |
| guint64 offset; |
| guint64 offset_end; |
| }; |
| </pre> |
| <p> |
| The structure of a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. Use the associated macros to access the public |
| variables. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><a class="link" href="gstreamer-GstMiniObject.html#GstMiniObject" title="struct GstMiniObject"><span class="type">GstMiniObject</span></a> <em class="structfield"><code><a name="GstBuffer.mini-object"></a>mini_object</code></em>;</span></p></td> |
| <td>the parent structure</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *<em class="structfield"><code><a name="GstBuffer.pool"></a>pool</code></em>;</span></p></td> |
| <td>pointer to the pool owner of the buffer</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstBuffer.timestamp"></a>timestamp</code></em>;</span></p></td> |
| <td>timestamp of the buffer, can be <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a> when the |
| timestamp is not known or relevant.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstBuffer.duration"></a>duration</code></em>;</span></p></td> |
| <td>duration in time of the buffer data, can be <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a> |
| when the duration is not known or relevant.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> <em class="structfield"><code><a name="GstBuffer.offset"></a>offset</code></em>;</span></p></td> |
| <td>a media specific offset for the buffer data. |
| For video frames, this is the frame number of this buffer. |
| For audio samples, this is the offset of the first sample in this buffer. |
| For file data or compressed data this is the byte offset of the first |
| byte in this buffer.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> <em class="structfield"><code><a name="GstBuffer.offset-end"></a>offset_end</code></em>;</span></p></td> |
| <td>the last offset contained in this buffer. It has the same |
| format as <em class="parameter"><code>offset</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GstBufferFlags"></a><h3>enum GstBufferFlags</h3> |
| <pre class="programlisting">typedef enum { |
| GST_BUFFER_FLAG_LIVE = (GST_MINI_OBJECT_FLAG_LAST << 0), |
| GST_BUFFER_FLAG_DECODE_ONLY = (GST_MINI_OBJECT_FLAG_LAST << 1), |
| GST_BUFFER_FLAG_DISCONT = (GST_MINI_OBJECT_FLAG_LAST << 2), |
| GST_BUFFER_FLAG_RESYNC = (GST_MINI_OBJECT_FLAG_LAST << 3), |
| GST_BUFFER_FLAG_CORRUPTED = (GST_MINI_OBJECT_FLAG_LAST << 4), |
| GST_BUFFER_FLAG_MARKER = (GST_MINI_OBJECT_FLAG_LAST << 5), |
| GST_BUFFER_FLAG_HEADER = (GST_MINI_OBJECT_FLAG_LAST << 6), |
| GST_BUFFER_FLAG_GAP = (GST_MINI_OBJECT_FLAG_LAST << 7), |
| GST_BUFFER_FLAG_DROPPABLE = (GST_MINI_OBJECT_FLAG_LAST << 8), |
| GST_BUFFER_FLAG_DELTA_UNIT = (GST_MINI_OBJECT_FLAG_LAST << 9), |
| GST_BUFFER_FLAG_IN_CAPS = (GST_MINI_OBJECT_FLAG_LAST << 10), |
| |
| GST_BUFFER_FLAG_LAST = (GST_MINI_OBJECT_FLAG_LAST << 20) |
| } GstBufferFlags; |
| </pre> |
| <p> |
| A set of buffer flags used to describe properties of a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-LIVE:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_LIVE</code></span></p></td> |
| <td>the buffer is live data and should be discarded in |
| the PAUSED state. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-DECODE-ONLY:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_DECODE_ONLY</code></span></p></td> |
| <td>the buffer contains data that should be dropped |
| because it will be clipped against the segment |
| boundaries or because it does not contain data |
| that should be shown to the user. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-DISCONT:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_DISCONT</code></span></p></td> |
| <td>the buffer marks a data discontinuity in the stream. |
| This typically occurs after a seek or a dropped buffer |
| from a live or network source. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-RESYNC:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_RESYNC</code></span></p></td> |
| <td>the buffer timestamp might have a discontinuity |
| and this buffer is a good point to resynchronize. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-CORRUPTED:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_CORRUPTED</code></span></p></td> |
| <td>the buffer data is corrupted. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-MARKER:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_MARKER</code></span></p></td> |
| <td>the buffer contains a media specific marker. for |
| video this is typically the end of a frame boundary, for audio |
| this is usually the end of a talkspurt. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-HEADER:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_HEADER</code></span></p></td> |
| <td>the buffer contains header information that is |
| needed to decode the following data |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-GAP:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_GAP</code></span></p></td> |
| <td>the buffer has been created to fill a gap in the |
| stream and contains media neutral data (elements can |
| switch to optimized code path that ignores the buffer |
| content). |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-DROPPABLE:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_DROPPABLE</code></span></p></td> |
| <td>the buffer can be dropped without breaking the |
| stream, for example to reduce bandwidth. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-DELTA-UNIT:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_DELTA_UNIT</code></span></p></td> |
| <td>this unit cannot be decoded independently. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-IN-CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_IN_CAPS</code></span></p></td> |
| <td>the buffer has been added as a field in a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a>. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-FLAG-LAST:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_FLAG_LAST</code></span></p></td> |
| <td>additional media specific flags can be added starting from |
| this flag. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GstBufferCopyFlags"></a><h3>enum GstBufferCopyFlags</h3> |
| <pre class="programlisting">typedef enum { |
| GST_BUFFER_COPY_NONE = 0, |
| GST_BUFFER_COPY_FLAGS = (1 << 0), |
| GST_BUFFER_COPY_TIMESTAMPS = (1 << 1), |
| GST_BUFFER_COPY_MEMORY = (1 << 2), |
| GST_BUFFER_COPY_MERGE = (1 << 3) |
| } GstBufferCopyFlags; |
| </pre> |
| <p> |
| A set of flags that can be provided to the <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-into" title="gst_buffer_copy_into ()"><code class="function">gst_buffer_copy_into()</code></a> |
| function to specify which items should be copied. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><a name="GST-BUFFER-COPY-NONE:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_COPY_NONE</code></span></p></td> |
| <td>copy nothing |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-COPY-FLAGS:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_COPY_FLAGS</code></span></p></td> |
| <td>flag indicating that buffer flags should be copied |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-COPY-TIMESTAMPS:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_COPY_TIMESTAMPS</code></span></p></td> |
| <td>flag indicating that buffer timestamp, duration, |
| offset and offset_end should be copied |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-COPY-MEMORY:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_COPY_MEMORY</code></span></p></td> |
| <td>flag indicating that buffer memory should be copied |
| and appended to already existing memory |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="GST-BUFFER-COPY-MERGE:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_COPY_MERGE</code></span></p></td> |
| <td>flag indicating that buffer memory should be |
| merged |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-FLAGS:CAPS"></a><h3>GST_BUFFER_FLAGS()</h3> |
| <pre class="programlisting">#define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf) |
| </pre> |
| <p> |
| A flags word containing <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBufferFlag"><span class="type">GstBufferFlag</span></a> flags set on this buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-FLAG-IS-SET:CAPS"></a><h3>GST_BUFFER_FLAG_IS_SET()</h3> |
| <pre class="programlisting">#define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag) |
| </pre> |
| <p> |
| Gives the status of a specific flag on a buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td> |
| <td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBufferFlag"><span class="type">GstBufferFlag</span></a> to check.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-FLAG-SET:CAPS"></a><h3>GST_BUFFER_FLAG_SET()</h3> |
| <pre class="programlisting">#define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag) |
| </pre> |
| <p> |
| Sets a buffer flag on a buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td> |
| <td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBufferFlag"><span class="type">GstBufferFlag</span></a> to set.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-FLAG-UNSET:CAPS"></a><h3>GST_BUFFER_FLAG_UNSET()</h3> |
| <pre class="programlisting">#define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag) |
| </pre> |
| <p> |
| Clears a buffer flag. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td> |
| <td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBufferFlag"><span class="type">GstBufferFlag</span></a> to clear.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-META-TIMING-INFO:CAPS"></a><h3>GST_META_TIMING_INFO</h3> |
| <pre class="programlisting">#define GST_META_TIMING_INFO (gst_meta_timing_get_info()) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GstMetaTiming"></a><h3>struct GstMetaTiming</h3> |
| <pre class="programlisting">struct GstMetaTiming { |
| GstMeta meta; /* common meta header */ |
| |
| GstClockTime dts; /* decoding timestamp */ |
| GstClockTime pts; /* presentation timestamp */ |
| GstClockTime duration; /* duration of the data */ |
| GstClockTime clock_rate; /* clock rate for the above values */ |
| }; |
| </pre> |
| <p> |
| Extra timing metadata |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> <em class="structfield"><code><a name="GstMetaTiming.meta"></a>meta</code></em>;</span></p></td> |
| <td>parent metadata</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstMetaTiming.dts"></a>dts</code></em>;</span></p></td> |
| <td>the decoding timestamp</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstMetaTiming.pts"></a>pts</code></em>;</span></p></td> |
| <td>the presentation timestamp</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstMetaTiming.duration"></a>duration</code></em>;</span></p></td> |
| <td>the duration</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstMetaTiming.clock-rate"></a>clock_rate</code></em>;</span></p></td> |
| <td>the clock rate of the dts, pts and duration values</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-TIMESTAMP:CAPS"></a><h3>GST_BUFFER_TIMESTAMP()</h3> |
| <pre class="programlisting">#define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp) |
| </pre> |
| <p> |
| The timestamp in nanoseconds (as a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>) of the data in the buffer. |
| Value will be <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><code class="literal">GST_CLOCK_TIME_NONE</code></a> if the timestamp is unknown. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.:</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-DURATION:CAPS"></a><h3>GST_BUFFER_DURATION()</h3> |
| <pre class="programlisting">#define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration) |
| </pre> |
| <p> |
| The duration in nanoseconds (as a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>) of the data in the buffer. |
| Value will be <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><code class="literal">GST_CLOCK_TIME_NONE</code></a> if the duration is unknown. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-OFFSET:CAPS"></a><h3>GST_BUFFER_OFFSET()</h3> |
| <pre class="programlisting">#define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset) |
| </pre> |
| <p> |
| The offset in the source file of the beginning of this buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-OFFSET-END:CAPS"></a><h3>GST_BUFFER_OFFSET_END()</h3> |
| <pre class="programlisting">#define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end) |
| </pre> |
| <p> |
| The offset in the source file of the end of this buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-OFFSET-NONE:CAPS"></a><h3>GST_BUFFER_OFFSET_NONE</h3> |
| <pre class="programlisting">#define GST_BUFFER_OFFSET_NONE ((guint64)-1) |
| </pre> |
| <p> |
| Constant for no-offset return results. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-DURATION-IS-VALID:CAPS"></a><h3>GST_BUFFER_DURATION_IS_VALID()</h3> |
| <pre class="programlisting">#define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer))) |
| </pre> |
| <p> |
| Tests if the duration is known. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-TIMESTAMP-IS-VALID:CAPS"></a><h3>GST_BUFFER_TIMESTAMP_IS_VALID()</h3> |
| <pre class="programlisting">#define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer))) |
| </pre> |
| <p> |
| Tests if the timestamp is known. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-OFFSET-IS-VALID:CAPS"></a><h3>GST_BUFFER_OFFSET_IS_VALID()</h3> |
| <pre class="programlisting">#define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE) |
| </pre> |
| <p> |
| Tests if the start offset is known. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-OFFSET-END-IS-VALID:CAPS"></a><h3>GST_BUFFER_OFFSET_END_IS_VALID()</h3> |
| <pre class="programlisting">#define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE) |
| </pre> |
| <p> |
| Tests if the end offset is known. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-IS-DISCONT:CAPS"></a><h3>GST_BUFFER_IS_DISCONT()</h3> |
| <pre class="programlisting">#define GST_BUFFER_IS_DISCONT(buffer) (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) |
| </pre> |
| <p> |
| Tests if the buffer marks a discontinuity in the stream. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| <p class="since">Since 0.10.9</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-TRACE-NAME:CAPS"></a><h3>GST_BUFFER_TRACE_NAME</h3> |
| <pre class="programlisting">#define GST_BUFFER_TRACE_NAME "GstBuffer" |
| </pre> |
| <p> |
| The name used for tracing memory allocations. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-new"></a><h3>gst_buffer_new ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| <p> |
| Creates a newly allocated buffer without any data. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-new-and-alloc"></a><h3>gst_buffer_new_and_alloc()</h3> |
| <pre class="programlisting">#define gst_buffer_new_and_alloc(s) gst_buffer_new_allocate(NULL, s, 0) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-new-allocate"></a><h3>gst_buffer_new_allocate ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_new_allocate (<em class="parameter"><code>const <a class="link" href="gstreamer-GstMemory.html#GstAllocator" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> align</code></em>);</pre> |
| <p> |
| Tries to create a newly allocated buffer with data of the given size and |
| alignment from <em class="parameter"><code>allocator</code></em>. If the requested amount of memory can't be |
| allocated, NULL will be returned. The allocated buffer memory is not cleared. |
| </p> |
| <p> |
| When <em class="parameter"><code>allocator</code></em> is NULL, the default memory allocator will be used. |
| </p> |
| <p> |
| Allocator buffer memory will be aligned to multiples of (<em class="parameter"><code>align</code></em> + 1) bytes. |
| </p> |
| <p> |
| Note that when <em class="parameter"><code>size</code></em> == 0, the buffer will not have memory associated with it. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>allocator</code></em> :</span></p></td> |
| <td>the <a class="link" href="gstreamer-GstMemory.html#GstAllocator" title="GstAllocator"><span class="type">GstAllocator</span></a> to use</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size in bytes of the new buffer's data.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>align</code></em> :</span></p></td> |
| <td>the alignment of the buffer memory</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>, or NULL if the memory couldn't |
| be allocated. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-new-wrapped"></a><h3>gst_buffer_new_wrapped ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_new_wrapped (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Creates a new buffer that wraps the given <em class="parameter"><code>data</code></em>. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
| <td>data to wrap</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>allocated size of <em class="parameter"><code>data</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-new-wrapped-full"></a><h3>gst_buffer_new_wrapped_full ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_new_wrapped_full (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#GFreeFunc"><span class="type">GFreeFunc</span></a> free_func</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Creates a new buffer that wraps the given <em class="parameter"><code>data</code></em>. Valid data is set |
| to start at <em class="parameter"><code>offset</code></em> and up to <em class="parameter"><code>size</code></em>. If no <em class="parameter"><code>free_func</code></em> is provided, |
| buffer memory is marked READONLY. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
| <td>data to wrap</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>free_func</code></em> :</span></p></td> |
| <td>function to free <em class="parameter"><code>data</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>offset in <em class="parameter"><code>data</code></em> of valid data</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>size of valid data in <em class="parameter"><code>data</code></em> starting at <em class="parameter"><code>offset</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-ref"></a><h3>gst_buffer_ref ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_ref (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre> |
| <p> |
| Increases the refcount of the given buffer by one. |
| </p> |
| <p> |
| Note that the refcount affects the writeability |
| of <em class="parameter"><code>buf</code></em> and its metadata, see <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a> and |
| <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#gst-buffer-is-metadata-writable"><code class="function">gst_buffer_is_metadata_writable()</code></a>. It is |
| important to note that keeping additional references to |
| GstBuffer instances can potentially increase the number |
| of memcpy operations in a pipeline. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <em class="parameter"><code>buf</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-unref"></a><h3>gst_buffer_unref ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_unref (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre> |
| <p> |
| Decreases the refcount of the buffer. If the refcount reaches 0, the buffer |
| will be freed. If <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GST-BUFFER-MALLOCDATA:CAPS"><code class="function">GST_BUFFER_MALLOCDATA()</code></a> is non-NULL, this pointer will |
| also be freed at this time. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-get-sizes"></a><h3>gst_buffer_get_sizes ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> gst_buffer_get_sizes (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *maxsize</code></em>);</pre> |
| <p> |
| Get the total size of all memory blocks in <em class="parameter"><code>buffer</code></em>. |
| </p> |
| <p> |
| When not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>offset</code></em> will contain the offset of the data in the first |
| memory block in <em class="parameter"><code>buffer</code></em> and <em class="parameter"><code>maxsize</code></em> will contain the sum of the size |
| and <em class="parameter"><code>offset</code></em> and the amount of extra padding on the last memory block. |
| <em class="parameter"><code>offset</code></em> and <em class="parameter"><code>maxsize</code></em> can be used to resize the buffer with |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-resize" title="gst_buffer_resize ()"><code class="function">gst_buffer_resize()</code></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>a pointer to the offset</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>maxsize</code></em> :</span></p></td> |
| <td>a pointer to the maxsize</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the total size of the memory in <em class="parameter"><code>buffer</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-get-size"></a><h3>gst_buffer_get_size()</h3> |
| <pre class="programlisting">#define gst_buffer_get_size(b) gst_buffer_get_sizes ((b), NULL, NULL) |
| </pre> |
| <p> |
| Get the size of <em class="parameter"><code>b</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-resize"></a><h3>gst_buffer_resize ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_resize (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Set the total size of the buffer |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset adjustement</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the new size</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-set-size"></a><h3>gst_buffer_set_size()</h3> |
| <pre class="programlisting">#define gst_buffer_set_size(b,s) gst_buffer_resize ((b), 0, (s)) |
| </pre> |
| <p> |
| Set the size of <em class="parameter"><code>b</code></em> to <em class="parameter"><code>s</code></em>. This will remove or trim the memory blocks |
| in the buffer. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td> |
| <td>a new size</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-n-memory"></a><h3>gst_buffer_n_memory ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gst_buffer_n_memory (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre> |
| <p> |
| Get the amount of memory blocks that this buffer has. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the amount of memory block in this buffer. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-take-memory"></a><h3>gst_buffer_take_memory ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_take_memory (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> idx</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre> |
| <p> |
| Add the memory block <em class="parameter"><code>mem</code></em> to <em class="parameter"><code>buffer</code></em> at <em class="parameter"><code>idx</code></em>. This function takes ownership |
| of <em class="parameter"><code>mem</code></em> and thus doesn't increase its refcount. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>idx</code></em> :</span></p></td> |
| <td>the index to add the memory at, or -1 to append it to the end</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>mem</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="type">GstMemory</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-peek-memory"></a><h3>gst_buffer_peek_memory ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="returnvalue">GstMemory</span></a> * gst_buffer_peek_memory (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>);</pre> |
| <p> |
| Get the memory block in <em class="parameter"><code>buffer</code></em> at <em class="parameter"><code>idx</code></em> for memory access in <em class="parameter"><code>flags</code></em>. |
| This function does not return a refcount to the memory block. The memory |
| block stays valid for as long as the caller has a valid reference to <em class="parameter"><code>buffer</code></em>. |
| </p> |
| <p> |
| <em class="parameter"><code>buffer</code></em> should be writable when <em class="parameter"><code>flags</code></em> contains <a class="link" href="gstreamer-GstMemory.html#GST-MAP-WRITE:CAPS"><span class="type">GST_MAP_WRITE</span></a>. If the memory |
| at <em class="parameter"><code>idx</code></em> is not writable, a new writable copy will be installed in <em class="parameter"><code>buffer</code></em> and |
| returned. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>idx</code></em> :</span></p></td> |
| <td>an index</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td> |
| <td><a class="link" href="gstreamer-GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a></td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstMemory.html#GstMemory" title="struct GstMemory"><span class="type">GstMemory</span></a> at <em class="parameter"><code>idx</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-remove-memory"></a><h3>gst_buffer_remove_memory()</h3> |
| <pre class="programlisting">#define gst_buffer_remove_memory(b,i) gst_buffer_remove_memory_range ((b), (i), 1) |
| </pre> |
| <p> |
| Remove the memory block in <em class="parameter"><code>b</code></em> at <em class="parameter"><code>i</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td> |
| <td>an index</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-remove-memory-range"></a><h3>gst_buffer_remove_memory_range ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_remove_memory_range (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> length</code></em>);</pre> |
| <p> |
| Remove <em class="parameter"><code>len</code></em> memory blocks in <em class="parameter"><code>buffer</code></em> starting from <em class="parameter"><code>idx</code></em>. |
| </p> |
| <p> |
| <em class="parameter"><code>length</code></em> can be -1, in which case all memory starting from <em class="parameter"><code>idx</code></em> is removed. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>idx</code></em> :</span></p></td> |
| <td>an index</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
| <td>a length</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-join"></a><h3>gst_buffer_join ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_join (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>);</pre> |
| <p> |
| Create a new buffer that is the concatenation of the two source |
| buffers, and unrefs the original source buffers. |
| </p> |
| <p> |
| If the buffers point to contiguous areas of memory, the buffer |
| is created without copying the data. |
| </p> |
| <p> |
| This is a convenience function for C programmers. See also |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-merge" title="gst_buffer_merge ()"><code class="function">gst_buffer_merge()</code></a>, which does the same thing without |
| unreffing the input parameters. Language bindings without |
| explicit reference counting should not wrap this function. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td> |
| <td>the first source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td> |
| <td>the second source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> which is the concatenation of |
| the source buffers. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-merge"></a><h3>gst_buffer_merge ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_merge (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>);</pre> |
| <p> |
| Create a new buffer that is the concatenation of the two source |
| buffers. The original source buffers will not be modified or |
| unref'd. Make sure you unref the source buffers if they are not used |
| anymore afterwards. |
| </p> |
| <p> |
| If the buffers point to contiguous areas of memory, the buffer |
| is created without copying the data. |
| </p> |
| <p> |
| Free-function: gst_buffer_unref |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td> |
| <td>the first source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to merge. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td> |
| <td>the second source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to merge. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> which is the concatenation |
| of the source buffers. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-map"></a><h3>gst_buffer_map ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gst_buffer_map (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *maxsize</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>);</pre> |
| <p> |
| This function return a pointer to the memory in <em class="parameter"><code>buffer</code></em>. <em class="parameter"><code>flags</code></em> describe the |
| desired access of the memory. When <em class="parameter"><code>flags</code></em> is <a class="link" href="gstreamer-GstMemory.html#GST-MAP-WRITE:CAPS"><span class="type">GST_MAP_WRITE</span></a>, <em class="parameter"><code>buffer</code></em> should |
| be writable (as returned from <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a>). |
| </p> |
| <p> |
| <em class="parameter"><code>size</code></em> and <em class="parameter"><code>maxsize</code></em> will contain the current valid number of bytes in the |
| returned memory area and the total maximum mount of bytes available in the |
| returned memory area respectively. |
| </p> |
| <p> |
| When <em class="parameter"><code>buffer</code></em> is writable but the memory isn't, a writable copy will |
| automatically be created and returned. The readonly copy of the buffer memory |
| will then also be replaced with this writable copy. |
| </p> |
| <p> |
| When the buffer contains multiple memory blocks, the returned pointer will be |
| a concatenation of the memory blocks. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>a location for the size</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>maxsize</code></em> :</span></p></td> |
| <td>a location for the max size</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td> |
| <td>flags for the mapping</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a pointer to the memory for the buffer.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-unmap"></a><h3>gst_buffer_unmap ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_unmap (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Release the memory previously mapped with <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-map" title="gst_buffer_map ()"><code class="function">gst_buffer_map()</code></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
| <td>the previously mapped data</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size of <em class="parameter"><code>data</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> on success. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> can be returned when the new size is larger |
| than the maxsize of the memory.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-memcmp"></a><h3>gst_buffer_memcmp ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gst_buffer_memcmp (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Compare <em class="parameter"><code>size</code></em> bytes starting from <em class="parameter"><code>offset</code></em> in <em class="parameter"><code>buffer</code></em> with the memory in <em class="parameter"><code>mem</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset in <em class="parameter"><code>buffer</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>mem</code></em> :</span></p></td> |
| <td>the memory to compare</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size to compare</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>0 if the memory is equal.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-extract"></a><h3>gst_buffer_extract ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> gst_buffer_extract (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Copy <em class="parameter"><code>size</code></em> bytes starting from <em class="parameter"><code>offset</code></em> in <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>dest</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset to extract</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td> |
| <td>the destination address</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size to extract</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>The amount of bytes extracted. This value can be lower than <em class="parameter"><code>size</code></em> |
| when <em class="parameter"><code>buffer</code></em> did not contain enough data.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-fill"></a><h3>gst_buffer_fill ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> gst_buffer_fill (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Copy <em class="parameter"><code>size</code></em> bytes from <em class="parameter"><code>src</code></em> to <em class="parameter"><code>buffer</code></em> at <em class="parameter"><code>offset</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset to fill</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td> |
| <td>the source address</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size to fill</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>The amount of bytes copied. This value can be lower than <em class="parameter"><code>size</code></em> |
| when <em class="parameter"><code>buffer</code></em> did not contain enough data.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-memset"></a><h3>gst_buffer_memset ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> gst_buffer_memset (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> val</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Fill <em class="parameter"><code>buf</code></em> with <em class="parameter"><code>size</code></em> bytes with <em class="parameter"><code>val</code></em> starting from <em class="parameter"><code>offset</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset in <em class="parameter"><code>buffer</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td> |
| <td>the value to set</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size to set</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>The amount of bytes filled. This value can be lower than <em class="parameter"><code>size</code></em> |
| when <em class="parameter"><code>buffer</code></em> did not contain enough data.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-COPY-METADATA:CAPS"></a><h3>GST_BUFFER_COPY_METADATA</h3> |
| <pre class="programlisting">#define GST_BUFFER_COPY_METADATA (GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS) |
| </pre> |
| <p> |
| Combination of all possible metadata fields that can be copied with |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-into" title="gst_buffer_copy_into ()"><code class="function">gst_buffer_copy_into()</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-BUFFER-COPY-ALL:CAPS"></a><h3>GST_BUFFER_COPY_ALL</h3> |
| <pre class="programlisting">#define GST_BUFFER_COPY_ALL ((GstBufferCopyFlags)(GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_MEMORY)) |
| </pre> |
| <p> |
| Combination of all possible fields that can be copied with |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy-into" title="gst_buffer_copy_into ()"><code class="function">gst_buffer_copy_into()</code></a>. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-copy"></a><h3>gst_buffer_copy ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_copy (<em class="parameter"><code>const <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre> |
| <p> |
| Create a copy of the given buffer. This will also make a newly allocated |
| copy of the data the source buffer contains. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a new copy of <em class="parameter"><code>buf</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-copy-into"></a><h3>gst_buffer_copy_into ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_copy_into (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *dest</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *src</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Copies the information from <em class="parameter"><code>src</code></em> into <em class="parameter"><code>dest</code></em>. |
| </p> |
| <p> |
| <em class="parameter"><code>flags</code></em> indicate which fields will be copied. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td> |
| <td>a destination <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td> |
| <td>a source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td> |
| <td>flags indicating what metadata fields should be copied.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>offset to copy from</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>total size to copy. If -1, all data is copied.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-copy-region"></a><h3>gst_buffer_copy_region ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_copy_region (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *parent</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Creates a sub-buffer from <em class="parameter"><code>parent</code></em> at <em class="parameter"><code>offset</code></em> and <em class="parameter"><code>size</code></em>. |
| This sub-buffer uses the actual memory space of the parent buffer. |
| This function will copy the offset and timestamp fields when the |
| offset is 0. If not, they will be set to <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a> and |
| <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE"><span class="type">GST_BUFFER_OFFSET_NONE</span></a>. |
| If <em class="parameter"><code>offset</code></em> equals 0 and <em class="parameter"><code>size</code></em> equals the total size of <em class="parameter"><code>buffer</code></em>, the |
| duration and offset end fields are also copied. If not they will be set |
| to <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a> and <a class="link" href="gstreamer-GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE"><span class="type">GST_BUFFER_OFFSET_NONE</span></a>. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td> |
| <td>the <a class="link" href="gstreamer-GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset into parent <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> at which the new sub-buffer |
| begins.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the size of the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> sub-buffer, in bytes.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> or NULL if the arguments were |
| invalid. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-is-writable"></a><h3>gst_buffer_is_writable()</h3> |
| <pre class="programlisting">#define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (buf)) |
| </pre> |
| <p> |
| Tests if you can safely write data into a buffer's data array or validly |
| modify the caps and timestamp metadata. Metadata in a GstBuffer is always |
| writable, but it is only safe to change it when there is only one owner |
| of the buffer - ie, the refcount is 1. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-make-writable"></a><h3>gst_buffer_make_writable()</h3> |
| <pre class="programlisting">#define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (buf))) |
| </pre> |
| <p> |
| Makes a writable buffer from the given buffer. If the source buffer is |
| already writable, this will simply return the same buffer. A copy will |
| otherwise be made using <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-copy" title="gst_buffer_copy ()"><code class="function">gst_buffer_copy()</code></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a writable buffer which may or may not be the |
| same as <em class="parameter"><code>buf</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-replace"></a><h3>gst_buffer_replace()</h3> |
| <pre class="programlisting">#define gst_buffer_replace(obuf,nbuf)</pre> |
| <p> |
| Modifies a pointer to a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to point to a different <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>. The |
| modification is done atomically (so this is useful for ensuring thread safety |
| in some cases), and the reference counts are updated appropriately (the old |
| buffer is unreffed, the new is reffed). |
| </p> |
| <p> |
| Either <em class="parameter"><code>nbuf</code></em> or the <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> pointed to by <em class="parameter"><code>obuf</code></em> may be NULL. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>obuf</code></em> :</span></p></td> |
| <td>pointer to a pointer to a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to be |
| replaced. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>nbuf</code></em> :</span></p></td> |
| <td>pointer to a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> that will |
| replace the buffer pointed to by <em class="parameter"><code>obuf</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-is-span-fast"></a><h3>gst_buffer_is_span_fast ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_is_span_fast (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>);</pre> |
| <p> |
| Determines whether a <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-span" title="gst_buffer_span ()"><code class="function">gst_buffer_span()</code></a> can be done without copying |
| the contents, that is, whether the data areas are contiguous sub-buffers of |
| the same buffer. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td> |
| <td>the first <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td> |
| <td>the second <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>TRUE if the buffers are contiguous, |
| FALSE if a copy would be required.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-span"></a><h3>gst_buffer_span ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="returnvalue">GstBuffer</span></a> * gst_buffer_span (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> |
| <p> |
| Creates a new buffer that consists of part of buf1 and buf2. |
| Logically, buf1 and buf2 are concatenated into a single larger |
| buffer, and a new buffer is created at the given offset inside |
| this space, with a given length. |
| </p> |
| <p> |
| If the two source buffers are children of the same larger buffer, |
| and are contiguous, the new buffer will be a child of the shared |
| parent, and thus no copying is necessary. you can use |
| <a class="link" href="gstreamer-GstBuffer.html#gst-buffer-is-span-fast" title="gst_buffer_is_span_fast ()"><code class="function">gst_buffer_is_span_fast()</code></a> to determine if a memcpy will be needed. |
| </p> |
| <p> |
| MT safe. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf1</code></em> :</span></p></td> |
| <td>the first source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to merge.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td> |
| <td>the offset in the first buffer from where the new |
| buffer should start.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buf2</code></em> :</span></p></td> |
| <td>the second source <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> to merge.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td> |
| <td>the total size of the new buffer.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the new <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> that spans the two source |
| buffers, or NULL if the arguments are invalid. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-get-meta"></a><h3>gst_buffer_get_meta ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * gst_buffer_get_meta (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> *info</code></em>);</pre> |
| <p> |
| Get the metadata for the api in <em class="parameter"><code>info</code></em> on buffer. When there is no such |
| metadata, NULL is returned. |
| </p> |
| <p> |
| Note that the result metadata might not be of the implementation <em class="parameter"><code>info</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the metadata for the api in <em class="parameter"><code>info</code></em> on <em class="parameter"><code>buffer</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-add-meta"></a><h3>gst_buffer_add_meta ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * gst_buffer_add_meta (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> params</code></em>);</pre> |
| <p> |
| Add metadata for <em class="parameter"><code>info</code></em> to <em class="parameter"><code>buffer</code></em> using the parameters in <em class="parameter"><code>params</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td> |
| <td>params for <em class="parameter"><code>info</code></em> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the metadata for the api in <em class="parameter"><code>info</code></em> on <em class="parameter"><code>buffer</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-remove-meta"></a><h3>gst_buffer_remove_meta ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_remove_meta (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> *meta</code></em>);</pre> |
| <p> |
| Remove the metadata for <em class="parameter"><code>meta</code></em> on <em class="parameter"><code>buffer</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>meta</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the metadata existed and was removed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if no such |
| metadata was on <em class="parameter"><code>buffer</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-iterate-meta"></a><h3>gst_buffer_iterate_meta ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> * gst_buffer_iterate_meta (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *state</code></em>);</pre> |
| <p> |
| Retrieve the next <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> after <em class="parameter"><code>current</code></em>. If <em class="parameter"><code>state</code></em> points |
| to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the first metadata is returned. |
| </p> |
| <p> |
| <em class="parameter"><code>state</code></em> will be updated with an opage state pointer |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td> |
| <td>an opaque state pointer</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>The next <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when there are no more items.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-add-meta-timing"></a><h3>gst_buffer_add_meta_timing()</h3> |
| <pre class="programlisting">#define gst_buffer_add_meta_timing(b) ((GstMetaTiming*)gst_buffer_add_meta((b),GST_META_TIMING_INFO,NULL)) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-buffer-get-meta-timing"></a><h3>gst_buffer_get_meta_timing()</h3> |
| <pre class="programlisting">#define gst_buffer_get_meta_timing(b) ((GstMetaTiming*)gst_buffer_get_meta((b),GST_META_TIMING_INFO)) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-meta-timing-get-info"></a><h3>gst_meta_timing_get_info ()</h3> |
| <pre class="programlisting">const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * gst_meta_timing_get_info (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="gstreamer-GstBuffer.see-also"></a><h2>See Also</h2> |
| <a class="link" href="GstPad.html" title="GstPad"><span class="type">GstPad</span></a>, <a class="link" href="gstreamer-GstMiniObject.html#GstMiniObject" title="struct GstMiniObject"><span class="type">GstMiniObject</span></a> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.18</div> |
| </body> |
| </html> |