blob: 7ef9099fe00ddbc31665e6e325edc394cb445f3c [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>GstGLBuffer: GStreamer Bad Plugins 1.0 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
<link rel="up" href="gl.html" title="OpenGL Helper Library">
<link rel="prev" href="GstGLBaseFilter.html" title="GstGLBaseFilter">
<link rel="next" href="GstGLBufferPool.html" title="GstGLBufferPool">
<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="#gst-plugins-bad-libs-GstGLBuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#gst-plugins-bad-libs-GstGLBuffer.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="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstGLBaseFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstGLBufferPool.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-bad-libs-GstGLBuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstGLBuffer.top_of_page"></a>GstGLBuffer</span></h2>
<p>GstGLBuffer — memory subclass for GL buffers</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.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">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#gst-gl-buffer-init-once" title="gst_gl_buffer_init_once ()">gst_gl_buffer_init_once</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#gst-is-gl-buffer" title="gst_is_gl_buffer ()">gst_is_gl_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="returnvalue">GstGLBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#gst-gl-buffer-alloc" title="gst_gl_buffer_alloc ()">gst_gl_buffer_alloc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocationParams" title="struct GstGLBufferAllocationParams"><span class="returnvalue">GstGLBufferAllocationParams</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#gst-gl-buffer-allocation-params-new" title="gst_gl_buffer_allocation_params_new ()">gst_gl_buffer_allocation_params_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstGLBufferAllocator"></a><div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.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="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer">GstGLBuffer</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocationParams" title="struct GstGLBufferAllocationParams">GstGLBufferAllocationParams</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GST-GL-ALLOCATION-PARAMS-ALLOC-FLAG-BUFFER:CAPS" title="GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER">GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocator-struct" title="GstGLBufferAllocator">GstGLBufferAllocator</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocatorClass" title="GstGLBufferAllocatorClass">GstGLBufferAllocatorClass</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GST-GL-BUFFER-ALLOCATOR-NAME:CAPS" title="GST_GL_BUFFER_ALLOCATOR_NAME">GST_GL_BUFFER_ALLOCATOR_NAME</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GST-CAPS-FEATURE-MEMORY-GL-BUFFER:CAPS" title="GST_CAPS_FEATURE_MEMORY_GL_BUFFER">GST_CAPS_FEATURE_MEMORY_GL_BUFFER</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <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 href="/usr/share/gtk-doc/html/gstreamer-1.0GstObject.html#GstObject-struct">GstObject</a>
<span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstAllocator.html#GstAllocator-struct">GstAllocator</a>
<span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglbasememory.html#GstGLBaseMemoryAllocator">GstGLBaseMemoryAllocator</a>
<span class="lineart">╰──</span> GstGLBufferAllocator
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.description"></a><h2>Description</h2>
<p>GstGLBuffer is a <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a> subclass providing support for the mapping of
GL buffers. </p>
<p>Data is uploaded or downloaded from the GPU as is necessary.</p>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-gl-buffer-init-once"></a><h3>gst_gl_buffer_init_once ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_buffer_init_once (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Initializes the GL Buffer allocator. It is safe to call this function
multiple times. This must be called before any other <a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="type">GstGLBuffer</span></a> operation.</p>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-is-gl-buffer"></a><h3>gst_is_gl_buffer ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_is_gl_buffer (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<div class="refsect3">
<a name="gst-is-gl-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>mem</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-is-gl-buffer.returns"></a><h4>Returns</h4>
<p> whether the memory at <em class="parameter"><code>mem</code></em>
is a <a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="type">GstGLBuffer</span></a></p>
</div>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-buffer-alloc"></a><h3>gst_gl_buffer_alloc ()</h3>
<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="returnvalue">GstGLBuffer</span></a> *
gst_gl_buffer_alloc (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_target</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_usage</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> *params</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>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-buffer-allocation-params-new"></a><h3>gst_gl_buffer_allocation_params_new ()</h3>
<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocationParams" title="struct GstGLBufferAllocationParams"><span class="returnvalue">GstGLBufferAllocationParams</span></a> *
gst_gl_buffer_allocation_params_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> alloc_size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> *alloc_params</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_target</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_usage</code></em>);</pre>
<div class="refsect3">
<a name="gst-gl-buffer-allocation-params-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>alloc_size</p></td>
<td class="parameter_description"><p>the size in bytes to allocate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>alloc_params</p></td>
<td class="parameter_description"><p> the <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> for <em class="parameter"><code>tex_id</code></em>
. </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>gl_target</p></td>
<td class="parameter_description"><p>the OpenGL target to allocate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>gl_usage</p></td>
<td class="parameter_description"><p>the OpenGL usage hint to allocate with</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-gl-buffer-allocation-params-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocationParams" title="struct GstGLBufferAllocationParams"><span class="type">GstGLBufferAllocationParams</span></a> for allocating OpenGL buffer
objects</p>
</div>
<p class="since">Since: 1.8</p>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstGLBuffer"></a><h3>GstGLBuffer</h3>
<pre class="programlisting">typedef struct {
GstGLBaseMemory mem;
guint id;
guint target; /* XXX: put this in the allocator? */
guint usage_hints; /* XXX: put this in the allocator? */
} GstGLBuffer;
</pre>
<p>Represents information about a GL buffer</p>
<div class="refsect3">
<a name="GstGLBuffer.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-gstglbasememory.html#GstGLBaseMemory" title="GstGLBaseMemory"><span class="type">GstGLBaseMemory</span></a> <em class="structfield"><code><a name="GstGLBuffer.mem"></a>mem</code></em>;</p></td>
<td class="struct_member_description"><p>the parent object</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBuffer.id"></a>id</code></em>;</p></td>
<td class="struct_member_description"><p>the buffer id for this memory</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBuffer.target"></a>target</code></em>;</p></td>
<td class="struct_member_description"><p>the OpenGL target of this texture for binding purposes</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBuffer.usage-hints"></a>usage_hints</code></em>;</p></td>
<td class="struct_member_description"><p>the OpenGL usage hints this buffer was created with</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstGLBufferAllocationParams"></a><h3>struct GstGLBufferAllocationParams</h3>
<pre class="programlisting">struct GstGLBufferAllocationParams {
GstGLAllocationParams parent;
guint gl_target;
guint gl_usage;
};
</pre>
<div class="refsect3">
<a name="GstGLBufferAllocationParams.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-gstglbasememory.html#GstGLAllocationParams" title="struct GstGLAllocationParams"><span class="type">GstGLAllocationParams</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams.parent"></a>parent</code></em>;</p></td>
<td class="struct_member_description"><p>parent object</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams.gl-target"></a>gl_target</code></em>;</p></td>
<td class="struct_member_description"><p>the OpenGL target to bind the buffer to</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams.gl-usage"></a>gl_usage</code></em>;</p></td>
<td class="struct_member_description"><p>the OpenGL usage hint to create the buffer with</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-GL-ALLOCATION-PARAMS-ALLOC-FLAG-BUFFER:CAPS"></a><h3>GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER</h3>
<pre class="programlisting">#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER (1 &lt;&lt; 4)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstGLBufferAllocator-struct"></a><h3>GstGLBufferAllocator</h3>
<pre class="programlisting">typedef struct _GstGLBufferAllocator GstGLBufferAllocator;</pre>
<p>Opaque <span class="type">GstGLAllocator</span> struct</p>
</div>
<hr>
<div class="refsect2">
<a name="GstGLBufferAllocatorClass"></a><h3>GstGLBufferAllocatorClass</h3>
<pre class="programlisting">typedef struct {
GstGLBaseMemoryAllocatorClass parent_class;
} GstGLBufferAllocatorClass;
</pre>
<p>The <a class="link" href="gst-plugins-bad-libs-GstGLBuffer.html#GstGLBufferAllocatorClass" title="GstGLBufferAllocatorClass"><span class="type">GstGLBufferAllocatorClass</span></a> only contains private data</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-GL-BUFFER-ALLOCATOR-NAME:CAPS"></a><h3>GST_GL_BUFFER_ALLOCATOR_NAME</h3>
<pre class="programlisting">#define GST_GL_BUFFER_ALLOCATOR_NAME "GLBuffer"
</pre>
<p>The name of the GL buffer allocator</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-CAPS-FEATURE-MEMORY-GL-BUFFER:CAPS"></a><h3>GST_CAPS_FEATURE_MEMORY_GL_BUFFER</h3>
<pre class="programlisting">#define GST_CAPS_FEATURE_MEMORY_GL_BUFFER "memory:GLBuffer"
</pre>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstGLBuffer.see-also"></a><h2>See Also</h2>
<p><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a>, <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>