blob: af9bdb5da94aa09e7df7961df395976cac97b938 [file] [log] [blame]
<!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: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer 1.0 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="GstBufferList.html" title="GstBufferList">
<meta name="generator" content="GTK-Doc V1.24 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GstBuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstBuffer.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstBin.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstBufferList.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstBuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstBuffer.top_of_page"></a>GstBuffer</span></h2>
<p>GstBuffer — Data-passing buffer type</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstBuffer.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-FLAGS:CAPS" title="GST_BUFFER_FLAGS()">GST_BUFFER_FLAGS</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-FLAG-IS-SET:CAPS" title="GST_BUFFER_FLAG_IS_SET()">GST_BUFFER_FLAG_IS_SET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-FLAG-SET:CAPS" title="GST_BUFFER_FLAG_SET()">GST_BUFFER_FLAG_SET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-FLAG-UNSET:CAPS" title="GST_BUFFER_FLAG_UNSET()">GST_BUFFER_FLAG_UNSET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-PTS:CAPS" title="GST_BUFFER_PTS()">GST_BUFFER_PTS</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-DTS:CAPS" title="GST_BUFFER_DTS()">GST_BUFFER_DTS</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-DURATION:CAPS" title="GST_BUFFER_DURATION()">GST_BUFFER_DURATION</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET:CAPS" title="GST_BUFFER_OFFSET()">GST_BUFFER_OFFSET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET-END:CAPS" title="GST_BUFFER_OFFSET_END()">GST_BUFFER_OFFSET_END</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE">GST_BUFFER_OFFSET_NONE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-DURATION-IS-VALID:CAPS" title="GST_BUFFER_DURATION_IS_VALID()">GST_BUFFER_DURATION_IS_VALID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-PTS-IS-VALID:CAPS" title="GST_BUFFER_PTS_IS_VALID()">GST_BUFFER_PTS_IS_VALID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-DTS-IS-VALID:CAPS" title="GST_BUFFER_DTS_IS_VALID()">GST_BUFFER_DTS_IS_VALID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET-IS-VALID:CAPS" title="GST_BUFFER_OFFSET_IS_VALID()">GST_BUFFER_OFFSET_IS_VALID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET-END-IS-VALID:CAPS" title="GST_BUFFER_OFFSET_END_IS_VALID()">GST_BUFFER_OFFSET_END_IS_VALID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#GST-BUFFER-IS-DISCONT:CAPS" title="GST_BUFFER_IS_DISCONT()">GST_BUFFER_IS_DISCONT</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-new" title="gst_buffer_new ()">gst_buffer_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-new-allocate" title="gst_buffer_new_allocate ()">gst_buffer_new_allocate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-new-wrapped" title="gst_buffer_new_wrapped ()">gst_buffer_new_wrapped</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-new-wrapped-full" title="gst_buffer_new_wrapped_full ()">gst_buffer_new_wrapped_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-ref" title="gst_buffer_ref ()">gst_buffer_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-unref" title="gst_buffer_unref ()">gst_buffer_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-sizes" title="gst_buffer_get_sizes ()">gst_buffer_get_sizes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-size" title="gst_buffer_get_size ()">gst_buffer_get_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-sizes-range" title="gst_buffer_get_sizes_range ()">gst_buffer_get_sizes_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-resize-range" title="gst_buffer_resize_range ()">gst_buffer_resize_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-resize" title="gst_buffer_resize ()">gst_buffer_resize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-set-size" title="gst_buffer_set_size ()">gst_buffer_set_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-max-memory" title="gst_buffer_get_max_memory ()">gst_buffer_get_max_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-peek-memory" title="gst_buffer_peek_memory ()">gst_buffer_peek_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-n-memory" title="gst_buffer_n_memory ()">gst_buffer_n_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-insert-memory" title="gst_buffer_insert_memory ()">gst_buffer_insert_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-replace-memory-range" title="gst_buffer_replace_memory_range ()">gst_buffer_replace_memory_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-memory-range" title="gst_buffer_get_memory_range ()">gst_buffer_get_memory_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-remove-memory-range" title="gst_buffer_remove_memory_range ()">gst_buffer_remove_memory_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-find-memory" title="gst_buffer_find_memory ()">gst_buffer_find_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-prepend-memory" title="gst_buffer_prepend_memory ()">gst_buffer_prepend_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-append-memory" title="gst_buffer_append_memory ()">gst_buffer_append_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-replace-memory" title="gst_buffer_replace_memory ()">gst_buffer_replace_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-replace-all-memory" title="gst_buffer_replace_all_memory ()">gst_buffer_replace_all_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-memory" title="gst_buffer_get_memory ()">gst_buffer_get_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-all-memory" title="gst_buffer_get_all_memory ()">gst_buffer_get_all_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-remove-memory" title="gst_buffer_remove_memory ()">gst_buffer_remove_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-remove-all-memory" title="gst_buffer_remove_all_memory ()">gst_buffer_remove_all_memory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-is-all-memory-writable" title="gst_buffer_is_all_memory_writable ()">gst_buffer_is_all_memory_writable</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-is-memory-range-writable" title="gst_buffer_is_memory_range_writable ()">gst_buffer_is_memory_range_writable</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-map" title="gst_buffer_map ()">gst_buffer_map</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-map-range" title="gst_buffer_map_range ()">gst_buffer_map_range</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-unmap" title="gst_buffer_unmap ()">gst_buffer_unmap</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-memcmp" title="gst_buffer_memcmp ()">gst_buffer_memcmp</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-extract" title="gst_buffer_extract ()">gst_buffer_extract</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-extract-dup" title="gst_buffer_extract_dup ()">gst_buffer_extract_dup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-fill" title="gst_buffer_fill ()">gst_buffer_fill</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-memset" title="gst_buffer_memset ()">gst_buffer_memset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GST-BUFFER-COPY-METADATA:CAPS" title="GST_BUFFER_COPY_METADATA">GST_BUFFER_COPY_METADATA</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GST-BUFFER-COPY-ALL:CAPS" title="GST_BUFFER_COPY_ALL">GST_BUFFER_COPY_ALL</a></td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-copy" title="gst_buffer_copy ()">gst_buffer_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-copy-into" title="gst_buffer_copy_into ()">gst_buffer_copy_into</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-copy-region" title="gst_buffer_copy_region ()">gst_buffer_copy_region</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-copy-deep" title="gst_buffer_copy_deep ()">gst_buffer_copy_deep</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()">gst_buffer_is_writable</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-make-writable" title="gst_buffer_make_writable()">gst_buffer_make_writable</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-replace" title="gst_buffer_replace ()">gst_buffer_replace</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-append" title="gst_buffer_append ()">gst_buffer_append</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-append-region" title="gst_buffer_append_region ()">gst_buffer_append_region</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-meta" title="gst_buffer_get_meta ()">gst_buffer_get_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-add-meta" title="gst_buffer_add_meta ()">gst_buffer_add_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-remove-meta" title="gst_buffer_remove_meta ()">gst_buffer_remove_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="returnvalue">GstMeta</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-iterate-meta" title="gst_buffer_iterate_meta ()">gst_buffer_iterate_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstBuffer.html#GstBufferForeachMetaFunc" title="GstBufferForeachMetaFunc ()">*GstBufferForeachMetaFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()">gst_buffer_foreach_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="returnvalue">GstParentBufferMeta</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-add-parent-buffer-meta" title="gst_buffer_add_parent_buffer_meta ()">gst_buffer_add_parent_buffer_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstBuffer.html#gst-buffer-get-parent-buffer-meta" title="gst_buffer_get_parent_buffer_meta()">gst_buffer_get_parent_buffer_meta</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBuffer.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GstBuffer-struct" title="struct GstBuffer">GstBuffer</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags">GstBufferFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags">GstBufferCopyFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta">GstParentBufferMeta</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a>
<span class="lineart">╰──</span> GstBuffer
</pre>
</div>
<div class="refsect1">
<a name="GstBuffer.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstBuffer.description"></a><h2>Description</h2>
<p>Buffers are the basic unit of data transfer in GStreamer. They contain the
timing and offset along with other arbitrary metadata that is associated
with the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> blocks that the buffer contains.</p>
<p>Buffers are usually created with <a class="link" href="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 add it to the buffer.
The following example creates a buffer that can hold a given video frame
with a given width, height and bits per plane.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9</pre></td>
<td class="listing_code"><pre class="programlisting">GstBuffer <span class="gtkdoc opt">*</span>buffer<span class="gtkdoc opt">;</span>
GstMemory <span class="gtkdoc opt">*</span>memory<span class="gtkdoc opt">;</span>
gint size<span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">,</span> bpp<span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">...</span>
size <span class="gtkdoc opt">=</span> width <span class="gtkdoc opt">*</span> height <span class="gtkdoc opt">*</span> bpp<span class="gtkdoc opt">;</span>
buffer <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html#gst-buffer-new">gst_buffer_new</a></span> <span class="gtkdoc opt">();</span>
memory <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html#gst-allocator-alloc">gst_allocator_alloc</a></span> <span class="gtkdoc opt">(</span>NULL<span class="gtkdoc opt">,</span> size<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html#gst-buffer-insert-memory">gst_buffer_insert_memory</a></span> <span class="gtkdoc opt">(</span>buffer<span class="gtkdoc opt">, -</span><span class="number">1</span><span class="gtkdoc opt">,</span> memory<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">...</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>Alternatively, use <a class="link" href="GstBuffer.html#gst-buffer-new-allocate" title="gst_buffer_new_allocate ()"><code class="function">gst_buffer_new_allocate()</code></a> to create a buffer with
preallocated data of a given size.</p>
<p>Buffers can contain a list of <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> objects. You can retrieve how many
memory objects with <a class="link" href="GstBuffer.html#gst-buffer-n-memory" title="gst_buffer_n_memory ()"><code class="function">gst_buffer_n_memory()</code></a> and you can get a pointer
to memory with <a class="link" href="GstBuffer.html#gst-buffer-peek-memory" title="gst_buffer_peek_memory ()"><code class="function">gst_buffer_peek_memory()</code></a></p>
<p>A buffer will usually have timestamps, 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 timestamps
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>The buffer DTS refers to the timestamp when the buffer should be decoded and
is usually monotonically increasing. The buffer PTS refers to the timestamp when
the buffer content should be presented to the user and is not always
monotonically increasing.</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 preceding CAPS event). Either or both
can be set to <a class="link" href="GstBuffer.html#GST-BUFFER-OFFSET-NONE:CAPS" title="GST_BUFFER_OFFSET_NONE"><span class="type">GST_BUFFER_OFFSET_NONE</span></a>.</p>
<p>gst_buffer_ref() is used to increase the refcount of a buffer. This must be
done when you want to keep a handle to the buffer after pushing it to the
next element. The buffer refcount determines the writability of the buffer, a
buffer is only writable when the refcount is exactly 1, i.e. when the caller
has the only reference to the buffer.</p>
<p>To efficiently create a smaller buffer out of an existing one, you can
use <a class="link" href="GstBuffer.html#gst-buffer-copy-region" title="gst_buffer_copy_region ()"><code class="function">gst_buffer_copy_region()</code></a>. This method tries to share the memory objects
between the two buffers.</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="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="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="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="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 class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags"><span class="type">GstBufferFlags</span></a> flag is set.</p>
<p>Buffers can be efficiently merged into a larger buffer with
<a class="link" href="GstBuffer.html#gst-buffer-append" title="gst_buffer_append ()"><code class="function">gst_buffer_append()</code></a>. Copying of memory will only be done when absolutely
needed.</p>
<p>Arbitrary extra metadata can be set on a buffer with <a class="link" href="GstBuffer.html#gst-buffer-add-meta" title="gst_buffer_add_meta ()"><code class="function">gst_buffer_add_meta()</code></a>.
Metadata can be retrieved with <a class="link" href="GstBuffer.html#gst-buffer-get-meta" title="gst_buffer_get_meta ()"><code class="function">gst_buffer_get_meta()</code></a>. See also <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a></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="GstBuffer.html#gst-buffer-unref" title="gst_buffer_unref ()"><code class="function">gst_buffer_unref()</code></a>. When
the refcount drops to 0, any memory and metadata pointed to by the buffer is
unreffed as well. Buffers allocated from a <a class="link" href="GstBufferPool.html" title="GstBufferPool"><span class="type">GstBufferPool</span></a> will be returned to
the pool when the refcount drops to 0.</p>
<p>The <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> is a meta which can be attached to a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>
to hold a reference to another buffer that is only released when the child
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> is released.</p>
<p>Typically, <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> is used when the child buffer is directly
using the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> of the parent buffer, and wants to prevent the parent
buffer from being returned to a buffer pool until the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> is available
for re-use. (Since 1.6)</p>
</div>
<div class="refsect1">
<a name="GstBuffer.functions_details"></a><h2>Functions</h2>
<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 class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags"><span class="type">GstBufferFlags</span></a> flags set on this buffer.</p>
<div class="refsect3">
<a name="id-1.3.7.8.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags"><span class="type">GstBufferFlags</span></a> flag to check.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags"><span class="type">GstBufferFlags</span></a> flag to set.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBuffer.html#GstBufferFlags" title="enum GstBufferFlags"><span class="type">GstBufferFlags</span></a> flag to clear.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-BUFFER-PTS:CAPS"></a><h3>GST_BUFFER_PTS()</h3>
<pre class="programlisting">#define GST_BUFFER_PTS(buf) (GST_BUFFER_CAST(buf)-&gt;pts)
</pre>
<p>The presentation timestamp (pts) 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. This is the timestamp when the media should be
presented to the user.
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 pts is unknown.</p>
<div class="refsect3">
<a name="id-1.3.7.8.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.:</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-BUFFER-DTS:CAPS"></a><h3>GST_BUFFER_DTS()</h3>
<pre class="programlisting">#define GST_BUFFER_DTS(buf) (GST_BUFFER_CAST(buf)-&gt;dts)
</pre>
<p>The decoding timestamp (dts) 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. This is the timestamp when the media should be
decoded or processed otherwise.
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 dts is unknown.</p>
<div class="refsect3">
<a name="id-1.3.7.8.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.:</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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)-&gt;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="refsect3">
<a name="id-1.3.7.8.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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)-&gt;offset)
</pre>
<p>The offset in the source file of the beginning of this buffer.</p>
<div class="refsect3">
<a name="id-1.3.7.8.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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)-&gt;offset_end)
</pre>
<p>The offset in the source file of the end of this buffer.</p>
<div class="refsect3">
<a name="id-1.3.7.8.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-BUFFER-PTS-IS-VALID:CAPS"></a><h3>GST_BUFFER_PTS_IS_VALID()</h3>
<pre class="programlisting">#define GST_BUFFER_PTS_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buffer)))
</pre>
<p>Tests if the pts is known.</p>
<div class="refsect3">
<a name="id-1.3.7.8.13.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-BUFFER-DTS-IS-VALID:CAPS"></a><h3>GST_BUFFER_DTS_IS_VALID()</h3>
<pre class="programlisting">#define GST_BUFFER_DTS_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buffer)))
</pre>
<p>Tests if the dts is known.</p>
<div class="refsect3">
<a name="id-1.3.7.8.14.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.15.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.16.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="id-1.3.7.8.17.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-new"></a><h3>gst_buffer_new ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="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="refsect3">
<a name="id-1.3.7.8.18.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</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="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_new_allocate (<em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>,
<em class="parameter"><code><span class="type">gsize</span> size</code></em>,
<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre>
<p>Tries to create a newly allocated buffer with data of the given size and
extra parameters from <em class="parameter"><code>allocator</code></em>
. If the requested amount of memory can't be
allocated, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned. The allocated buffer memory is not cleared.</p>
<p>When <em class="parameter"><code>allocator</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the default memory allocator will be used.</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="refsect3">
<a name="id-1.3.7.8.19.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>allocator</p></td>
<td class="parameter_description"><p> the <a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> to use, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the
default allocator. </p></td>
<td class="parameter_annotations"><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>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size in bytes of the new buffer's data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p> optional parameters. </p></td>
<td class="parameter_annotations"><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>
<div class="refsect3">
<a name="id-1.3.7.8.19.9"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
the memory couldn't be allocated. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</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="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_new_wrapped (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
<em class="parameter"><code><span class="type">gsize</span> size</code></em>);</pre>
<p>Creates a new buffer that wraps the given <em class="parameter"><code>data</code></em>
. The memory will be freed
with g_free and will be marked writable.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.3.7.8.20.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> data to wrap. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>allocated size of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.20.7"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_new_wrapped_full (<em class="parameter"><code><a class="link" href="GstMemory.html#GstMemoryFlags" title="enum GstMemoryFlags"><span class="type">GstMemoryFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
<em class="parameter"><code><span class="type">gsize</span> maxsize</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> size</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>Allocate a new buffer that wraps the given memory. <em class="parameter"><code>data</code></em>
must point to
<em class="parameter"><code>maxsize</code></em>
of memory, the wrapped buffer will have the region from <em class="parameter"><code>offset</code></em>
and
<em class="parameter"><code>size</code></em>
visible.</p>
<p>When the buffer is destroyed, <em class="parameter"><code>notify</code></em>
will be called with <em class="parameter"><code>user_data</code></em>
.</p>
<p>The prefix/padding must be filled with 0 if <em class="parameter"><code>flags</code></em>
contains
<a class="link" href="GstMemory.html#GST-MEMORY-FLAG-ZERO-PREFIXED:CAPS"><span class="type">GST_MEMORY_FLAG_ZERO_PREFIXED</span></a> and <a class="link" href="GstMemory.html#GST-MEMORY-FLAG-ZERO-PADDED:CAPS"><span class="type">GST_MEMORY_FLAG_ZERO_PADDED</span></a> respectively.</p>
<div class="refsect3">
<a name="id-1.3.7.8.21.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p><a class="link" href="GstMemory.html#GstMemoryFlags" title="enum GstMemoryFlags"><span class="type">GstMemoryFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> data to wrap. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>maxsize</p></td>
<td class="parameter_description"><p>allocated size of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>offset in <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>size of valid data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user_data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>notify</p></td>
<td class="parameter_description"><p> called with <em class="parameter"><code>user_data</code></em>
when the memory is freed. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> user_data]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.21.8"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-ref"></a><h3>gst_buffer_ref ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_ref (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="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 writability
of <em class="parameter"><code>buf</code></em>
and its metadata, see <a class="link" href="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_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="refsect3">
<a name="id-1.3.7.8.22.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.22.7"></a><h4>Returns</h4>
<p> <em class="parameter"><code>buf</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="GstBuffer.html" title="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
with the associated metadata and memory will be freed.</p>
<div class="refsect3">
<a name="id-1.3.7.8.23.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-sizes"></a><h3>gst_buffer_get_sizes ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_get_sizes (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *maxsize</code></em>);</pre>
<p>Get the total size of the memory blocks in <em class="parameter"><code>b</code></em>
.</p>
<p>When not <a href="https://developer.gnome.org/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 memory blocks with <a class="link" href="GstBuffer.html#gst-buffer-resize" title="gst_buffer_resize ()"><code class="function">gst_buffer_resize()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.24.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p> a pointer to the offset. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>maxsize</p></td>
<td class="parameter_description"><p> a pointer to the maxsize. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</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>
<div class="refsect3">
<a name="id-1.3.7.8.24.7"></a><h4>Returns</h4>
<p> total size of the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-size"></a><h3>gst_buffer_get_size ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_get_size (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Get the total size of the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.25.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.25.6"></a><h4>Returns</h4>
<p> total size of the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-sizes-range"></a><h3>gst_buffer_get_sizes_range ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_get_sizes_range (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *maxsize</code></em>);</pre>
<p>Get the total size of <em class="parameter"><code>length</code></em>
memory blocks stating from <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
.</p>
<p>When not <a href="https://developer.gnome.org/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
memory block in <em class="parameter"><code>buffer</code></em>
at <em class="parameter"><code>idx</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 memory block at <em class="parameter"><code>idx</code></em>
+
<em class="parameter"><code>length</code></em>
-1.
<em class="parameter"><code>offset</code></em>
and <em class="parameter"><code>maxsize</code></em>
can be used to resize the buffer memory blocks with
<a class="link" href="GstBuffer.html#gst-buffer-resize-range" title="gst_buffer_resize_range ()"><code class="function">gst_buffer_resize_range()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.26.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p> a pointer to the offset. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>maxsize</p></td>
<td class="parameter_description"><p> a pointer to the maxsize. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</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>
<div class="refsect3">
<a name="id-1.3.7.8.26.7"></a><h4>Returns</h4>
<p> total size of <em class="parameter"><code>length</code></em>
memory blocks starting at <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-resize-range"></a><h3>gst_buffer_resize_range ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_resize_range (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><span class="type">gssize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gssize</span> size</code></em>);</pre>
<p>Set the total size of the <em class="parameter"><code>length</code></em>
memory blocks starting at <em class="parameter"><code>idx</code></em>
in
<em class="parameter"><code>buffer</code></em>
</p>
<div class="refsect3">
<a name="id-1.3.7.8.27.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset adjustment</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the new size or -1 to just adjust the offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.27.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if resizing succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
</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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gssize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gssize</span> size</code></em>);</pre>
<p>Set the offset and total size of the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.28.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset adjustment</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the new size or -1 to just adjust the offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-set-size"></a><h3>gst_buffer_set_size ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_set_size (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gssize</span> size</code></em>);</pre>
<p>Set the total size of the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.29.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the new size</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-max-memory"></a><h3>gst_buffer_get_max_memory ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_buffer_get_max_memory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Get the maximum amount of memory blocks that a buffer can hold. This is a
compile time constant that can be queried with the function.</p>
<p>When more memory blocks are added, existing memory blocks will be merged
together to make room for the new block.</p>
<div class="refsect3">
<a name="id-1.3.7.8.30.6"></a><h4>Returns</h4>
<p> the maximum amount of memory blocks that a buffer can hold.</p>
</div>
<p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p>
</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="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_buffer_peek_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>);</pre>
<p>Get the memory block at <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
. The memory block stays valid until
the memory block in <em class="parameter"><code>buffer</code></em>
is removed, replaced or merged, typically with
any call that modifies the memory in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.31.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.31.6"></a><h4>Returns</h4>
<p> the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> at <em class="parameter"><code>idx</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-n-memory"></a><h3>gst_buffer_n_memory ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Get the amount of memory blocks that this buffer has. This amount is never
larger than what <a class="link" href="GstBuffer.html#gst-buffer-get-max-memory" title="gst_buffer_get_max_memory ()"><code class="function">gst_buffer_get_max_memory()</code></a> returns.</p>
<div class="refsect3">
<a name="id-1.3.7.8.32.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.32.6"></a><h4>Returns</h4>
<p> the amount of memory block in this buffer. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-insert-memory"></a><h3>gst_buffer_insert_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_insert_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> idx</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Insert 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>
<p>Only <a class="link" href="GstBuffer.html#gst-buffer-get-max-memory" title="gst_buffer_get_max_memory ()"><code class="function">gst_buffer_get_max_memory()</code></a> can be added to a buffer. If more memory is
added, existing memory blocks will automatically be merged to make room for
the new memory.</p>
<div class="refsect3">
<a name="id-1.3.7.8.33.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>the index to add the memory at, or -1 to append it to the end</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-replace-memory-range"></a><h3>gst_buffer_replace_memory_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_replace_memory_range (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Replaces <em class="parameter"><code>length</code></em>
memory blocks in <em class="parameter"><code>buffer</code></em>
starting at <em class="parameter"><code>idx</code></em>
with <em class="parameter"><code>mem</code></em>
.</p>
<p>If <em class="parameter"><code>length</code></em>
is -1, all memory starting from <em class="parameter"><code>idx</code></em>
will be removed and
replaced with <em class="parameter"><code>mem</code></em>
.</p>
<p><em class="parameter"><code>buffer</code></em>
should be writable.</p>
<div class="refsect3">
<a name="id-1.3.7.8.34.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length should not be 0</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-memory-range"></a><h3>gst_buffer_get_memory_range ()</h3>
<pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_buffer_get_memory_range (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>);</pre>
<p>Get <em class="parameter"><code>length</code></em>
memory blocks in <em class="parameter"><code>buffer</code></em>
starting at <em class="parameter"><code>idx</code></em>
. The memory blocks will
be merged into one large <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>.</p>
<p>If <em class="parameter"><code>length</code></em>
is -1, all memory starting from <em class="parameter"><code>idx</code></em>
is merged.</p>
<div class="refsect3">
<a name="id-1.3.7.8.35.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.35.7"></a><h4>Returns</h4>
<p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> that contains the merged data of <em class="parameter"><code>length</code></em>
blocks starting at <em class="parameter"><code>idx</code></em>
. Use <a class="link" href="GstMemory.html#gst-memory-unref" title="gst_memory_unref ()"><code class="function">gst_memory_unref()</code></a> after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>);</pre>
<p>Remove <em class="parameter"><code>length</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="refsect3">
<a name="id-1.3.7.8.36.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-find-memory"></a><h3>gst_buffer_find_memory ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_find_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> size</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *length</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *skip</code></em>);</pre>
<p>Find the memory blocks that span <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>
.</p>
<p>When this function returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <em class="parameter"><code>idx</code></em>
will contain the index of the first
memory block where the byte for <em class="parameter"><code>offset</code></em>
can be found and <em class="parameter"><code>length</code></em>
contains the
number of memory blocks containing the <em class="parameter"><code>size</code></em>
remaining bytes. <em class="parameter"><code>skip</code></em>
contains
the number of bytes to skip in the memory block at <em class="parameter"><code>idx</code></em>
to get to the byte
for <em class="parameter"><code>offset</code></em>
.</p>
<p><em class="parameter"><code>size</code></em>
can be -1 to get all the memory blocks after <em class="parameter"><code>idx</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.37.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>an offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a size</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p> pointer to index. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p> pointer to length. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>skip</p></td>
<td class="parameter_description"><p> pointer to skip. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.37.8"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when <em class="parameter"><code>size</code></em>
bytes starting from <em class="parameter"><code>offset</code></em>
could be found in
<em class="parameter"><code>buffer</code></em>
and <em class="parameter"><code>idx</code></em>
, <em class="parameter"><code>length</code></em>
and <em class="parameter"><code>skip</code></em>
will be filled.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-prepend-memory"></a><h3>gst_buffer_prepend_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_prepend_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Prepend the memory block <em class="parameter"><code>mem</code></em>
to <em class="parameter"><code>buffer</code></em>
. This function takes
ownership of <em class="parameter"><code>mem</code></em>
and thus doesn't increase its refcount.</p>
<p>This function is identical to <a class="link" href="GstBuffer.html#gst-buffer-insert-memory" title="gst_buffer_insert_memory ()"><code class="function">gst_buffer_insert_memory()</code></a> with an index of 0.
See <a class="link" href="GstBuffer.html#gst-buffer-insert-memory" title="gst_buffer_insert_memory ()"><code class="function">gst_buffer_insert_memory()</code></a> for more details.</p>
<div class="refsect3">
<a name="id-1.3.7.8.38.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-append-memory"></a><h3>gst_buffer_append_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_append_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Append the memory block <em class="parameter"><code>mem</code></em>
to <em class="parameter"><code>buffer</code></em>
. This function takes
ownership of <em class="parameter"><code>mem</code></em>
and thus doesn't increase its refcount.</p>
<p>This function is identical to <a class="link" href="GstBuffer.html#gst-buffer-insert-memory" title="gst_buffer_insert_memory ()"><code class="function">gst_buffer_insert_memory()</code></a> with an index of -1.
See <a class="link" href="GstBuffer.html#gst-buffer-insert-memory" title="gst_buffer_insert_memory ()"><code class="function">gst_buffer_insert_memory()</code></a> for more details.</p>
<div class="refsect3">
<a name="id-1.3.7.8.39.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-replace-memory"></a><h3>gst_buffer_replace_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_replace_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Replaces the memory block at index <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
with <em class="parameter"><code>mem</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.40.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-replace-all-memory"></a><h3>gst_buffer_replace_all_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_replace_all_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<p>Replaces all memory in <em class="parameter"><code>buffer</code></em>
with <em class="parameter"><code>mem</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.41.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-memory"></a><h3>gst_buffer_get_memory ()</h3>
<pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_buffer_get_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>);</pre>
<p>Get the memory block at index <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.42.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.42.6"></a><h4>Returns</h4>
<p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> that contains the data of the
memory block at <em class="parameter"><code>idx</code></em>
. Use <a class="link" href="GstMemory.html#gst-memory-unref" title="gst_memory_unref ()"><code class="function">gst_memory_unref()</code></a> after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-all-memory"></a><h3>gst_buffer_get_all_memory ()</h3>
<pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_buffer_get_all_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Get all the memory block in <em class="parameter"><code>buffer</code></em>
. The memory blocks will be merged
into one large <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.43.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.43.6"></a><h4>Returns</h4>
<p> a <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> that contains the merged memory.
Use <a class="link" href="GstMemory.html#gst-memory-unref" title="gst_memory_unref ()"><code class="function">gst_memory_unref()</code></a> after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-remove-memory"></a><h3>gst_buffer_remove_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_remove_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>);</pre>
<p>Remove the memory block in <em class="parameter"><code>b</code></em>
at index <em class="parameter"><code>i</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.44.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-remove-all-memory"></a><h3>gst_buffer_remove_all_memory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_remove_all_memory (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Remove all the memory blocks in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.45.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-is-all-memory-writable"></a><h3>gst_buffer_is_all_memory_writable ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_is_all_memory_writable (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Check if all memory blocks in <em class="parameter"><code>buffer</code></em>
are writable.</p>
<p>Note that this function does not check if <em class="parameter"><code>buffer</code></em>
is writable, use
<a class="link" href="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a> to check that if needed.</p>
<div class="refsect3">
<a name="id-1.3.7.8.46.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.46.7"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all memory blocks in <em class="parameter"><code>buffer</code></em>
are writable</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.4">1.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-is-memory-range-writable"></a><h3>gst_buffer_is_memory_range_writable ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_is_memory_range_writable (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>);</pre>
<p>Check if <em class="parameter"><code>length</code></em>
memory blocks in <em class="parameter"><code>buffer</code></em>
starting from <em class="parameter"><code>idx</code></em>
are writable.</p>
<p><em class="parameter"><code>length</code></em>
can be -1 to check all the memory blocks after <em class="parameter"><code>idx</code></em>
.</p>
<p>Note that this function does not check if <em class="parameter"><code>buffer</code></em>
is writable, use
<a class="link" href="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a> to check that if needed.</p>
<div class="refsect3">
<a name="id-1.3.7.8.47.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length should not be 0</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.47.8"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the memory range is writable</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.4">1.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-map"></a><h3>gst_buffer_map ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_map (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a> *info</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>);</pre>
<p>This function fills <em class="parameter"><code>info</code></em>
with the <a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a> of all merged memory
blocks in <em class="parameter"><code>buffer</code></em>
.</p>
<p><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="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="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a>).</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>The memory in <em class="parameter"><code>info</code></em>
should be unmapped with <a class="link" href="GstBuffer.html#gst-buffer-unmap" title="gst_buffer_unmap ()"><code class="function">gst_buffer_unmap()</code></a> after
usage.</p>
<div class="refsect3">
<a name="id-1.3.7.8.48.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p> info about the mapping. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for the mapping</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.48.9"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the map succeeded and <em class="parameter"><code>info</code></em>
contains valid data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-map-range"></a><h3>gst_buffer_map_range ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_map_range (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> idx</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a> *info</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html#GstMapFlags" title="enum GstMapFlags"><span class="type">GstMapFlags</span></a> flags</code></em>);</pre>
<p>This function fills <em class="parameter"><code>info</code></em>
with the <a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a> of <em class="parameter"><code>length</code></em>
merged memory blocks
starting at <em class="parameter"><code>idx</code></em>
in <em class="parameter"><code>buffer</code></em>
. When <em class="parameter"><code>length</code></em>
is -1, all memory blocks starting
from <em class="parameter"><code>idx</code></em>
are merged and mapped.</p>
<p><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="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="GstBuffer.html#gst-buffer-is-writable" title="gst_buffer_is_writable()"><code class="function">gst_buffer_is_writable()</code></a>).</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>The memory in <em class="parameter"><code>info</code></em>
should be unmapped with <a class="link" href="GstBuffer.html#gst-buffer-unmap" title="gst_buffer_unmap ()"><code class="function">gst_buffer_unmap()</code></a> after usage.</p>
<div class="refsect3">
<a name="id-1.3.7.8.49.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idx</p></td>
<td class="parameter_description"><p>an index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>a length</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p> info about the mapping. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags for the mapping</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.49.9"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the map succeeded and <em class="parameter"><code>info</code></em>
contains valid
data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-unmap"></a><h3>gst_buffer_unmap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_unmap (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a> *info</code></em>);</pre>
<p>Release the memory previously mapped with <a class="link" href="GstBuffer.html#gst-buffer-map" title="gst_buffer_map ()"><code class="function">gst_buffer_map()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.50.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstMemory.html#GstMapInfo" title="GstMapInfo"><span class="type">GstMapInfo</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-memcmp"></a><h3>gst_buffer_memcmp ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gst_buffer_memcmp (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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="refsect3">
<a name="id-1.3.7.8.51.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset in <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mem</p></td>
<td class="parameter_description"><p> the memory to compare. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size to compare</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.51.6"></a><h4>Returns</h4>
<p> 0 if the memory is equal.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-extract"></a><h3>gst_buffer_extract ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_extract (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> dest</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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="refsect3">
<a name="id-1.3.7.8.52.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset to extract</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>the destination address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size to extract</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.52.6"></a><h4>Returns</h4>
<p> 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.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-extract-dup"></a><h3>gst_buffer_extract_dup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_buffer_extract_dup (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> size</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *dest</code></em>,
<em class="parameter"><code><span class="type">gsize</span> *dest_size</code></em>);</pre>
<p>Extracts a copy of at most <em class="parameter"><code>size</code></em>
bytes the data at <em class="parameter"><code>offset</code></em>
into a <a href="https://developer.gnome.org/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>.
<em class="parameter"><code>dest</code></em>
must be freed using <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when done.</p>
<div class="refsect3">
<a name="id-1.3.7.8.53.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset to extract</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size to extract</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p> A pointer where
the destination array will be written. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=dest_size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>dest_size</p></td>
<td class="parameter_description"><p> A location where the size of <em class="parameter"><code>dest</code></em>
can be written. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.0.10">1.0.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-fill"></a><h3>gst_buffer_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_fill (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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="refsect3">
<a name="id-1.3.7.8.54.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset to fill</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p> the source address. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size to fill</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.54.6"></a><h4>Returns</h4>
<p> 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.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-memset"></a><h3>gst_buffer_memset ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gst_buffer_memset (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">guint8</span> val</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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="refsect3">
<a name="id-1.3.7.8.55.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset in <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>val</p></td>
<td class="parameter_description"><p>the value to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.55.6"></a><h4>Returns</h4>
<p> 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.</p>
</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</pre>
<p>Combination of all possible metadata fields that can be copied with
<a class="link" href="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="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="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_copy (<em class="parameter"><code>const <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre>
<p>Create a copy of the given buffer. This will only copy the buffer's
data to a newly allocated memory if needed (if the type of memory
requires it), otherwise the underlying data is just referenced.
Check <a class="link" href="GstBuffer.html#gst-buffer-copy-deep" title="gst_buffer_copy_deep ()"><code class="function">gst_buffer_copy_deep()</code></a> if you want to force the data
to be copied to newly allocated memory.</p>
<div class="refsect3">
<a name="id-1.3.7.8.58.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.58.6"></a><h4>Returns</h4>
<p> a new copy of <em class="parameter"><code>buf</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-copy-into"></a><h3>gst_buffer_copy_into ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_copy_into (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *dest</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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>If <em class="parameter"><code>dest</code></em>
already contains memory and <em class="parameter"><code>flags</code></em>
contains GST_BUFFER_COPY_MEMORY,
the memory from <em class="parameter"><code>src</code></em>
will be appended to <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="refsect3">
<a name="id-1.3.7.8.59.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>a destination <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a source <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags indicating what metadata fields should be copied.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>offset to copy from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>total size to copy. If -1, all data is copied.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.59.8"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the copying succeeded, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
</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="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_copy_region (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *parent</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a> flags</code></em>,
<em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gsize</span> 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="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="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="refsect3">
<a name="id-1.3.7.8.60.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parent</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBuffer.html#GstBufferCopyFlags" title="enum GstBufferCopyFlags"><span class="type">GstBufferCopyFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset into parent <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> at which the new sub-buffer
begins.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size of the new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> sub-buffer, in bytes. If -1, all
data is copied.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.60.7"></a><h4>Returns</h4>
<p> the new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the arguments were
invalid. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-copy-deep"></a><h3>gst_buffer_copy_deep ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_copy_deep (<em class="parameter"><code>const <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre>
<p>Create a copy of the given buffer. This will make a newly allocated
copy of the data the source buffer contains.</p>
<div class="refsect3">
<a name="id-1.3.7.8.61.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.61.6"></a><h4>Returns</h4>
<p> a new copy of <em class="parameter"><code>buf</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</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 to a buffer's metadata or its memory array.
It is only safe to change buffer metadata when the current reference is
writable, i.e. nobody can see the modifications you will make.</p>
<div class="refsect3">
<a name="id-1.3.7.8.62.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="GstBuffer.html#gst-buffer-copy" title="gst_buffer_copy ()"><code class="function">gst_buffer_copy()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.63.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p></td>
<td class="parameter_annotations"><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>
<div class="refsect3">
<a name="id-1.3.7.8.63.6"></a><h4>Returns</h4>
<p> a writable buffer which may or may not be the
same as <em class="parameter"><code>buf</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-replace"></a><h3>gst_buffer_replace ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_replace (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> **obuf</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *nbuf</code></em>);</pre>
<p>Modifies a pointer to a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to point to a different <a class="link" href="GstBuffer.html" title="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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> pointed to by <em class="parameter"><code>obuf</code></em>
may be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.8.64.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>obuf</p></td>
<td class="parameter_description"><p> pointer to a pointer to
a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to be replaced. </p></td>
<td class="parameter_annotations"><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>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>nbuf</p></td>
<td class="parameter_description"><p> pointer to a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> that will
replace the buffer pointed to by <em class="parameter"><code>obuf</code></em>
. </p></td>
<td class="parameter_annotations"><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>
<div class="refsect3">
<a name="id-1.3.7.8.64.7"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when <em class="parameter"><code>obuf</code></em>
was different from <em class="parameter"><code>nbuf</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-append"></a><h3>gst_buffer_append ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_append (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>);</pre>
<p>Append all the memory from <em class="parameter"><code>buf2</code></em>
to <em class="parameter"><code>buf1</code></em>
. The result buffer will contain a
concatenation of the memory of <em class="parameter"><code>buf1</code></em>
and <em class="parameter"><code>buf2</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.65.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf1</p></td>
<td class="parameter_description"><p> the first source <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to append. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>buf2</p></td>
<td class="parameter_description"><p> the second source <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to append. </p></td>
<td class="parameter_annotations"><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>
<div class="refsect3">
<a name="id-1.3.7.8.65.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> that contains the memory
of the two source buffers. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-append-region"></a><h3>gst_buffer_append_region ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
gst_buffer_append_region (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf1</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buf2</code></em>,
<em class="parameter"><code><span class="type">gssize</span> offset</code></em>,
<em class="parameter"><code><span class="type">gssize</span> size</code></em>);</pre>
<p>Append <em class="parameter"><code>size</code></em>
bytes at <em class="parameter"><code>offset</code></em>
from <em class="parameter"><code>buf2</code></em>
to <em class="parameter"><code>buf1</code></em>
. The result buffer will
contain a concatenation of the memory of <em class="parameter"><code>buf1</code></em>
and the requested region of
<em class="parameter"><code>buf2</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.7.8.66.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buf1</p></td>
<td class="parameter_description"><p> the first source <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to append. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>buf2</p></td>
<td class="parameter_description"><p> the second source <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to append. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset in <em class="parameter"><code>buf2</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size or -1 of <em class="parameter"><code>buf2</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.66.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> that contains the memory
of the two source buffers. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> api</code></em>);</pre>
<p>Get the metadata for <em class="parameter"><code>api</code></em>
on buffer. When there is no such metadata, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is
returned. If multiple metadata with the given <em class="parameter"><code>api</code></em>
are attached to this
buffer only the first one is returned. To handle multiple metadata with a
given API use <a class="link" href="GstBuffer.html#gst-buffer-iterate-meta" title="gst_buffer_iterate_meta ()"><code class="function">gst_buffer_iterate_meta()</code></a> or <a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()"><code class="function">gst_buffer_foreach_meta()</code></a> instead
and check the meta-&gt;info.api member for the API type.</p>
<div class="refsect3">
<a name="id-1.3.7.8.67.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>api</p></td>
<td class="parameter_description"><p>the <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of an API</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.67.6"></a><h4>Returns</h4>
<p> the metadata for <em class="parameter"><code>api</code></em>
on
<em class="parameter"><code>buffer</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</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="GstBuffer.html" title="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="https://developer.gnome.org/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="refsect3">
<a name="id-1.3.7.8.68.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>params for <em class="parameter"><code>info</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.68.6"></a><h4>Returns</h4>
<p> the metadata for the api in <em class="parameter"><code>info</code></em>
on <em class="parameter"><code>buffer</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-remove-meta"></a><h3>gst_buffer_remove_meta ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/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="GstBuffer.html" title="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="refsect3">
<a name="id-1.3.7.8.69.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.69.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the metadata existed and was removed, <a href="https://developer.gnome.org/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>
.</p>
</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="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/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="https://developer.gnome.org/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 opaque state pointer</p>
<div class="refsect3">
<a name="id-1.3.7.8.70.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>state</p></td>
<td class="parameter_description"><p>an opaque state pointer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.70.7"></a><h4>Returns</h4>
<p> The next <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
when there are no more items. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferForeachMetaFunc"></a><h3>GstBufferForeachMetaFunc ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GstBufferForeachMetaFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="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>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>A function that will be called from <a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()"><code class="function">gst_buffer_foreach_meta()</code></a>. The <em class="parameter"><code>meta</code></em>
field will point to a the reference of the meta.</p>
<p><em class="parameter"><code>buffer</code></em>
should not be modified from this callback.</p>
<p>When this function returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the next meta will be
returned. When <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned, <a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()"><code class="function">gst_buffer_foreach_meta()</code></a> will return.</p>
<p>When <em class="parameter"><code>meta</code></em>
is set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the item will be removed from the buffer.</p>
<div class="refsect3">
<a name="id-1.3.7.8.71.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>meta</p></td>
<td class="parameter_description"><p> a pointer to a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data passed to <a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()"><code class="function">gst_buffer_foreach_meta()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.71.9"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when <a class="link" href="GstBuffer.html#gst-buffer-foreach-meta" title="gst_buffer_foreach_meta ()"><code class="function">gst_buffer_foreach_meta()</code></a> should stop</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-foreach-meta"></a><h3>gst_buffer_foreach_meta ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_buffer_foreach_meta (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html#GstBufferForeachMetaFunc" title="GstBufferForeachMetaFunc ()"><span class="type">GstBufferForeachMetaFunc</span></a> func</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Call <em class="parameter"><code>func</code></em>
with <em class="parameter"><code>user_data</code></em>
for each meta in <em class="parameter"><code>buffer</code></em>
.</p>
<p><em class="parameter"><code>func</code></em>
can modify the passed meta pointer or its contents. The return value
of <em class="parameter"><code>func</code></em>
define if this function returns or if the remaining metadata items
in the buffer should be skipped.</p>
<div class="refsect3">
<a name="id-1.3.7.8.72.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html#GstBufferForeachMetaFunc" title="GstBufferForeachMetaFunc ()"><span class="type">GstBufferForeachMetaFunc</span></a> to call. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data passed to <em class="parameter"><code>func</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.72.7"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when <em class="parameter"><code>func</code></em>
returned <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for one of the metadata.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-add-parent-buffer-meta"></a><h3>gst_buffer_add_parent_buffer_meta ()</h3>
<pre class="programlisting"><a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="returnvalue">GstParentBufferMeta</span></a> *
gst_buffer_add_parent_buffer_meta (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *ref</code></em>);</pre>
<p>Add a <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> to <em class="parameter"><code>buffer</code></em>
that holds a reference on
<em class="parameter"><code>ref</code></em>
until the buffer is freed.</p>
<div class="refsect3">
<a name="id-1.3.7.8.73.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. </p></td>
<td class="parameter_annotations"><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 class="parameter_name"><p>ref</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> to ref. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.7.8.73.6"></a><h4>Returns</h4>
<p> The <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> that was added to the buffer. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-get-parent-buffer-meta"></a><h3>gst_buffer_get_parent_buffer_meta()</h3>
<pre class="programlisting">#define gst_buffer_get_parent_buffer_meta(b)</pre>
<p>Find and return a <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> if one exists on the
buffer</p>
<div class="refsect3">
<a name="id-1.3.7.8.74.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstBuffer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstBuffer-struct"></a><h3>struct GstBuffer</h3>
<pre class="programlisting">struct GstBuffer {
GstMiniObject mini_object;
GstBufferPool *pool;
/* timestamp */
GstClockTime pts;
GstClockTime dts;
GstClockTime duration;
/* media specific offset */
guint64 offset;
guint64 offset_end;
};
</pre>
<p>The structure of a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>. Use the associated macros to access the public
variables.</p>
<div class="refsect3">
<a name="id-1.3.7.9.2.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMiniObject.html#GstMiniObject" title="struct GstMiniObject"><span class="type">GstMiniObject</span></a> <em class="structfield"><code><a name="GstBuffer-struct.mini-object"></a>mini_object</code></em>;</p></td>
<td class="struct_member_description"><p>the parent structure</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstBufferPool.html" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *<em class="structfield"><code><a name="GstBuffer-struct.pool"></a>pool</code></em>;</p></td>
<td class="struct_member_description"><p>pointer to the pool owner of the buffer</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstBuffer-struct.pts"></a>pts</code></em>;</p></td>
<td class="struct_member_description"><p>presentation 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
pts is not known or relevant. The pts contains the timestamp when the
media should be presented to the user.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstBuffer-struct.dts"></a>dts</code></em>;</p></td>
<td class="struct_member_description"><p>decoding 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
dts is not known or relevant. The dts contains the timestamp when the
media should be processed.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstBuffer-struct.duration"></a>duration</code></em>;</p></td>
<td class="struct_member_description"><p>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.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="GstBuffer-struct.offset"></a>offset</code></em>;</p></td>
<td class="struct_member_description"><p>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.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="GstBuffer-struct.offset-end"></a>offset_end</code></em>;</p></td>
<td class="struct_member_description"><p>the last offset contained in this buffer. It has the same
format as <em class="parameter"><code>offset</code></em>
.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferFlags"></a><h3>enum GstBufferFlags</h3>
<p>A set of buffer flags used to describe properties of a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>.</p>
<div class="refsect3">
<a name="id-1.3.7.9.3.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-LIVE:CAPS"></a>GST_BUFFER_FLAG_LIVE</p></td>
<td class="enum_member_description">
<p>the buffer is live data and should be discarded in
the PAUSED state.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-DECODE-ONLY:CAPS"></a>GST_BUFFER_FLAG_DECODE_ONLY</p></td>
<td class="enum_member_description">
<p>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.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-DISCONT:CAPS"></a>GST_BUFFER_FLAG_DISCONT</p></td>
<td class="enum_member_description">
<p>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.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-RESYNC:CAPS"></a>GST_BUFFER_FLAG_RESYNC</p></td>
<td class="enum_member_description">
<p>the buffer timestamps might have a discontinuity
and this buffer is a good point to resynchronize.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-CORRUPTED:CAPS"></a>GST_BUFFER_FLAG_CORRUPTED</p></td>
<td class="enum_member_description">
<p>the buffer data is corrupted.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-MARKER:CAPS"></a>GST_BUFFER_FLAG_MARKER</p></td>
<td class="enum_member_description">
<p>the buffer contains a media specific marker. for
video this is typically the end of a frame boundary, for audio
this is usually the start of a talkspurt.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-HEADER:CAPS"></a>GST_BUFFER_FLAG_HEADER</p></td>
<td class="enum_member_description">
<p>the buffer contains header information that is
needed to decode the following data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-GAP:CAPS"></a>GST_BUFFER_FLAG_GAP</p></td>
<td class="enum_member_description">
<p>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).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-DROPPABLE:CAPS"></a>GST_BUFFER_FLAG_DROPPABLE</p></td>
<td class="enum_member_description">
<p>the buffer can be dropped without breaking the
stream, for example to reduce bandwidth.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-DELTA-UNIT:CAPS"></a>GST_BUFFER_FLAG_DELTA_UNIT</p></td>
<td class="enum_member_description">
<p>this unit cannot be decoded independently.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-TAG-MEMORY:CAPS"></a>GST_BUFFER_FLAG_TAG_MEMORY</p></td>
<td class="enum_member_description">
<p>this flag is set when memory of the buffer
is added/removed</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-SYNC-AFTER:CAPS"></a>GST_BUFFER_FLAG_SYNC_AFTER</p></td>
<td class="enum_member_description">
<p>Elements which write to disk or permanent
storage should ensure the data is synced after
writing the contents of this buffer. (Since 1.6)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-FLAG-LAST:CAPS"></a>GST_BUFFER_FLAG_LAST</p></td>
<td class="enum_member_description">
<p>additional media specific flags can be added starting from
this flag.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferCopyFlags"></a><h3>enum GstBufferCopyFlags</h3>
<p>A set of flags that can be provided to the <a class="link" href="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="refsect3">
<a name="id-1.3.7.9.4.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-NONE:CAPS"></a>GST_BUFFER_COPY_NONE</p></td>
<td class="enum_member_description">
<p>copy nothing</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-FLAGS:CAPS"></a>GST_BUFFER_COPY_FLAGS</p></td>
<td class="enum_member_description">
<p>flag indicating that buffer flags should be copied</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-TIMESTAMPS:CAPS"></a>GST_BUFFER_COPY_TIMESTAMPS</p></td>
<td class="enum_member_description">
<p>flag indicating that buffer pts, dts,
duration, offset and offset_end should be copied</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-META:CAPS"></a>GST_BUFFER_COPY_META</p></td>
<td class="enum_member_description">
<p>flag indicating that buffer meta should be
copied</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-MEMORY:CAPS"></a>GST_BUFFER_COPY_MEMORY</p></td>
<td class="enum_member_description">
<p>flag indicating that buffer memory should be reffed
and appended to already existing memory. Unless the memory is marked as
NO_SHARE, no actual copy of the memory is made but it is simply reffed.
Add <em class="parameter"><code>GST_BUFFER_COPY_DEEP</code></em>
to force a real copy.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-MERGE:CAPS"></a>GST_BUFFER_COPY_MERGE</p></td>
<td class="enum_member_description">
<p>flag indicating that buffer memory should be
merged</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUFFER-COPY-DEEP:CAPS"></a>GST_BUFFER_COPY_DEEP</p></td>
<td class="enum_member_description">
<p>flag indicating that memory should always be
copied instead of reffed (Since 1.2)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstParentBufferMeta"></a><h3>struct GstParentBufferMeta</h3>
<pre class="programlisting">struct GstParentBufferMeta {
GstMeta parent;
GstBuffer *buffer;
};
</pre>
<p>The <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> is a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> which can be attached to a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>
to hold a reference to another buffer that is only released when the child
<a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> is released.</p>
<p>Typically, <a class="link" href="GstBuffer.html#GstParentBufferMeta" title="struct GstParentBufferMeta"><span class="type">GstParentBufferMeta</span></a> is used when the child buffer is directly
using the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> of the parent buffer, and wants to prevent the parent
buffer from being returned to a buffer pool until the <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> is available
for re-use.</p>
<div class="refsect3">
<a name="id-1.3.7.9.5.6"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> <em class="structfield"><code><a name="GstParentBufferMeta.parent"></a>parent</code></em>;</p></td>
<td class="struct_member_description"><p>the parent <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> structure</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstParentBufferMeta.buffer"></a>buffer</code></em>;</p></td>
<td class="struct_member_description"><p>the <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> on which a reference is being held.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstBuffer.see-also"></a><h2>See Also</h2>
<p><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>, <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>, <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>, <a class="link" href="GstBufferPool.html" title="GstBufferPool"><span class="type">GstBufferPool</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>