1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>GstGLMemoryPBO: GStreamer Base Plugins 1.0 Library Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual"> 8<link rel="up" href="gl.html" title="OpenGL Integration Library"> 9<link rel="prev" href="gst-plugins-base-libs-gstglmemoryegl.html" title="GstGLMemoryEGL"> 10<link rel="next" href="GstGLOverlayCompositor.html" title="GstGLOverlayCompositor"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-base-libs-GstGLMemoryPBO.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-base-libs-GstGLMemoryPBO.object-hierarchy" class="shortcut">Object Hierarchy</a></span> 20</td> 21<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 22<td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 23<td><a accesskey="p" href="gst-plugins-base-libs-gstglmemoryegl.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 24<td><a accesskey="n" href="GstGLOverlayCompositor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 25</tr></table> 26<div class="refentry"> 27<a name="gst-plugins-base-libs-GstGLMemoryPBO"></a><div class="titlepage"></div> 28<div class="refnamediv"><table width="100%"><tr> 29<td valign="top"> 30<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-GstGLMemoryPBO.top_of_page"></a>GstGLMemoryPBO</span></h2> 31<p>GstGLMemoryPBO — memory subclass for GL textures</p> 32</td> 33<td class="gallery_image" valign="top" align="right"></td> 34</tr></table></div> 35<div class="refsect1"> 36<a name="gst-plugins-base-libs-GstGLMemoryPBO.functions"></a><h2>Functions</h2> 37<div class="informaltable"><table class="informaltable" width="100%" border="0"> 38<colgroup> 39<col width="150px" class="functions_return"> 40<col class="functions_name"> 41</colgroup> 42<tbody> 43<tr> 44<td class="function_type"> 45<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 46</td> 47<td class="function_name"> 48<a class="link" href="gst-plugins-base-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> 49</td> 50</tr> 51<tr> 52<td class="function_type"> 53<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 54</td> 55<td class="function_name"> 56<a class="link" href="gst-plugins-base-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> 57</td> 58</tr> 59<tr> 60<td class="function_type"> 61<span class="returnvalue">void</span> 62</td> 63<td class="function_name"> 64<a class="link" href="gst-plugins-base-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> 65</td> 66</tr> 67<tr> 68<td class="function_type"> 69<span class="returnvalue">void</span> 70</td> 71<td class="function_name"> 72<a class="link" href="gst-plugins-base-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> 73</td> 74</tr> 75<tr> 76<td class="function_type"> 77<span class="returnvalue">void</span> 78</td> 79<td class="function_name"> 80<a class="link" href="gst-plugins-base-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> 81</td> 82</tr> 83</tbody> 84</table></div> 85</div> 86<a name="GstGLMemoryPBOAllocator"></a><div class="refsect1"> 87<a name="gst-plugins-base-libs-GstGLMemoryPBO.other"></a><h2>Types and Values</h2> 88<div class="informaltable"><table class="informaltable" width="100%" border="0"> 89<colgroup> 90<col width="150px" class="name"> 91<col class="description"> 92</colgroup> 93<tbody> 94<tr> 95<td class="datatype_keyword"> </td> 96<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBOAllocator-struct" title="GstGLMemoryPBOAllocator">GstGLMemoryPBOAllocator</a></td> 97</tr> 98<tr> 99<td class="datatype_keyword"> </td> 100<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBOAllocatorClass" title="GstGLMemoryPBOAllocatorClass">GstGLMemoryPBOAllocatorClass</a></td> 101</tr> 102<tr> 103<td class="define_keyword">#define</td> 104<td class="function_name"><a class="link" href="gst-plugins-base-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> 105</tr> 106<tr> 107<td class="datatype_keyword"> </td> 108<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO">GstGLMemoryPBO</a></td> 109</tr> 110</tbody> 111</table></div> 112</div> 113<div class="refsect1"> 114<a name="gst-plugins-base-libs-GstGLMemoryPBO.object-hierarchy"></a><h2>Object Hierarchy</h2> 115<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 116 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 117 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 118 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct">GstAllocator</a> 119 <span class="lineart">╰──</span> <a class="link" href="gst-plugins-base-libs-GstGLBaseMemory.html#GstGLBaseMemoryAllocator">GstGLBaseMemoryAllocator</a> 120 <span class="lineart">╰──</span> <a class="link" href="gst-plugins-base-libs-GstGLMemory.html#GstGLMemoryAllocator">GstGLMemoryAllocator</a> 121 <span class="lineart">╰──</span> GstGLMemoryPBOAllocator 122</pre> 123</div> 124<div class="refsect1"> 125<a name="gst-plugins-base-libs-GstGLMemoryPBO.includes"></a><h2>Includes</h2> 126<pre class="synopsis">#include <gst/gl/gl.h> 127</pre> 128</div> 129<div class="refsect1"> 130<a name="gst-plugins-base-libs-GstGLMemoryPBO.description"></a><h2>Description</h2> 131<p><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> is created or wrapped through <a class="link" href="gst-plugins-base-libs-GstGLBaseMemory.html#gst-gl-base-memory-alloc" title="gst_gl_base_memory_alloc ()"><code class="function">gst_gl_base_memory_alloc()</code></a> 132with <a class="link" href="gst-plugins-base-libs-GstGLMemory.html#GstGLVideoAllocationParams"><span class="type">GstGLVideoAllocationParams</span></a>.</p> 133<p>Data is uploaded or downloaded from the GPU as is necessary.</p> 134</div> 135<div class="refsect1"> 136<a name="gst-plugins-base-libs-GstGLMemoryPBO.functions_details"></a><h2>Functions</h2> 137<div class="refsect2"> 138<a name="gst-is-gl-memory-pbo"></a><h3>gst_is_gl_memory_pbo ()</h3> 139<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 140gst_is_gl_memory_pbo (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a> *mem</code></em>);</pre> 141<div class="refsect3"> 142<a name="gst-is-gl-memory-pbo.parameters"></a><h4>Parameters</h4> 143<div class="informaltable"><table class="informaltable" width="100%" border="0"> 144<colgroup> 145<col width="150px" class="parameters_name"> 146<col class="parameters_description"> 147<col width="200px" class="parameters_annotations"> 148</colgroup> 149<tbody><tr> 150<td class="parameter_name"><p>mem</p></td> 151<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a></p></td> 152<td class="parameter_annotations"> </td> 153</tr></tbody> 154</table></div> 155</div> 156<div class="refsect3"> 157<a name="gst-is-gl-memory-pbo.returns"></a><h4>Returns</h4> 158<p> whether the memory at <em class="parameter"><code>mem</code></em> 159is a <a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p> 160</div> 161<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p> 162</div> 163<hr> 164<div class="refsect2"> 165<a name="gst-gl-memory-pbo-copy-into-texture"></a><h3>gst_gl_memory_pbo_copy_into_texture ()</h3> 166<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 167gst_gl_memory_pbo_copy_into_texture (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</code></em>, 168 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> tex_id</code></em>, 169 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-OpenGL-Formats.html#GstGLTextureTarget" title="enum GstGLTextureTarget"><span class="type">GstGLTextureTarget</span></a> target</code></em>, 170 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-OpenGL-Formats.html#GstGLFormat" title="enum GstGLFormat"><span class="type">GstGLFormat</span></a> tex_format</code></em>, 171 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>, 172 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>, 173 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> stride</code></em>, 174 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> respecify</code></em>);</pre> 175<p>Copies <em class="parameter"><code>gl_mem</code></em> 176 into the texture specfified by <em class="parameter"><code>tex_id</code></em> 177. The format of <em class="parameter"><code>tex_id</code></em> 178 179is specified by <em class="parameter"><code>tex_format</code></em> 180, <em class="parameter"><code>width</code></em> 181 and <em class="parameter"><code>height</code></em> 182.</p> 183<p>If <em class="parameter"><code>respecify</code></em> 184 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then the copy is performed in terms of the texture 185data. This is useful for splitting RGBA textures into RG or R textures or 186vice versa. The requirement for this to succeed is that the backing texture 187data must be the same size, i.e. say a RGBA8 texture is converted into a RG8 188texture, then the RG texture must have twice as many pixels available for 189output as the RGBA texture.</p> 190<p>Otherwise, if <em class="parameter"><code>respecify</code></em> 191 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then the copy is performed per texel 192using glCopyTexImage. See the OpenGL specification for details on the 193mappings between texture formats.</p> 194<div class="refsect3"> 195<a name="gst-gl-memory-pbo-copy-into-texture.parameters"></a><h4>Parameters</h4> 196<div class="informaltable"><table class="informaltable" width="100%" border="0"> 197<colgroup> 198<col width="150px" class="parameters_name"> 199<col class="parameters_description"> 200<col width="200px" class="parameters_annotations"> 201</colgroup> 202<tbody> 203<tr> 204<td class="parameter_name"><p>gl_mem</p></td> 205<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p></td> 206<td class="parameter_annotations"> </td> 207</tr> 208<tr> 209<td class="parameter_name"><p>tex_id</p></td> 210<td class="parameter_description"><p>the destination texture id</p></td> 211<td class="parameter_annotations"> </td> 212</tr> 213<tr> 214<td class="parameter_name"><p>target</p></td> 215<td class="parameter_description"><p>the destination <a class="link" href="gst-plugins-base-libs-OpenGL-Formats.html#GstGLTextureTarget" title="enum GstGLTextureTarget"><span class="type">GstGLTextureTarget</span></a></p></td> 216<td class="parameter_annotations"> </td> 217</tr> 218<tr> 219<td class="parameter_name"><p>tex_format</p></td> 220<td class="parameter_description"><p>the destination <a class="link" href="gst-plugins-base-libs-OpenGL-Formats.html#GstGLFormat" title="enum GstGLFormat"><span class="type">GstGLFormat</span></a></p></td> 221<td class="parameter_annotations"> </td> 222</tr> 223<tr> 224<td class="parameter_name"><p>width</p></td> 225<td class="parameter_description"><p>width of <em class="parameter"><code>tex_id</code></em> 226</p></td> 227<td class="parameter_annotations"> </td> 228</tr> 229<tr> 230<td class="parameter_name"><p>height</p></td> 231<td class="parameter_description"><p>height of <em class="parameter"><code>tex_id</code></em> 232</p></td> 233<td class="parameter_annotations"> </td> 234</tr> 235<tr> 236<td class="parameter_name"><p>stride</p></td> 237<td class="parameter_description"><p>stride of the backing texture data</p></td> 238<td class="parameter_annotations"> </td> 239</tr> 240<tr> 241<td class="parameter_name"><p>respecify</p></td> 242<td class="parameter_description"><p>whether to copy the data or copy per texel</p></td> 243<td class="parameter_annotations"> </td> 244</tr> 245</tbody> 246</table></div> 247</div> 248<div class="refsect3"> 249<a name="gst-gl-memory-pbo-copy-into-texture.returns"></a><h4>Returns</h4> 250<p> Whether the copy suceeded</p> 251</div> 252<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p> 253</div> 254<hr> 255<div class="refsect2"> 256<a name="gst-gl-memory-pbo-download-transfer"></a><h3>gst_gl_memory_pbo_download_transfer ()</h3> 257<pre class="programlisting"><span class="returnvalue">void</span> 258gst_gl_memory_pbo_download_transfer (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</code></em>);</pre> 259<p>Transfer the texture data from the texture into the PBO if necessary.</p> 260<div class="refsect3"> 261<a name="gst-gl-memory-pbo-download-transfer.parameters"></a><h4>Parameters</h4> 262<div class="informaltable"><table class="informaltable" width="100%" border="0"> 263<colgroup> 264<col width="150px" class="parameters_name"> 265<col class="parameters_description"> 266<col width="200px" class="parameters_annotations"> 267</colgroup> 268<tbody><tr> 269<td class="parameter_name"><p>gl_mem</p></td> 270<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p></td> 271<td class="parameter_annotations"> </td> 272</tr></tbody> 273</table></div> 274</div> 275<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p> 276</div> 277<hr> 278<div class="refsect2"> 279<a name="gst-gl-memory-pbo-init-once"></a><h3>gst_gl_memory_pbo_init_once ()</h3> 280<pre class="programlisting"><span class="returnvalue">void</span> 281gst_gl_memory_pbo_init_once (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> 282</div> 283<hr> 284<div class="refsect2"> 285<a name="gst-gl-memory-pbo-upload-transfer"></a><h3>gst_gl_memory_pbo_upload_transfer ()</h3> 286<pre class="programlisting"><span class="returnvalue">void</span> 287gst_gl_memory_pbo_upload_transfer (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a> *gl_mem</code></em>);</pre> 288<p>Transfer the texture data from the PBO into the texture if necessary.</p> 289<div class="refsect3"> 290<a name="gst-gl-memory-pbo-upload-transfer.parameters"></a><h4>Parameters</h4> 291<div class="informaltable"><table class="informaltable" width="100%" border="0"> 292<colgroup> 293<col width="150px" class="parameters_name"> 294<col class="parameters_description"> 295<col width="200px" class="parameters_annotations"> 296</colgroup> 297<tbody><tr> 298<td class="parameter_name"><p>gl_mem</p></td> 299<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBO" title="GstGLMemoryPBO"><span class="type">GstGLMemoryPBO</span></a></p></td> 300<td class="parameter_annotations"> </td> 301</tr></tbody> 302</table></div> 303</div> 304<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p> 305</div> 306</div> 307<div class="refsect1"> 308<a name="gst-plugins-base-libs-GstGLMemoryPBO.other_details"></a><h2>Types and Values</h2> 309<div class="refsect2"> 310<a name="GstGLMemoryPBOAllocator-struct"></a><h3>GstGLMemoryPBOAllocator</h3> 311<pre class="programlisting">typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;</pre> 312<p>Opaque <a class="link" href="gst-plugins-base-libs-GstGLMemoryPBO.html#GstGLMemoryPBOAllocator"><span class="type">GstGLMemoryPBOAllocator</span></a> struct</p> 313</div> 314<hr> 315<div class="refsect2"> 316<a name="GstGLMemoryPBOAllocatorClass"></a><h3>GstGLMemoryPBOAllocatorClass</h3> 317<pre class="programlisting">typedef struct { 318 GstGLMemoryAllocatorClass parent_class; 319} GstGLMemoryPBOAllocatorClass; 320</pre> 321<p>Only contains private data</p> 322</div> 323<hr> 324<div class="refsect2"> 325<a name="GST-GL-MEMORY-PBO-ALLOCATOR-NAME:CAPS"></a><h3>GST_GL_MEMORY_PBO_ALLOCATOR_NAME</h3> 326<pre class="programlisting">#define GST_GL_MEMORY_PBO_ALLOCATOR_NAME "GLMemoryPBO" 327</pre> 328<p>The name of the GL Memory PBO allocator</p> 329</div> 330<hr> 331<div class="refsect2"> 332<a name="GstGLMemoryPBO"></a><h3>GstGLMemoryPBO</h3> 333<pre class="programlisting">typedef struct { 334} GstGLMemoryPBO; 335</pre> 336<p>Private instance</p> 337</div> 338</div> 339<div class="refsect1"> 340<a name="gst-plugins-base-libs-GstGLMemoryPBO.see-also"></a><h2>See Also</h2> 341<p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a>, <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a>, <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool"><span class="type">GstGLBufferPool</span></a></p> 342</div> 343</div> 344<div class="footer"> 345<hr>Generated by GTK-Doc V1.28</div> 346</body> 347</html>