blob: fcba4d529fa2a9223a099424a87377c57bbcf255 [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>GstGLMemoryPBO: 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="gst-plugins-bad-libs-GstGLMemory.html" title="GstGLMemory">
<link rel="next" href="GstGLShader.html" title="GstGLShader">
<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="#gst-plugins-bad-libs-gstglmemorypbo.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#gst-plugins-bad-libs-gstglmemorypbo.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="gst-plugins-bad-libs-GstGLMemory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstGLShader.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-gstglmemorypbo"></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-gstglmemorypbo.top_of_page"></a>GstGLMemoryPBO</span></h2>
<p>GstGLMemoryPBO — memory subclass for GL textures</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.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 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="gst-plugins-bad-libs-gstglmemorypbo.html#gst-is-gl-memory-pbo" title="gst_is_gl_memory_pbo ()">gst_is_gl_memory_pbo</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="gst-plugins-bad-libs-gstglmemorypbo.html#gst-gl-memory-pbo-copy-into-texture" title="gst_gl_memory_pbo_copy_into_texture ()">gst_gl_memory_pbo_copy_into_texture</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="gst-plugins-bad-libs-gstglmemorypbo.html#gst-gl-memory-pbo-download-transfer" title="gst_gl_memory_pbo_download_transfer ()">gst_gl_memory_pbo_download_transfer</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="gst-plugins-bad-libs-gstglmemorypbo.html#gst-gl-memory-pbo-init-once" title="gst_gl_memory_pbo_init_once ()">gst_gl_memory_pbo_init_once</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="gst-plugins-bad-libs-gstglmemorypbo.html#gst-gl-memory-pbo-upload-transfer" title="gst_gl_memory_pbo_upload_transfer ()">gst_gl_memory_pbo_upload_transfer</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstGLMemoryPBOAllocator"></a><div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.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-gstglmemorypbo.html#GstGLMemoryPBOAllocator-struct" title="GstGLMemoryPBOAllocator">GstGLMemoryPBOAllocator</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBOAllocatorClass" title="GstGLMemoryPBOAllocatorClass">GstGLMemoryPBOAllocatorClass</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GST-GL-MEMORY-PBO-ALLOCATOR-NAME:CAPS" title="GST_GL_MEMORY_PBO_ALLOCATOR_NAME">GST_GL_MEMORY_PBO_ALLOCATOR_NAME</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO">GstGLMemoryPBO</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
<span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
<span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html">GstAllocator</a>
<span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglbasememory.html#GstGLBaseMemoryAllocator">GstGLBaseMemoryAllocator</a>
<span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-GstGLMemory.html#GstGLMemoryAllocator">GstGLMemoryAllocator</a>
<span class="lineart">╰──</span> GstGLMemoryPBOAllocator
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.description"></a><h2>Description</h2>
<p><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> is created or wrapped through <a class="link" href="gst-plugins-bad-libs-gstglbasememory.html#gst-gl-base-memory-alloc" title="gst_gl_base_memory_alloc ()"><code class="function">gst_gl_base_memory_alloc()</code></a>
with <a class="link" href="gst-plugins-bad-libs-GstGLMemory.html#GstGLVideoAllocationParams" title="struct GstGLVideoAllocationParams"><span class="type">GstGLVideoAllocationParams</span></a>.</p>
<p><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> is created through <code class="function">gst_gl_memory_pbo_alloc()</code> or system memory can
be wrapped through <code class="function">gst_gl_memory_pbo_wrapped()</code>.</p>
<p>Data is uploaded or downloaded from the GPU as is necessary.</p>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-is-gl-memory-pbo"></a><h3>gst_is_gl_memory_pbo ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_is_gl_memory_pbo (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
<div class="refsect3">
<a name="id-1.2.9.19.8.2.4"></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="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.9.19.8.2.5"></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-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p>
</div>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-memory-pbo-copy-into-texture"></a><h3>gst_gl_memory_pbo_copy_into_texture ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_memory_pbo_copy_into_texture (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</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> tex_id</code></em>,
<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-OpenGL-Formats.html#GstGLTextureTarget" title="enum GstGLTextureTarget"><span class="type">GstGLTextureTarget</span></a> target</code></em>,
<em class="parameter"><code><span class="type">GstVideoGLTextureType</span> tex_type</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> width</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> height</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> stride</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> respecify</code></em>);</pre>
<p>Copies <em class="parameter"><code>gl_mem</code></em>
into the texture specfified by <em class="parameter"><code>tex_id</code></em>
. The format of <em class="parameter"><code>tex_id</code></em>
is specified by <em class="parameter"><code>tex_type</code></em>
, <em class="parameter"><code>width</code></em>
and <em class="parameter"><code>height</code></em>
.</p>
<p>If <em class="parameter"><code>respecify</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then the copy is performed in terms of the texture
data. This is useful for splitting RGBA textures into RG or R textures or
vice versa. The requirement for this to succeed is that the backing texture
data must be the same size, i.e. say a RGBA8 texture is converted into a RG8
texture, then the RG texture must have twice as many pixels available for
output as the RGBA texture.</p>
<p>Otherwise, if <em class="parameter"><code>respecify</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then the copy is performed per texel
using glCopyTexImage. See the OpenGL specification for details on the
mappings between texture formats.</p>
<div class="refsect3">
<a name="id-1.2.9.19.8.3.7"></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>gl_mem</p></td>
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tex_id</p></td>
<td class="parameter_description"><p>the destination texture id</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>the destination <a class="link" href="gst-plugins-bad-libs-OpenGL-Formats.html#GstGLTextureTarget" title="enum GstGLTextureTarget"><span class="type">GstGLTextureTarget</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tex_type</p></td>
<td class="parameter_description"><p>the destination <span class="type">GstVideoGLTextureType</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>width of <em class="parameter"><code>tex_id</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>height of <em class="parameter"><code>tex_id</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stride</p></td>
<td class="parameter_description"><p>stride of the backing texture data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>respecify</p></td>
<td class="parameter_description"><p>whether to copy the data or copy per texel</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.9.19.8.3.8"></a><h4>Returns</h4>
<p> Whether the copy suceeded</p>
</div>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-memory-pbo-download-transfer"></a><h3>gst_gl_memory_pbo_download_transfer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_memory_pbo_download_transfer (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</code></em>);</pre>
<p>Transfer the texture data from the PBO into the texture if necessary.</p>
<div class="refsect3">
<a name="id-1.2.9.19.8.4.5"></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>gl_mem</p></td>
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 1.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-memory-pbo-init-once"></a><h3>gst_gl_memory_pbo_init_once ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_memory_pbo_init_once (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-memory-pbo-upload-transfer"></a><h3>gst_gl_memory_pbo_upload_transfer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_memory_pbo_upload_transfer (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglmemorypbo.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstGLMemoryPBOAllocator-struct"></a><h3>GstGLMemoryPBOAllocator</h3>
<pre class="programlisting">typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstGLMemoryPBOAllocatorClass"></a><h3>GstGLMemoryPBOAllocatorClass</h3>
<pre class="programlisting">typedef struct {
GstGLMemoryAllocatorClass parent_class;
} GstGLMemoryPBOAllocatorClass;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-GL-MEMORY-PBO-ALLOCATOR-NAME:CAPS"></a><h3>GST_GL_MEMORY_PBO_ALLOCATOR_NAME</h3>
<pre class="programlisting">#define GST_GL_MEMORY_PBO_ALLOCATOR_NAME "GLMemoryPBO"
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstGLMemoryPBO"></a><h3>GstGLMemoryPBO</h3>
<pre class="programlisting">typedef struct {
GstGLMemory mem;
} GstGLMemoryPBO;
</pre>
<p>Private instance</p>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-gstglmemorypbo.see-also"></a><h2>See Also</h2>
<p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a>, <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html"><span class="type">GstAllocator</span></a>, <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool"><span class="type">GstGLBufferPool</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>