blob: e4747698d4b4434e8fb04bb24e032782b9cad2ba [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstAllocator: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.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="gstreamer-Gst.html" title="Gst">
<link rel="next" href="gstreamer-GstAtomicQueue.html" title="GstAtomicQueue">
<meta name="generator" content="GTK-Doc V1.25 (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="#GstAllocator.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstAllocator.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="gstreamer-Gst.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gstreamer-GstAtomicQueue.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstAllocator"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstAllocator.top_of_page"></a>GstAllocator</span></h2>
<p>GstAllocator</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstAllocator.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GstAllocator.html" title="GstAllocator"><span class="returnvalue">GstAllocator</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstAllocator.html#gst-allocator-find" title="gst_allocator_find ()">gst_allocator_find</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="GstAllocator.html#gst-allocator-register" title="gst_allocator_register ()">gst_allocator_register</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="GstAllocator.html#gst-allocator-set-default" title="gst_allocator_set_default ()">gst_allocator_set_default</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="GstAllocator.html#gst-allocation-params-init" title="gst_allocation_params_init ()">gst_allocation_params_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstAllocator.html#GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstAllocator.html#gst-allocation-params-copy" title="gst_allocation_params_copy ()">gst_allocation_params_copy</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="GstAllocator.html#gst-allocation-params-free" title="gst_allocation_params_free ()">gst_allocation_params_free</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="GstAllocator.html#gst-allocator-alloc" title="gst_allocator_alloc ()">gst_allocator_alloc</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="GstAllocator.html#gst-allocator-free" title="gst_allocator_free ()">gst_allocator_free</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="GstAllocator.html#gst-memory-new-wrapped" title="gst_memory_new_wrapped ()">gst_memory_new_wrapped</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstAllocationParams"></a><div class="refsect1">
<a name="GstAllocator.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="variable_type">extern</td>
<td class="function_name"><a class="link" href="GstAllocator.html#gst-memory-alignment" title="gst_memory_alignment">gst_memory_alignment</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GstAllocator.html#GstAllocator-struct" title="GstAllocator">GstAllocator</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstAllocator.html#GstAllocatorClass" title="struct GstAllocatorClass">GstAllocatorClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstAllocator.html#GstAllocatorFlags" title="enum GstAllocatorFlags">GstAllocatorFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstAllocator.html#GstAllocationParams-struct" title="struct GstAllocationParams">GstAllocationParams</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GstAllocator.html#GST-ALLOCATOR-SYSMEM:CAPS" title="GST_ALLOCATOR_SYSMEM">GST_ALLOCATOR_SYSMEM</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstAllocator.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> GstAllocationParams
<a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a class="link" href="GstObject.html" title="GstObject">GstObject</a>
<span class="lineart">╰──</span> GstAllocator
</pre>
</div>
<div class="refsect1">
<a name="GstAllocator.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstAllocator.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="GstAllocator.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-allocator-find"></a><h3>gst_allocator_find ()</h3>
<pre class="programlisting"><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="returnvalue">GstAllocator</span></a> *
gst_allocator_find (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocator-register"></a><h3>gst_allocator_register ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_allocator_register (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocator-set-default"></a><h3>gst_allocator_set_default ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_allocator_set_default (<em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocation-params-init"></a><h3>gst_allocation_params_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_allocation_params_init (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocation-params-copy"></a><h3>gst_allocation_params_copy ()</h3>
<pre class="programlisting"><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> *
gst_allocation_params_copy (<em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocation-params-free"></a><h3>gst_allocation_params_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_allocation_params_free (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocator-alloc"></a><h3>gst_allocator_alloc ()</h3>
<pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_allocator_alloc (<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><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-allocator-free"></a><h3>gst_allocator_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_allocator_free (<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><a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a> *memory</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-memory-new-wrapped"></a><h3>gst_memory_new_wrapped ()</h3>
<pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> *
gst_memory_new_wrapped (<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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> maxsize</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="GstAllocator.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="gst-memory-alignment"></a><h3>gst_memory_alignment</h3>
<pre class="programlisting">GST_EXPORT gsize gst_memory_alignment;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstAllocator-struct"></a><h3>GstAllocator</h3>
<pre class="programlisting">typedef struct {
GstMemoryMapFunction mem_map;
GstMemoryUnmapFunction mem_unmap;
GstMemoryCopyFunction mem_copy;
GstMemoryShareFunction mem_share;
GstMemoryIsSpanFunction mem_is_span;
GstMemoryMapFullFunction mem_map_full;
GstMemoryUnmapFullFunction mem_unmap_full;
} GstAllocator;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstAllocatorClass"></a><h3>struct GstAllocatorClass</h3>
<pre class="programlisting">struct GstAllocatorClass {
GstObjectClass object_class;
GstMemory * (*alloc) (GstAllocator *allocator, gsize size,
GstAllocationParams *params);
void (*free) (GstAllocator *allocator, GstMemory *memory);
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstAllocatorFlags"></a><h3>enum GstAllocatorFlags</h3>
<div class="refsect3">
<a name="GstAllocatorFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-ALLOCATOR-FLAG-CUSTOM-ALLOC:CAPS"></a>GST_ALLOCATOR_FLAG_CUSTOM_ALLOC</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-ALLOCATOR-FLAG-LAST:CAPS"></a>GST_ALLOCATOR_FLAG_LAST</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstAllocationParams-struct"></a><h3>struct GstAllocationParams</h3>
<pre class="programlisting">struct GstAllocationParams {
GstMemoryFlags flags;
gsize align;
gsize prefix;
gsize padding;
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-ALLOCATOR-SYSMEM:CAPS"></a><h3>GST_ALLOCATOR_SYSMEM</h3>
<pre class="programlisting">#define GST_ALLOCATOR_SYSMEM "SystemMemory"
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>