blob: 88c438c0fff4344656ea58ce692e8410c0ac1a97 [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: GstGLContext</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="GstGLColorConvert.html" title="GstGLColorConvert">
<link rel="next" href="gst-plugins-bad-libs-GstGLContextCocoa.html" title="GstGLContextCocoa">
<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="#GstGLContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
<a href="#GstGLContext.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="GstGLColorConvert.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLContextCocoa.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstGLContext"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstGLContext.top_of_page"></a>GstGLContext</span></h2>
<p>GstGLContext — OpenGL context abstraction</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstGLContext.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="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GstGLContext.html#GST-GL-CONTEXT-ERROR:CAPS" title="GST_GL_CONTEXT_ERROR">GST_GL_CONTEXT_ERROR</a></td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-error-quark" title="gst_gl_context_error_quark ()">gst_gl_context_error_quark</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstGLContext.html#GstGLContextThreadFunc" title="GstGLContextThreadFunc ()">*GstGLContextThreadFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-new" title="gst_gl_context_new ()">gst_gl_context_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="GstGLContext.html#gst-gl-context-create" title="gst_gl_context_create ()">gst_gl_context_create</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="GstGLContext.html#gst-gl-context-activate" title="gst_gl_context_activate ()">gst_gl_context_activate</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#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-default-get-proc-address" title="gst_gl_context_default_get_proc_address ()">gst_gl_context_default_get_proc_address</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#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-get-proc-address" title="gst_gl_context_get_proc_address ()">gst_gl_context_get_proc_address</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="returnvalue">GstGLWindow</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-get-window" title="gst_gl_context_get_window ()">gst_gl_context_get_window</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="GstGLContext.html#gst-gl-context-set-window" title="gst_gl_context_set_window ()">gst_gl_context_set_window</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="GstGLContext.html#gst-gl-context-thread-add" title="gst_gl_context_thread_add ()">gst_gl_context_thread_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="returnvalue">GstGLDisplay</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-get-display" title="gst_gl_context_get_display ()">gst_gl_context_get_display</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="returnvalue">GstGLAPI</span></a>
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-api" title="gst_gl_context_get_gl_api ()">gst_gl_context_get_gl_api</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guintptr</span>
</td>
<td class="function_name">
<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-context" title="gst_gl_context_get_gl_context ()">gst_gl_context_get_gl_context</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="GstGLContext.html#gst-gl-context-check-feature" title="gst_gl_context_check_feature ()">gst_gl_context_check_feature</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstGLContext.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">enum</td>
<td class="function_name"><a class="link" href="GstGLContext.html#GstGLContextError" title="enum GstGLContextError">GstGLContextError</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GstGLContext.html#GstGLContext-struct" title="GstGLContext">GstGLContext</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstGLContext.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> <a href="http://library.gnome.org/devel/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> GstGLContext
</pre>
</div>
<div class="refsect1">
<a name="GstGLContext.description"></a><h2>Description</h2>
<p><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> wraps an OpenGL context object in a uniform API. As a result
of the limitation on OpenGL context, this object is not thread safe unless
specified and must only be activated in a single thread.</p>
</div>
<div class="refsect1">
<a name="GstGLContext.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GST-GL-CONTEXT-ERROR:CAPS"></a><h3>GST_GL_CONTEXT_ERROR</h3>
<pre class="programlisting">#define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ())
</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-error-quark"></a><h3>gst_gl_context_error_quark ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
gst_gl_context_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstGLContextThreadFunc"></a><h3>GstGLContextThreadFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GstGLContextThreadFunc<span class="c_punctuation">)</span> (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Represents a function to run in the GL thread with <em class="parameter"><code>context</code></em>
and <em class="parameter"><code>data</code></em>
</p>
<div class="refsect3">
<a name="id-1.2.7.5.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>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>data</p></td>
<td class="parameter_description"><p>user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-new"></a><h3>gst_gl_context_new ()</h3>
<pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
gst_gl_context_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
<p>Create a new <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> with the specified <em class="parameter"><code>display</code></em>
</p>
<div class="refsect3">
<a name="id-1.2.7.5.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>display</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.5.6"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-create"></a><h3>gst_gl_context_create ()</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_context_create (<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 class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *other_context</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates an OpenGL context in the current thread with the specified
<em class="parameter"><code>other_context</code></em>
as a context to share shareable OpenGL objects with. See the
OpenGL specification for what is shared between contexts.</p>
<p>If an error occurs, and <em class="parameter"><code>error</code></em>
is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then error will contain details
of the error and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.</p>
<p>Should only be called once.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.6.7"></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>
<tr>
<td class="parameter_name"><p>other_context</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> to share OpenGL objects with. </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>error</p></td>
<td class="parameter_description"><p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. </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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.6.8"></a><h4>Returns</h4>
<p> whether the context could successfully be created</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-activate"></a><h3>gst_gl_context_activate ()</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_context_activate (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> activate</code></em>);</pre>
<p>(De)activate the OpenGL context represented by this <em class="parameter"><code>context</code></em>
.</p>
<p>In OpenGL terms, calls eglMakeCurrent or similar with this context and the
currently set window. See <a class="link" href="GstGLContext.html#gst-gl-context-set-window" title="gst_gl_context_set_window ()"><code class="function">gst_gl_context_set_window()</code></a> for details.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.7.6"></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>
<tr>
<td class="parameter_name"><p>activate</p></td>
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to activate, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to deactivate</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.7.7"></a><h4>Returns</h4>
<p> Whether the activation succeeded</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-default-get-proc-address"></a><h3>gst_gl_context_default_get_proc_address ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
gst_gl_context_default_get_proc_address
(<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>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-get-proc-address"></a><h3>gst_gl_context_get_proc_address ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
gst_gl_context_get_proc_address (<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>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Get a function pointer to a specified opengl function, <em class="parameter"><code>name</code></em>
. If the the
specific function does not exist, NULL is returned instead.</p>
<p>Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
be retreived using this method.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.9.6"></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>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>an opengl function name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.9.7"></a><h4>Returns</h4>
<p> a function pointer or NULL</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-get-window"></a><h3>gst_gl_context_get_window ()</h3>
<pre class="programlisting"><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="returnvalue">GstGLWindow</span></a> *
gst_gl_context_get_window (<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.5.7.10.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.5.7.10.5"></a><h4>Returns</h4>
<p> the currently set window</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-set-window"></a><h3>gst_gl_context_set_window ()</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_context_set_window (<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 class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
<p>Set's the current window on <em class="parameter"><code>context</code></em>
to <em class="parameter"><code>window</code></em>
. The window can only be
changed before <a class="link" href="GstGLContext.html#gst-gl-context-create" title="gst_gl_context_create ()"><code class="function">gst_gl_context_create()</code></a> has been called and the <em class="parameter"><code>window</code></em>
is not
already running.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.11.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>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>window</p></td>
<td class="parameter_description"><p> a <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.11.6"></a><h4>Returns</h4>
<p> Whether the window was successfully updated</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-thread-add"></a><h3>gst_gl_context_thread_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_gl_context_thread_add (<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 class="link" href="GstGLContext.html#GstGLContextThreadFunc" title="GstGLContextThreadFunc ()"><span class="type">GstGLContextThreadFunc</span></a> func</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</code></em>);</pre>
<p>Execute <em class="parameter"><code>func</code></em>
in the OpenGL thread of <em class="parameter"><code>context</code></em>
with <em class="parameter"><code>data</code></em>
</p>
<p>MT-safe</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.12.6"></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>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html#GstGLContextThreadFunc" title="GstGLContextThreadFunc ()"><span class="type">GstGLContextThreadFunc</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> user data to call <em class="parameter"><code>func</code></em>
with. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-get-display"></a><h3>gst_gl_context_get_display ()</h3>
<pre class="programlisting"><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="returnvalue">GstGLDisplay</span></a> *
gst_gl_context_get_display (<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.5.7.13.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.5.7.13.5"></a><h4>Returns</h4>
<p> the <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> associated with this <em class="parameter"><code>context</code></em>
</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-get-gl-api"></a><h3>gst_gl_context_get_gl_api ()</h3>
<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="returnvalue">GstGLAPI</span></a>
gst_gl_context_get_gl_api (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
<p>Get the currently enabled OpenGL api.</p>
<p>The currently available API may be limited by the <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> in use and/or
the <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> chosen.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.14.6"></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.5.7.14.7"></a><h4>Returns</h4>
<p> the currently available OpenGL api</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-get-gl-context"></a><h3>gst_gl_context_get_gl_context ()</h3>
<pre class="programlisting"><span class="returnvalue">guintptr</span>
gst_gl_context_get_gl_context (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
<p>Gets the backing OpenGL context used by <em class="parameter"><code>context</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.15.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>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.5.7.15.6"></a><h4>Returns</h4>
<p> The platform specific backing OpenGL context</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-gl-context-check-feature"></a><h3>gst_gl_context_check_feature ()</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_context_check_feature (<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>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *feature</code></em>);</pre>
<p>Some features require that the context be created before it is possible to
determine their existence and so will fail if that is not the case.</p>
<div class="refsect3">
<a name="id-1.2.7.5.7.16.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>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>feature</p></td>
<td class="parameter_description"><p>a platform specific feature</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.5.7.16.6"></a><h4>Returns</h4>
<p> Whether <em class="parameter"><code>feature</code></em>
is supported by <em class="parameter"><code>context</code></em>
</p>
<p></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstGLContext.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstGLContextError"></a><h3>enum GstGLContextError</h3>
<div class="refsect3">
<a name="id-1.2.7.5.8.2.3"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-FAILED:CAPS"></a>GST_GL_CONTEXT_ERROR_FAILED</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-WRONG-CONFIG:CAPS"></a>GST_GL_CONTEXT_ERROR_WRONG_CONFIG</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-WRONG-API:CAPS"></a>GST_GL_CONTEXT_ERROR_WRONG_API</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-OLD-LIBS:CAPS"></a>GST_GL_CONTEXT_ERROR_OLD_LIBS</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-CREATE-CONTEXT:CAPS"></a>GST_GL_CONTEXT_ERROR_CREATE_CONTEXT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-GL-CONTEXT-ERROR-RESOURCE-UNAVAILABLE:CAPS"></a>GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstGLContext-struct"></a><h3>GstGLContext</h3>
<pre class="programlisting">typedef struct _GstGLContext GstGLContext;</pre>
<p>Opaque <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> object</p>
</div>
</div>
<div class="refsect1">
<a name="GstGLContext.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a>, <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a></p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.20</div>
</body>
</html>