| <!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 <gst/gst.h> |
| </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)->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)->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)->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)->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)->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> |
|