blob: 33f62567b474fd01d5cb083a59fbe699272f7b14 [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>GstMeta: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.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="GstMessage.html" title="GstMessage">
<link rel="next" href="gstreamer-GstMiniObject.html" title="GstMiniObject">
<meta name="generator" content="GTK-Doc V1.25 (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="#gstreamer-GstMeta.description" class="shortcut">Description</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="GstMessage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gstreamer-GstMiniObject.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gstreamer-GstMeta"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gstreamer-GstMeta.top_of_page"></a>GstMeta</span></h2>
<p>GstMeta — Buffer metadata</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gstreamer-GstMeta.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" 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="gstreamer-GstMeta.html#GST-META-FLAGS:CAPS" title="GST_META_FLAGS()">GST_META_FLAGS</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#GST-META-FLAG-IS-SET:CAPS" title="GST_META_FLAG_IS_SET()">GST_META_FLAG_IS_SET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#GST-META-FLAG-SET:CAPS" title="GST_META_FLAG_SET()">GST_META_FLAG_SET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#GST-META-FLAG-UNSET:CAPS" title="GST_META_FLAG_UNSET()">GST_META_FLAG_UNSET</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gstreamer-GstMeta.html#GstMetaInitFunction" title="GstMetaInitFunction ()">*GstMetaInitFunction</a><span class="c_punctuation">)</span> <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="gstreamer-GstMeta.html#GstMetaFreeFunction" title="GstMetaFreeFunction ()">*GstMetaFreeFunction</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()">*GstMetaTransformFunction</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#GST-META-TRANSFORM-IS-COPY:CAPS" title="GST_META_TRANSFORM_IS_COPY()">GST_META_TRANSFORM_IS_COPY</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#gst-meta-api-type-register" title="gst_meta_api_type_register ()">gst_meta_api_type_register</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#gst-meta-api-type-has-tag" title="gst_meta_api_type_has_tag ()">gst_meta_api_type_has_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const*
</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#gst-meta-api-type-get-tags" title="gst_meta_api_type_get_tags ()">gst_meta_api_type_get_tags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#gst-meta-register" title="gst_meta_register ()">gst_meta_register</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-GstMeta.html#gst-meta-get-info" title="gst_meta_get_info ()">gst_meta_get_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta">GstMeta</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags">GstMetaFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo">GstMetaInfo</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GstMetaTransformCopy" title="GstMetaTransformCopy">GstMetaTransformCopy</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GST-META-TAG-MEMORY:CAPS" title="GST_META_TAG_MEMORY">GST_META_TAG_MEMORY</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gstreamer-GstMeta.html#GST-META-TAG-MEMORY-STR:CAPS" title="GST_META_TAG_MEMORY_STR">GST_META_TAG_MEMORY_STR</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.description"></a><h2>Description</h2>
<p>The <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> structure should be included as the first member of a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a>
metadata structure. The structure defines the API of the metadata and should
be accessible to all elements using the metadata.</p>
<p>A metadata API is registered with <a class="link" href="gstreamer-GstMeta.html#gst-meta-api-type-register" title="gst_meta_api_type_register ()"><code class="function">gst_meta_api_type_register()</code></a> which takes a
name for the metadata API and some tags associated with the metadata.
With <a class="link" href="gstreamer-GstMeta.html#gst-meta-api-type-has-tag" title="gst_meta_api_type_has_tag ()"><code class="function">gst_meta_api_type_has_tag()</code></a> one can check if a certain metadata API
contains a given tag.</p>
<p>Multiple implementations of a metadata API can be registered.
To implement a metadata API, <a class="link" href="gstreamer-GstMeta.html#gst-meta-register" title="gst_meta_register ()"><code class="function">gst_meta_register()</code></a> should be used. This
function takes all parameters needed to create, free and transform metadata
along with the size of the metadata. The function returns a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a>
structure that contains the information for the implementation of the API.</p>
<p>A specific implementation can be retrieved by name with <a class="link" href="gstreamer-GstMeta.html#gst-meta-get-info" title="gst_meta_get_info ()"><code class="function">gst_meta_get_info()</code></a>.</p>
<p>See <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> for how the metadata can be added, retrieved and removed from
buffers.</p>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GST-META-FLAGS:CAPS"></a><h3>GST_META_FLAGS()</h3>
<pre class="programlisting">#define GST_META_FLAGS(meta) (GST_META_CAST (meta)-&gt;flags)
</pre>
<p>A flags word containing <a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags"><span class="type">GstMetaFlags</span></a> flags set on <em class="parameter"><code>meta</code></em>
</p>
<div class="refsect3">
<a name="GST-META-FLAGS.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-FLAG-IS-SET:CAPS"></a><h3>GST_META_FLAG_IS_SET()</h3>
<pre class="programlisting">#define GST_META_FLAG_IS_SET(meta,flag) !!(GST_META_FLAGS (meta) &amp; (flag))
</pre>
<p>Gives the status of a specific flag on a metadata.</p>
<div class="refsect3">
<a name="GST-META-FLAG-IS-SET.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags"><span class="type">GstMetaFlags</span></a> to check.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-FLAG-SET:CAPS"></a><h3>GST_META_FLAG_SET()</h3>
<pre class="programlisting">#define GST_META_FLAG_SET(meta,flag) (GST_META_FLAGS (meta) |= (flag))
</pre>
<p>Sets a metadata flag on a metadata.</p>
<div class="refsect3">
<a name="GST-META-FLAG-SET.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags"><span class="type">GstMetaFlags</span></a> to set.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-FLAG-UNSET:CAPS"></a><h3>GST_META_FLAG_UNSET()</h3>
<pre class="programlisting">#define GST_META_FLAG_UNSET(meta,flag) (GST_META_FLAGS (meta) &amp;= ~(flag))
</pre>
<p>Clears a metadata flag.</p>
<div class="refsect3">
<a name="GST-META-FLAG-UNSET.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>the <a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags"><span class="type">GstMetaFlags</span></a> to clear.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaInitFunction"></a><h3>GstMetaInitFunction ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GstMetaInitFunction<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> *meta</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> params</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Function called when <em class="parameter"><code>meta</code></em>
is initialized in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="GstMetaInitFunction.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>params</p></td>
<td class="parameter_description"><p>parameters passed to the init function</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaFreeFunction"></a><h3>GstMetaFreeFunction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GstMetaFreeFunction<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> *meta</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Function called when <em class="parameter"><code>meta</code></em>
is freed in <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="GstMetaFreeFunction.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>meta</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</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 class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaTransformFunction"></a><h3>GstMetaTransformFunction ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GstMetaTransformFunction<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *transbuf</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> *meta</code></em>,
<em class="parameter"><code><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Quarks.html#GQuark"><span class="type">GQuark</span></a> type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Function called for each <em class="parameter"><code>meta</code></em>
in <em class="parameter"><code>buffer</code></em>
as a result of performing a
transformation on <em class="parameter"><code>transbuf</code></em>
. Additional <em class="parameter"><code>type</code></em>
specific transform data
is passed to the function as <em class="parameter"><code>data</code></em>
.</p>
<p>Implementations should check the <em class="parameter"><code>type</code></em>
of the transform and parse
additional type specific fields in <em class="parameter"><code>data</code></em>
that should be used to update
the metadata on <em class="parameter"><code>transbuf</code></em>
.</p>
<div class="refsect3">
<a name="GstMetaTransformFunction.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>transbuf</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</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 class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</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 class="link" href="GstBuffer.html" title="GstBuffer"><span class="type">GstBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the transform type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>transform specific data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GstMetaTransformFunction.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the transform could be performed</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-TRANSFORM-IS-COPY:CAPS"></a><h3>GST_META_TRANSFORM_IS_COPY()</h3>
<pre class="programlisting">#define GST_META_TRANSFORM_IS_COPY(type) ((type) == _gst_meta_transform_copy)
</pre>
<p>Check if the transform type is a copy transform</p>
<div class="refsect3">
<a name="GST-META-TRANSFORM-IS-COPY.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>type</p></td>
<td class="parameter_description"><p>a transform type</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-meta-api-type-register"></a><h3>gst_meta_api_type_register ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>
gst_meta_api_type_register (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *api</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **tags</code></em>);</pre>
<p>Register and return a GType for the <em class="parameter"><code>api</code></em>
and associate it with
<em class="parameter"><code>tags</code></em>
.</p>
<div class="refsect3">
<a name="gst-meta-api-type-register.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>api</p></td>
<td class="parameter_description"><p>an API to register</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tags</p></td>
<td class="parameter_description"><p>tags for <em class="parameter"><code>api</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-meta-api-type-register.returns"></a><h4>Returns</h4>
<p> a unique GType for <em class="parameter"><code>api</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-meta-api-type-has-tag"></a><h3>gst_meta_api_type_has_tag ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_meta_api_type_has_tag (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> api</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Quarks.html#GQuark"><span class="type">GQuark</span></a> tag</code></em>);</pre>
<p>Check if <em class="parameter"><code>api</code></em>
was registered with <em class="parameter"><code>tag</code></em>
.</p>
<div class="refsect3">
<a name="gst-meta-api-type-has-tag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>api</p></td>
<td class="parameter_description"><p>an API</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tag</p></td>
<td class="parameter_description"><p>the tag to check</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-meta-api-type-has-tag.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>api</code></em>
was registered with <em class="parameter"><code>tag</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-meta-api-type-get-tags"></a><h3>gst_meta_api_type_get_tags ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const*
gst_meta_api_type_get_tags (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> api</code></em>);</pre>
<div class="refsect3">
<a name="gst-meta-api-type-get-tags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>api</p></td>
<td class="parameter_description"><p>an API</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-meta-api-type-get-tags.returns"></a><h4>Returns</h4>
<p> an array of tags as strings. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</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-meta-register"></a><h3>gst_meta_register ()</h3>
<pre class="programlisting">const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
gst_meta_register (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> api</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *impl</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMetaInitFunction" title="GstMetaInitFunction ()"><span class="type">GstMetaInitFunction</span></a> init_func</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMetaFreeFunction" title="GstMetaFreeFunction ()"><span class="type">GstMetaFreeFunction</span></a> free_func</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()"><span class="type">GstMetaTransformFunction</span></a> transform_func</code></em>);</pre>
<p>Register a new <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> implementation.</p>
<p>The same <em class="parameter"><code>info</code></em>
can be retrieved later with <a class="link" href="gstreamer-GstMeta.html#gst-meta-get-info" title="gst_meta_get_info ()"><code class="function">gst_meta_get_info()</code></a> by using
<em class="parameter"><code>impl</code></em>
as the key.</p>
<div class="refsect3">
<a name="gst-meta-register.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>api</p></td>
<td class="parameter_description"><p>the type of the <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> API</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>impl</p></td>
<td class="parameter_description"><p>the name of the <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> implementation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size of the <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a> structure</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>init_func</p></td>
<td class="parameter_description"><p> a <a class="link" href="gstreamer-GstMeta.html#GstMetaInitFunction" title="GstMetaInitFunction ()"><span class="type">GstMetaInitFunction</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>free_func</p></td>
<td class="parameter_description"><p> a <a class="link" href="gstreamer-GstMeta.html#GstMetaFreeFunction" title="GstMetaFreeFunction ()"><span class="type">GstMetaFreeFunction</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>transform_func</p></td>
<td class="parameter_description"><p> a <a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()"><span class="type">GstMetaTransformFunction</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-meta-register.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> that can be used to access metadata. </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>
</div>
<hr>
<div class="refsect2">
<a name="gst-meta-get-info"></a><h3>gst_meta_get_info ()</h3>
<pre class="programlisting">const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> *
gst_meta_get_info (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *impl</code></em>);</pre>
<p>Lookup a previously registered meta info structure by its implementation name
<em class="parameter"><code>impl</code></em>
.</p>
<div class="refsect3">
<a name="gst-meta-get-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>impl</p></td>
<td class="parameter_description"><p>the name</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-meta-get-info.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> with <em class="parameter"><code>impl</code></em>
, or
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when no such metainfo exists. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstMeta"></a><h3>struct GstMeta</h3>
<pre class="programlisting">struct GstMeta {
GstMetaFlags flags;
const GstMetaInfo *info;
};
</pre>
<p>Base structure for metadata. Custom metadata will put this structure
as the first member of their structure.</p>
<div class="refsect3">
<a name="GstMeta.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMeta.html#GstMetaFlags" title="enum GstMetaFlags"><span class="type">GstMetaFlags</span></a> <em class="structfield"><code><a name="GstMeta.flags"></a>flags</code></em>;</p></td>
<td class="struct_member_description"><p>extra flags for the metadata</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> *<em class="structfield"><code><a name="GstMeta.info"></a>info</code></em>;</p></td>
<td class="struct_member_description"><p>pointer to the <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaFlags"></a><h3>enum GstMetaFlags</h3>
<p>Extra metadata flags.</p>
<div class="refsect3">
<a name="GstMetaFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" 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-META-FLAG-NONE:CAPS"></a>GST_META_FLAG_NONE</p></td>
<td class="enum_member_description">
<p>no flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-META-FLAG-READONLY:CAPS"></a>GST_META_FLAG_READONLY</p></td>
<td class="enum_member_description">
<p>metadata should not be modified</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-META-FLAG-POOLED:CAPS"></a>GST_META_FLAG_POOLED</p></td>
<td class="enum_member_description">
<p>metadata is managed by a bufferpool</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-META-FLAG-LOCKED:CAPS"></a>GST_META_FLAG_LOCKED</p></td>
<td class="enum_member_description">
<p>metadata should not be removed</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-META-FLAG-LAST:CAPS"></a>GST_META_FLAG_LAST</p></td>
<td class="enum_member_description">
<p>additional flags can be added starting from this flag.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaInfo"></a><h3>struct GstMetaInfo</h3>
<pre class="programlisting">struct GstMetaInfo {
GType api;
GType type;
gsize size;
GstMetaInitFunction init_func;
GstMetaFreeFunction free_func;
GstMetaTransformFunction transform_func;
};
</pre>
<p>The <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a> provides information about a specific metadata
structure.</p>
<div class="refsect3">
<a name="GstMetaInfo.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GstMetaInfo.api"></a>api</code></em>;</p></td>
<td class="struct_member_description"><p>tag identifying the metadata structure and api</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GstMetaInfo.type"></a>type</code></em>;</p></td>
<td class="struct_member_description"><p>type identifying the implementor of the api</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GstMetaInfo.size"></a>size</code></em>;</p></td>
<td class="struct_member_description"><p>size of the metadata</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMeta.html#GstMetaInitFunction" title="GstMetaInitFunction ()"><span class="type">GstMetaInitFunction</span></a> <em class="structfield"><code><a name="GstMetaInfo.init-func"></a>init_func</code></em>;</p></td>
<td class="struct_member_description"><p>function for initializing the metadata</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMeta.html#GstMetaFreeFunction" title="GstMetaFreeFunction ()"><span class="type">GstMetaFreeFunction</span></a> <em class="structfield"><code><a name="GstMetaInfo.free-func"></a>free_func</code></em>;</p></td>
<td class="struct_member_description"><p>function for freeing the metadata</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()"><span class="type">GstMetaTransformFunction</span></a> <em class="structfield"><code><a name="GstMetaInfo.transform-func"></a>transform_func</code></em>;</p></td>
<td class="struct_member_description"><p>function for transforming the metadata</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaTransformCopy"></a><h3>GstMetaTransformCopy</h3>
<pre class="programlisting">typedef struct {
gboolean region;
gsize offset;
gsize size;
} GstMetaTransformCopy;
</pre>
<p>Extra data passed to a "gst-copy" transform <a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()"><span class="type">GstMetaTransformFunction</span></a>.</p>
<div class="refsect3">
<a name="GstMetaTransformCopy.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstMetaTransformCopy.region"></a>region</code></em>;</p></td>
<td class="struct_member_description"><p><a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if only region is copied</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GstMetaTransformCopy.offset"></a>offset</code></em>;</p></td>
<td class="struct_member_description"><p>the offset to copy, 0 if <em class="parameter"><code>region</code></em>
is <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, otherwise &gt; 0</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GstMetaTransformCopy.size"></a>size</code></em>;</p></td>
<td class="struct_member_description"><p>the size to copy, -1 or the buffer size when <em class="parameter"><code>region</code></em>
is <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-TAG-MEMORY:CAPS"></a><h3>GST_META_TAG_MEMORY</h3>
<pre class="programlisting">#define GST_META_TAG_MEMORY (_gst_meta_tag_memory)
</pre>
<div class="warning">
<p><code class="literal">GST_META_TAG_MEMORY</code> is deprecated and should not be used in newly-written code.</p>
<p>The GQuarks are not exported by any public API, use
GST_META_TAG_MEMORY_STR instead.</p>
</div>
<p>Metadata tagged with this tag depends on the particular memory
or buffer that it is on.</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-TAG-MEMORY-STR:CAPS"></a><h3>GST_META_TAG_MEMORY_STR</h3>
<pre class="programlisting">#define GST_META_TAG_MEMORY_STR "memory"
</pre>
<p>This metadata stays relevant as long as memory layout is unchanged.</p>
<p class="since">Since: <a class="link" href="ix06.html#api-index-1.2">1.2</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>