• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>GstGLBuffer: 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-GstGLBaseMemory.html" title="GstGLBaseMemory">
10<link rel="next" href="GstGLBufferPool.html" title="GstGLBufferPool">
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">|</span18                  <a href="#gst-plugins-base-libs-GstGLBuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-base-libs-GstGLBuffer.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-GstGLBaseMemory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24<td><a accesskey="n" href="GstGLBufferPool.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-GstGLBuffer"></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-GstGLBuffer.top_of_page"></a>GstGLBuffer</span></h2>
31<p>GstGLBuffer — memory subclass for GL buffers</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-GstGLBuffer.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<span class="returnvalue">void</span>
46</td>
47<td class="function_name">
48<a class="link" href="gst-plugins-base-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>
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-GstGLBuffer.html#gst-is-gl-buffer" title="gst_is_gl_buffer ()">gst_is_gl_buffer</a> <span class="c_punctuation">()</span>
57</td>
58</tr>
59<tr>
60<td class="function_type">
61<a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocationParams"><span class="returnvalue">GstGLBufferAllocationParams</span></a> *
62</td>
63<td class="function_name">
64<a class="link" href="gst-plugins-base-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>
65</td>
66</tr>
67</tbody>
68</table></div>
69</div>
70<a name="GstGLBufferAllocationParams"></a><a name="GstGLBufferAllocator"></a><div class="refsect1">
71<a name="gst-plugins-base-libs-GstGLBuffer.other"></a><h2>Types and Values</h2>
72<div class="informaltable"><table class="informaltable" width="100%" border="0">
73<colgroup>
74<col width="150px" class="name">
75<col class="description">
76</colgroup>
77<tbody>
78<tr>
79<td class="datatype_keyword"> </td>
80<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer">GstGLBuffer</a></td>
81</tr>
82<tr>
83<td class="datatype_keyword">struct</td>
84<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocationParams-struct" title="struct GstGLBufferAllocationParams">GstGLBufferAllocationParams</a></td>
85</tr>
86<tr>
87<td class="define_keyword">#define</td>
88<td class="function_name"><a class="link" href="gst-plugins-base-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>
89</tr>
90<tr>
91<td class="datatype_keyword"> </td>
92<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocator-struct" title="GstGLBufferAllocator">GstGLBufferAllocator</a></td>
93</tr>
94<tr>
95<td class="datatype_keyword"> </td>
96<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocatorClass" title="GstGLBufferAllocatorClass">GstGLBufferAllocatorClass</a></td>
97</tr>
98<tr>
99<td class="define_keyword">#define</td>
100<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GST-GL-BUFFER-ALLOCATOR-NAME:CAPS" title="GST_GL_BUFFER_ALLOCATOR_NAME">GST_GL_BUFFER_ALLOCATOR_NAME</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-GstGLBuffer.html#GST-CAPS-FEATURE-MEMORY-GL-BUFFER:CAPS" title="GST_CAPS_FEATURE_MEMORY_GL_BUFFER">GST_CAPS_FEATURE_MEMORY_GL_BUFFER</a></td>
105</tr>
106</tbody>
107</table></div>
108</div>
109<div class="refsect1">
110<a name="gst-plugins-base-libs-GstGLBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
111<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
112    <span class="lineart">╰──</span> GstGLBufferAllocationParams
113    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
114    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
115        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
116            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct">GstAllocator</a>
117                <span class="lineart">╰──</span> <a class="link" href="gst-plugins-base-libs-GstGLBaseMemory.html#GstGLBaseMemoryAllocator">GstGLBaseMemoryAllocator</a>
118                    <span class="lineart">╰──</span> GstGLBufferAllocator
119</pre>
120</div>
121<div class="refsect1">
122<a name="gst-plugins-base-libs-GstGLBuffer.includes"></a><h2>Includes</h2>
123<pre class="synopsis">#include &lt;gst/gl/gl.h&gt;
124</pre>
125</div>
126<div class="refsect1">
127<a name="gst-plugins-base-libs-GstGLBuffer.description"></a><h2>Description</h2>
128<p>GstGLBuffer is a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMemory.html#GstMemory-struct"><span class="type">GstMemory</span></a> subclass providing support for the mapping of
129GL buffers.</p>
130<p>Data is uploaded or downloaded from the GPU as is necessary.</p>
131</div>
132<div class="refsect1">
133<a name="gst-plugins-base-libs-GstGLBuffer.functions_details"></a><h2>Functions</h2>
134<div class="refsect2">
135<a name="gst-gl-buffer-init-once"></a><h3>gst_gl_buffer_init_once ()</h3>
136<pre class="programlisting"><span class="returnvalue">void</span>
137gst_gl_buffer_init_once (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
138<p>Initializes the GL Buffer allocator. It is safe to call this function
139multiple times.  This must be called before any other <a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="type">GstGLBuffer</span></a> operation.</p>
140<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
141</div>
142<hr>
143<div class="refsect2">
144<a name="gst-is-gl-buffer"></a><h3>gst_is_gl_buffer ()</h3>
145<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
146gst_is_gl_buffer (<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>
147<div class="refsect3">
148<a name="gst-is-gl-buffer.parameters"></a><h4>Parameters</h4>
149<div class="informaltable"><table class="informaltable" width="100%" border="0">
150<colgroup>
151<col width="150px" class="parameters_name">
152<col class="parameters_description">
153<col width="200px" class="parameters_annotations">
154</colgroup>
155<tbody><tr>
156<td class="parameter_name"><p>mem</p></td>
157<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>
158<td class="parameter_annotations"> </td>
159</tr></tbody>
160</table></div>
161</div>
162<div class="refsect3">
163<a name="gst-is-gl-buffer.returns"></a><h4>Returns</h4>
164<p> whether the memory at <em class="parameter"><code>mem</code></em>
165is a <a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBuffer" title="GstGLBuffer"><span class="type">GstGLBuffer</span></a></p>
166</div>
167<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
168</div>
169<hr>
170<div class="refsect2">
171<a name="gst-gl-buffer-allocation-params-new"></a><h3>gst_gl_buffer_allocation_params_new ()</h3>
172<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocationParams"><span class="returnvalue">GstGLBufferAllocationParams</span></a> *
173gst_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>,
174                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> alloc_size</code></em>,
175                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> *alloc_params</code></em>,
176                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_target</code></em>,
177                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> gl_usage</code></em>);</pre>
178<div class="refsect3">
179<a name="gst-gl-buffer-allocation-params-new.parameters"></a><h4>Parameters</h4>
180<div class="informaltable"><table class="informaltable" width="100%" border="0">
181<colgroup>
182<col width="150px" class="parameters_name">
183<col class="parameters_description">
184<col width="200px" class="parameters_annotations">
185</colgroup>
186<tbody>
187<tr>
188<td class="parameter_name"><p>context</p></td>
189<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p></td>
190<td class="parameter_annotations"> </td>
191</tr>
192<tr>
193<td class="parameter_name"><p>alloc_size</p></td>
194<td class="parameter_description"><p>the size in bytes to allocate</p></td>
195<td class="parameter_annotations"> </td>
196</tr>
197<tr>
198<td class="parameter_name"><p>alloc_params</p></td>
199<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> for <em class="parameter"><code>tex_id</code></em>
200. </p></td>
201<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>
202</tr>
203<tr>
204<td class="parameter_name"><p>gl_target</p></td>
205<td class="parameter_description"><p>the OpenGL target to allocate</p></td>
206<td class="parameter_annotations"> </td>
207</tr>
208<tr>
209<td class="parameter_name"><p>gl_usage</p></td>
210<td class="parameter_description"><p>the OpenGL usage hint to allocate with</p></td>
211<td class="parameter_annotations"> </td>
212</tr>
213</tbody>
214</table></div>
215</div>
216<div class="refsect3">
217<a name="gst-gl-buffer-allocation-params-new.returns"></a><h4>Returns</h4>
218<p> a new <a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocationParams"><span class="type">GstGLBufferAllocationParams</span></a> for allocating OpenGL buffer
219objects</p>
220</div>
221<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
222</div>
223</div>
224<div class="refsect1">
225<a name="gst-plugins-base-libs-GstGLBuffer.other_details"></a><h2>Types and Values</h2>
226<div class="refsect2">
227<a name="GstGLBuffer"></a><h3>GstGLBuffer</h3>
228<pre class="programlisting">typedef struct {
229  GstGLBaseMemory       mem;
230
231  guint                 id;
232  guint                 target;         /* XXX: put this in the allocator? */
233  guint                 usage_hints;     /* XXX: put this in the allocator? */
234} GstGLBuffer;
235</pre>
236<p>Represents information about a GL buffer</p>
237<div class="refsect3">
238<a name="GstGLBuffer.members"></a><h4>Members</h4>
239<div class="informaltable"><table class="informaltable" width="100%" border="0">
240<colgroup>
241<col width="300px" class="struct_members_name">
242<col class="struct_members_description">
243<col width="200px" class="struct_members_annotations">
244</colgroup>
245<tbody>
246<tr>
247<td class="struct_member_name"><p><a class="link" href="gst-plugins-base-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>
248<td class="struct_member_description"><p>the parent object</p></td>
249<td class="struct_member_annotations"> </td>
250</tr>
251<tr>
252<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBuffer.id"></a>id</code></em>;</p></td>
253<td class="struct_member_description"><p>the buffer id for this memory</p></td>
254<td class="struct_member_annotations"> </td>
255</tr>
256<tr>
257<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBuffer.target"></a>target</code></em>;</p></td>
258<td class="struct_member_description"><p>the OpenGL target of this texture for binding purposes</p></td>
259<td class="struct_member_annotations"> </td>
260</tr>
261<tr>
262<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-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>
263<td class="struct_member_description"><p>the OpenGL usage hints this buffer was created with</p></td>
264<td class="struct_member_annotations"> </td>
265</tr>
266</tbody>
267</table></div>
268</div>
269</div>
270<hr>
271<div class="refsect2">
272<a name="GstGLBufferAllocationParams-struct"></a><h3>struct GstGLBufferAllocationParams</h3>
273<pre class="programlisting">struct GstGLBufferAllocationParams {
274  GstGLAllocationParams     parent;
275
276  guint                     gl_target;
277  guint                     gl_usage;
278};
279</pre>
280<div class="refsect3">
281<a name="GstGLBufferAllocationParams.members"></a><h4>Members</h4>
282<div class="informaltable"><table class="informaltable" width="100%" border="0">
283<colgroup>
284<col width="300px" class="struct_members_name">
285<col class="struct_members_description">
286<col width="200px" class="struct_members_annotations">
287</colgroup>
288<tbody>
289<tr>
290<td class="struct_member_name"><p><a class="link" href="gst-plugins-base-libs-GstGLBaseMemory.html#GstGLAllocationParams"><span class="type">GstGLAllocationParams</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams-struct.parent"></a>parent</code></em>;</p></td>
291<td class="struct_member_description"><p>parent object</p></td>
292<td class="struct_member_annotations"> </td>
293</tr>
294<tr>
295<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams-struct.gl-target"></a>gl_target</code></em>;</p></td>
296<td class="struct_member_description"><p>the OpenGL target to bind the buffer to</p></td>
297<td class="struct_member_annotations"> </td>
298</tr>
299<tr>
300<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstGLBufferAllocationParams-struct.gl-usage"></a>gl_usage</code></em>;</p></td>
301<td class="struct_member_description"><p>the OpenGL usage hint to create the buffer with</p></td>
302<td class="struct_member_annotations"> </td>
303</tr>
304</tbody>
305</table></div>
306</div>
307</div>
308<hr>
309<div class="refsect2">
310<a name="GST-GL-ALLOCATION-PARAMS-ALLOC-FLAG-BUFFER:CAPS"></a><h3>GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER</h3>
311<pre class="programlisting">#define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER (1 &lt;&lt; 4)
312</pre>
313<p>GL allocation flag indicating the allocation of a GL buffer.</p>
314</div>
315<hr>
316<div class="refsect2">
317<a name="GstGLBufferAllocator-struct"></a><h3>GstGLBufferAllocator</h3>
318<pre class="programlisting">typedef struct _GstGLBufferAllocator GstGLBufferAllocator;</pre>
319<p>Opaque <a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocator"><span class="type">GstGLBufferAllocator</span></a> struct</p>
320</div>
321<hr>
322<div class="refsect2">
323<a name="GstGLBufferAllocatorClass"></a><h3>GstGLBufferAllocatorClass</h3>
324<pre class="programlisting">typedef struct {
325  GstGLBaseMemoryAllocatorClass parent_class;
326} GstGLBufferAllocatorClass;
327</pre>
328<p>The <a class="link" href="gst-plugins-base-libs-GstGLBuffer.html#GstGLBufferAllocatorClass" title="GstGLBufferAllocatorClass"><span class="type">GstGLBufferAllocatorClass</span></a> only contains private data</p>
329</div>
330<hr>
331<div class="refsect2">
332<a name="GST-GL-BUFFER-ALLOCATOR-NAME:CAPS"></a><h3>GST_GL_BUFFER_ALLOCATOR_NAME</h3>
333<pre class="programlisting">#define GST_GL_BUFFER_ALLOCATOR_NAME   "GLBuffer"
334</pre>
335<p>The name of the GL buffer allocator</p>
336</div>
337<hr>
338<div class="refsect2">
339<a name="GST-CAPS-FEATURE-MEMORY-GL-BUFFER:CAPS"></a><h3>GST_CAPS_FEATURE_MEMORY_GL_BUFFER</h3>
340<pre class="programlisting">#define GST_CAPS_FEATURE_MEMORY_GL_BUFFER "memory:GLBuffer"
341</pre>
342<p>Name of the caps feature indicating the use of GL buffers</p>
343</div>
344</div>
345<div class="refsect1">
346<a name="gst-plugins-base-libs-GstGLBuffer.see-also"></a><h2>See Also</h2>
347<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></p>
348</div>
349</div>
350<div class="footer">
351<hr>Generated by GTK-Doc V1.28</div>
352</body>
353</html>