blob: 6975e4dab5331b3c739a39a0b717a539cb572934 [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>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLUpload</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.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-gstglshader.html" title="GstGLShader">
<link rel="next" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">
<meta name="generator" content="GTK-Doc V1.20 (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="10"><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="#GstGLUpload.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
<a href="#GstGLUpload.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-gstglshader.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-bad-libs-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstGLUpload"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstGLUpload.top_of_page"></a>GstGLUpload</span></h2>
<p>GstGLUpload — an object that uploads to GL textures</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstGLUpload.functions"></a><h2>Functions</h2>
<div class="informaltable"><table 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="GstGLUpload.html" title="GstGLUpload"><span class="returnvalue">GstGLUpload</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-new" title="gst_gl_upload_new ()">gst_gl_upload_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-init-format" title="gst_gl_upload_init_format ()">gst_gl_upload_init_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-add-video-gl-texture-upload-meta" title="gst_gl_upload_add_video_gl_texture_upload_meta ()">gst_gl_upload_add_video_gl_texture_upload_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-data" title="gst_gl_upload_perform_with_data ()">gst_gl_upload_perform_with_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-gl-texture-upload-meta" title="gst_gl_upload_perform_with_gl_texture_upload_meta ()">gst_gl_upload_perform_with_gl_texture_upload_meta</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-buffer" title="gst_gl_upload_perform_with_buffer ()">gst_gl_upload_perform_with_buffer</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="GstGLUpload.html#gst-gl-upload-release-buffer" title="gst_gl_upload_release_buffer ()">gst_gl_upload_release_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstGLUpload.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table 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="GstGLUpload.html#GstGLUpload-struct" title="GstGLUpload">GstGLUpload</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstGLUpload.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
<span class="lineart">╰──</span> GstGLUpload
</pre>
</div>
<div class="refsect1">
<a name="GstGLUpload.description"></a><h2>Description</h2>
<p><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> is an object that uploads data from system memory into GL textures.</p>
<p>A <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> can be created with <a class="link" href="GstGLUpload.html#gst-gl-upload-new" title="gst_gl_upload_new ()"><code class="function">gst_gl_upload_new()</code></a></p>
</div>
<div class="refsect1">
<a name="GstGLUpload.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-gl-upload-new"></a><h3>gst_gl_upload_new ()</h3>
<pre class="programlisting"><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="returnvalue">GstGLUpload</span></a> *
gst_gl_upload_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
<div class="refsect3">
<a name="id-1.2.7.16.7.2.4"></a><h4>Parameters</h4>
<div class="informaltable"><table 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></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.2.5"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> object</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-init-format"></a><h3>gst_gl_upload_init_format ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_upload_init_format (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *in_info</code></em>);</pre>
<p>Initializes <em class="parameter"><code>upload</code></em>
with the information required for upload.</p>
<div class="refsect3">
<a name="id-1.2.7.16.7.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>upload</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>in_info</p></td>
<td class="parameter_description"><p>input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.3.6"></a><h4>Returns</h4>
<p> whether the initialization was successful</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-add-video-gl-texture-upload-meta"></a><h3>gst_gl_upload_add_video_gl_texture_upload_meta ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_upload_add_video_gl_texture_upload_meta
(<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Adds a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a> on <em class="parameter"><code>buffer</code></em>
using <em class="parameter"><code>upload</code></em>
</p>
<div class="refsect3">
<a name="id-1.2.7.16.7.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>upload</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.4.6"></a><h4>Returns</h4>
<p> whether it was successful</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-perform-with-data"></a><h3>gst_gl_upload_perform_with_data ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_upload_perform_with_data (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
<em class="parameter"><code><span class="type">GLuint</span> texture_id</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data[GST_VIDEO_MAX_PLANES]</code></em>);</pre>
<p>Uploads <em class="parameter"><code>data</code></em>
into <em class="parameter"><code>texture_id</code></em>
. data size and format is specified by
the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a>s passed to <a class="link" href="GstGLUpload.html#gst-gl-upload-init-format" title="gst_gl_upload_init_format ()"><code class="function">gst_gl_upload_init_format()</code></a></p>
<div class="refsect3">
<a name="id-1.2.7.16.7.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>upload</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>texture_id</p></td>
<td class="parameter_description"><p>the texture id to download</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>where the downloaded data should go</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.5.6"></a><h4>Returns</h4>
<p> whether the upload was successful</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-perform-with-gl-texture-upload-meta"></a><h3>gst_gl_upload_perform_with_gl_texture_upload_meta ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_upload_perform_with_gl_texture_upload_meta
(<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a> *meta</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> texture_id[4]</code></em>);</pre>
<p>Uploads <em class="parameter"><code>meta</code></em>
into <em class="parameter"><code>texture_id</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.7.16.7.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>upload</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>meta</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>texture_id</p></td>
<td class="parameter_description"><p>resulting GL textures to place the data into.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.6.6"></a><h4>Returns</h4>
<p> whether the upload was successful</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-perform-with-buffer"></a><h3>gst_gl_upload_perform_with_buffer ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_gl_upload_perform_with_buffer (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *tex_id</code></em>);</pre>
<p>Uploads <em class="parameter"><code>buffer</code></em>
to the texture given by <em class="parameter"><code>tex_id</code></em>
. <em class="parameter"><code>tex_id</code></em>
is valid
until <a class="link" href="GstGLUpload.html#gst-gl-upload-release-buffer" title="gst_gl_upload_release_buffer ()"><code class="function">gst_gl_upload_release_buffer()</code></a> is called.</p>
<div class="refsect3">
<a name="id-1.2.7.16.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>upload</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</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>resulting texture</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.16.7.7.6"></a><h4>Returns</h4>
<p> whether the upload was successful</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-upload-release-buffer"></a><h3>gst_gl_upload_release_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_upload_release_buffer (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="GstGLUpload.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstGLUpload-struct"></a><h3>GstGLUpload</h3>
<pre class="programlisting">typedef struct _GstGLUpload GstGLUpload;</pre>
<p>Opaque <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> object</p>
</div>
</div>
<div class="refsect1">
<a name="GstGLUpload.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstGLDownload.html" title="GstGLDownload"><span class="type">GstGLDownload</span></a>, <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.20</div>
</body>
</html>