| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GstContext: GStreamer 1.0 Core Reference Manual</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
| <link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual"> |
| <link rel="up" href="libgstreamer.html" title="GStreamer Core Library"> |
| <link rel="prev" href="gstreamer-GstConfig.html" title="GstConfig"> |
| <link rel="next" href="GstControlBinding.html" title="GstControlBinding"> |
| <meta name="generator" content="GTK-Doc V1.24 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| <td width="100%" align="left" class="shortcuts"> |
| <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| <a href="#GstContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| <a href="#GstContext.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="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| <td><a accesskey="p" href="gstreamer-GstConfig.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| <td><a accesskey="n" href="GstControlBinding.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| </tr></table> |
| <div class="refentry"> |
| <a name="GstContext"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GstContext.top_of_page"></a>GstContext</span></h2> |
| <p>GstContext — Lightweight objects to represent element contexts</p> |
| </td> |
| <td class="gallery_image" valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsect1"> |
| <a name="GstContext.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="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-new" title="gst_context_new ()">gst_context_new</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-ref" title="gst_context_ref ()">gst_context_ref</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="GstContext.html#gst-context-unref" title="gst_context_unref ()">gst_context_unref</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-copy" title="gst_context_copy ()">gst_context_copy</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-get-context-type" title="gst_context_get_context_type ()">gst_context_get_context_type</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-has-context-type" title="gst_context_has_context_type ()">gst_context_has_context_type</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-is-persistent" title="gst_context_is_persistent ()">gst_context_is_persistent</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">const <a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-get-structure" title="gst_context_get_structure ()">gst_context_get_structure</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-writable-structure" title="gst_context_writable_structure ()">gst_context_writable_structure</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="define_keyword">#define</td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-make-writable" title="gst_context_make_writable()">gst_context_make_writable</a><span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="define_keyword">#define</td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-is-writable" title="gst_context_is_writable()">gst_context_is_writable</a><span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GstContext.html#gst-context-replace" title="gst_context_replace ()">gst_context_replace</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.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="GstContext.html#GstContext-struct" title="GstContext">GstContext</a></td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a> |
| <span class="lineart">╰──</span> GstContext |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.includes"></a><h2>Includes</h2> |
| <pre class="synopsis">#include <gst/gst.h> |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.description"></a><h2>Description</h2> |
| <p><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> is a container object used to store contexts like a device |
| context, a display server connection and similar concepts that should |
| be shared between multiple elements.</p> |
| <p>Applications can set a context on a complete pipeline by using |
| <a class="link" href="GstElement.html#gst-element-set-context" title="gst_element_set_context ()"><code class="function">gst_element_set_context()</code></a>, which will then be propagated to all |
| child elements. Elements can handle these in <a class="link" href="GstElement.html#GstElementClass.set-context"><code class="function">GstElementClass.set_context()</code></a> |
| and merge them with the context information they already have.</p> |
| <p>When an element needs a context it will do the following actions in this |
| order until one step succeeds:</p> |
| <div class="orderedlist"><ol class="orderedlist" type="1"> |
| <li class="listitem"><p>Check if the element already has a context</p></li> |
| <li class="listitem"><p>Query downstream with GST_QUERY_CONTEXT for the context</p></li> |
| <li class="listitem"><p>Query upstream with GST_QUERY_CONTEXT for the context</p></li> |
| <li class="listitem"><p>Post a GST_MESSAGE_NEED_CONTEXT message on the bus with the required |
| context types and afterwards check if a usable context was set now</p></li> |
| <li class="listitem"><p>Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT message |
| on the bus.</p></li> |
| </ol></div> |
| <p>Bins will catch GST_MESSAGE_NEED_CONTEXT messages and will set any previously |
| known context on the element that asks for it if possible. Otherwise the |
| application should provide one if it can.</p> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.functions_details"></a><h2>Functions</h2> |
| <div class="refsect2"> |
| <a name="gst-context-new"></a><h3>gst_context_new ()</h3> |
| <pre class="programlisting"><a class="link" href="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| gst_context_new (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *context_type</code></em>, |
| <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> persistent</code></em>);</pre> |
| <p>Create a new context.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.2.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_type</p></td> |
| <td class="parameter_description"><p>Context type</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>persistent</p></td> |
| <td class="parameter_description"><p>Persistent context</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.2.6"></a><h4>Returns</h4> |
| <p> The new context. </p> |
| <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-ref"></a><h3>gst_context_ref ()</h3> |
| <pre class="programlisting"><a class="link" href="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| gst_context_ref (<em class="parameter"><code><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Convenience macro to increase the reference count of the context.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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>context</p></td> |
| <td class="parameter_description"><p>the context to ref</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.3.6"></a><h4>Returns</h4> |
| <p> <em class="parameter"><code>context</code></em> |
| (for convenience when doing assignments)</p> |
| </div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-unref"></a><h3>gst_context_unref ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> |
| gst_context_unref (<em class="parameter"><code><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Convenience macro to decrease the reference count of the context, possibly |
| freeing it.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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>the context to unref</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-copy"></a><h3>gst_context_copy ()</h3> |
| <pre class="programlisting"><a class="link" href="GstContext.html" title="GstContext"><span class="returnvalue">GstContext</span></a> * |
| gst_context_copy (<em class="parameter"><code>const <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Creates a copy of the context. Returns a copy of the context.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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>context</p></td> |
| <td class="parameter_description"><p>the context to copy</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.5.6"></a><h4>Returns</h4> |
| <p> a new copy of <em class="parameter"><code>context</code></em> |
| .</p> |
| <p>MT safe. </p> |
| <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-get-context-type"></a><h3>gst_context_get_context_type ()</h3> |
| <pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * |
| gst_context_get_context_type (<em class="parameter"><code>const <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Get the type of <em class="parameter"><code>context</code></em> |
| .</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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>context</p></td> |
| <td class="parameter_description"><p>The <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.6.6"></a><h4>Returns</h4> |
| <p> The type of the context.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-has-context-type"></a><h3>gst_context_has_context_type ()</h3> |
| <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| gst_context_has_context_type (<em class="parameter"><code>const <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>, |
| <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *context_type</code></em>);</pre> |
| <p>Checks if <em class="parameter"><code>context</code></em> |
| has <em class="parameter"><code>context_type</code></em> |
| .</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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>context</p></td> |
| <td class="parameter_description"><p>The <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>context_type</p></td> |
| <td class="parameter_description"><p>Context type to check.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.7.6"></a><h4>Returns</h4> |
| <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>context</code></em> |
| has <em class="parameter"><code>context_type</code></em> |
| .</p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-is-persistent"></a><h3>gst_context_is_persistent ()</h3> |
| <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| gst_context_is_persistent (<em class="parameter"><code>const <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Check if <em class="parameter"><code>context</code></em> |
| is persistent.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.8.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>The <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.8.6"></a><h4>Returns</h4> |
| <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the context is persistent.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-get-structure"></a><h3>gst_context_get_structure ()</h3> |
| <pre class="programlisting">const <a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> * |
| gst_context_get_structure (<em class="parameter"><code>const <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Access the structure of the context.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.9.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>The <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.9.6"></a><h4>Returns</h4> |
| <p> The structure of the context. The structure is |
| still owned by the context, which means that you should not modify it, |
| free it and that the pointer becomes invalid when you free the context. </p> |
| <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-writable-structure"></a><h3>gst_context_writable_structure ()</h3> |
| <pre class="programlisting"><a class="link" href="GstStructure.html" title="GstStructure"><span class="returnvalue">GstStructure</span></a> * |
| gst_context_writable_structure (<em class="parameter"><code><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *context</code></em>);</pre> |
| <p>Get a writable version of the structure.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.10.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>The <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.10.6"></a><h4>Returns</h4> |
| <p> The structure of the context. The structure is still |
| owned by the event, which means that you should not free it and |
| that the pointer becomes invalid when you free the event. |
| This function checks if <em class="parameter"><code>context</code></em> |
| is writable.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-make-writable"></a><h3>gst_context_make_writable()</h3> |
| <pre class="programlisting">#define gst_context_make_writable(context) GST_CONTEXT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (context))) |
| </pre> |
| <p>Checks if a context is writable. If not, a writable copy is made and |
| returned.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.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> the context to make writable. </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.3.17.8.11.6"></a><h4>Returns</h4> |
| <p> a context (possibly a duplicate) that is writable.</p> |
| <p>MT safe. </p> |
| <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-is-writable"></a><h3>gst_context_is_writable()</h3> |
| <pre class="programlisting">#define gst_context_is_writable(context) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (context)) |
| </pre> |
| <p>Tests if you can safely write into a context's structure or validly |
| modify the seqnum and timestamp fields.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.12.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="GstContext.html" title="GstContext"><span class="type">GstContext</span></a></p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-context-replace"></a><h3>gst_context_replace ()</h3> |
| <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
| gst_context_replace (<em class="parameter"><code><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> **old_context</code></em>, |
| <em class="parameter"><code><a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> *new_context</code></em>);</pre> |
| <p>Modifies a pointer to a <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> to point to a different <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a>. The |
| modification is done atomically (so this is useful for ensuring thread safety |
| in some cases), and the reference counts are updated appropriately (the old |
| context is unreffed, the new one is reffed).</p> |
| <p>Either <em class="parameter"><code>new_context</code></em> |
| or the <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> pointed to by <em class="parameter"><code>old_context</code></em> |
| may be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.13.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>old_context</p></td> |
| <td class="parameter_description"><p> pointer to a pointer to a <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> |
| to be replaced. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>new_context</p></td> |
| <td class="parameter_description"><p> pointer to a <a class="link" href="GstContext.html" title="GstContext"><span class="type">GstContext</span></a> that will |
| replace the context pointed to by <em class="parameter"><code>old_context</code></em> |
| . </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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="id-1.3.17.8.13.7"></a><h4>Returns</h4> |
| <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>new_context</code></em> |
| was different from <em class="parameter"><code>old_context</code></em> |
| </p> |
| </div> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.other_details"></a><h2>Types and Values</h2> |
| <div class="refsect2"> |
| <a name="GstContext-struct"></a><h3>GstContext</h3> |
| <pre class="programlisting">typedef struct _GstContext GstContext;</pre> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="GstContext.see-also"></a><h2>See Also</h2> |
| <p><a class="link" href="gstreamer-GstMiniObject.html#GstMiniObject" title="struct GstMiniObject"><span class="type">GstMiniObject</span></a>, <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a></p> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr>Generated by GTK-Doc V1.24</div> |
| </body> |
| </html> |