blob: 0ce4128902bf115ff6ab02286fc0ecfaacfd6705 [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</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="gstreamer-GstMessage.html" title="GstMessage">
<link rel="next" href="gstreamer-GstMiniObject.html" title="GstMiniObject">
<meta name="generator" content="GTK-Doc V1.18 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="gstreamer-GstMessage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th>
<td><a accesskey="n" href="gstreamer-GstMiniObject.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gstreamer-GstMeta.synopsis" class="shortcut">Top</a>
 | 
<a href="#gstreamer-GstMeta.description" class="shortcut">Description</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 valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gstreamer-GstMeta.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gst/gst.h&gt;
struct <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta">GstMeta</a>;
struct <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo">GstMetaInfo</a>;
#define <a class="link" href="gstreamer-GstMeta.html#GST-META-TRACE-NAME:CAPS" title="GST_META_TRACE_NAME">GST_META_TRACE_NAME</a>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="gstreamer-GstMeta.html#GstMetaInitFunction" title="GstMetaInitFunction ()">*GstMetaInitFunction</a>) (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> params</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="gstreamer-GstMeta.html#GstMetaFreeFunction" title="GstMetaFreeFunction ()">*GstMetaFreeFunction</a>) (<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="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="gstreamer-GstMeta.html#GstMetaCopyFunction" title="GstMetaCopyFunction ()">*GstMetaCopyFunction</a>) (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *dest</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="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="gstreamer-GstMeta.html#GstMetaTransformFunction" title="GstMetaTransformFunction ()">*GstMetaTransformFunction</a>) (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct 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="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * <a class="link" href="gstreamer-GstMeta.html#gst-meta-register" title="gst_meta_register ()">gst_meta_register</a> (<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> *api</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> *impl</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-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#GstMetaCopyFunction" title="GstMetaCopyFunction ()"><span class="type">GstMetaCopyFunction</span></a> copy_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>);
const <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="returnvalue">GstMetaInfo</span></a> * <a class="link" href="gstreamer-GstMeta.html#gst-meta-get-info" title="gst_meta_get_info ()">gst_meta_get_info</a> (<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> *impl</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.description"></a><h2>Description</h2>
<p>
Last reviewed on December 17th, 2009 (0.10.26)
</p>
</div>
<div class="refsect1">
<a name="gstreamer-GstMeta.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstMeta"></a><h3>struct GstMeta</h3>
<pre class="programlisting">struct GstMeta {
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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">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>;</span></p></td>
<td>pointer to the <a class="link" href="gstreamer-GstMeta.html#GstMetaInfo" title="struct GstMetaInfo"><span class="type">GstMetaInfo</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaInfo"></a><h3>struct GstMetaInfo</h3>
<pre class="programlisting">struct GstMetaInfo {
GQuark api;
GType type;
gsize size;
GstMetaInitFunction init_func;
GstMetaFreeFunction free_func;
GstMetaCopyFunction copy_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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> <em class="structfield"><code><a name="GstMetaInfo.api"></a>api</code></em>;</span></p></td>
<td>tag indentifying the metadata structure and api</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GstMetaInfo.type"></a>type</code></em>;</span></p></td>
<td>type indentifying the implementor of the api</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GstMetaInfo.size"></a>size</code></em>;</span></p></td>
<td>size of the metadata</td>
</tr>
<tr>
<td><p><span class="term"><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>;</span></p></td>
<td>function for initializing the metadata</td>
</tr>
<tr>
<td><p><span class="term"><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>;</span></p></td>
<td>function for freeing the metadata</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gstreamer-GstMeta.html#GstMetaCopyFunction" title="GstMetaCopyFunction ()"><span class="type">GstMetaCopyFunction</span></a> <em class="structfield"><code><a name="GstMetaInfo.copy-func"></a>copy_func</code></em>;</span></p></td>
<td>function for copying the metadata</td>
</tr>
<tr>
<td><p><span class="term"><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>;</span></p></td>
<td>function for transforming the metadata</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-META-TRACE-NAME:CAPS"></a><h3>GST_META_TRACE_NAME</h3>
<pre class="programlisting">#define GST_META_TRACE_NAME "GstMeta"
</pre>
<p>
The name used for tracing memory allocations.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaInitFunction"></a><h3>GstMetaInitFunction ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*GstMetaInitFunction) (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> params</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>meta</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>parameters passed to the init function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaFreeFunction"></a><h3>GstMetaFreeFunction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*GstMetaFreeFunction) (<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="gstreamer-GstBuffer.html#GstBuffer" title="struct 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>meta</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaCopyFunction"></a><h3>GstMetaCopyFunction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*GstMetaCopyFunction) (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *dest</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="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstMetaTransformFunction"></a><h3>GstMetaTransformFunction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*GstMetaTransformFunction) (<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct 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="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#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 type specific transform data
is passed to the function.
</p>
<p>
Implementations should check the type of the transform <em class="parameter"><code>data</code></em> and parse
additional type specific field that should be used to perform the transform.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>transbuf</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>meta</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstMeta.html#GstMeta" title="struct GstMeta"><span class="type">GstMeta</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>transform specific data.</td>
</tr>
</tbody>
</table></div>
</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>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *api</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> *impl</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-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#GstMetaCopyFunction" title="GstMetaCopyFunction ()"><span class="type">GstMetaCopyFunction</span></a> copy_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>
</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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *impl</code></em>);</pre>
<p>
Lookup a previously registered meta info structure by its implementor name
<em class="parameter"><code>impl</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>impl</code></em> :</span></p></td>
<td>the name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> when no such metainfo
exists.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>