blob: 842c016494c157effa4466288c372188bbb801f2 [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>GstPreset: 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="gstreamer-GstPoll.html" title="GstPoll">
<link rel="next" href="gstreamer-GstProtectionMeta.html" title="GstProtectionMeta">
<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="#GstPreset.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstPreset.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-GstPoll.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gstreamer-GstProtectionMeta.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstPreset"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstPreset.top_of_page"></a>GstPreset</span></h2>
<p>GstPreset — helper interface for element presets</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstPreset.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="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<a class="link" href="GstPreset.html#gst-preset-get-preset-names" title="gst_preset_get_preset_names ()">gst_preset_get_preset_names</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<a class="link" href="GstPreset.html#gst-preset-get-property-names" title="gst_preset_get_property_names ()">gst_preset_get_property_names</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="GstPreset.html#gst-preset-load-preset" title="gst_preset_load_preset ()">gst_preset_load_preset</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="GstPreset.html#gst-preset-save-preset" title="gst_preset_save_preset ()">gst_preset_save_preset</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="GstPreset.html#gst-preset-rename-preset" title="gst_preset_rename_preset ()">gst_preset_rename_preset</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="GstPreset.html#gst-preset-delete-preset" title="gst_preset_delete_preset ()">gst_preset_delete_preset</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="GstPreset.html#gst-preset-set-meta" title="gst_preset_set_meta ()">gst_preset_set_meta</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="GstPreset.html#gst-preset-get-meta" title="gst_preset_get_meta ()">gst_preset_get_meta</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="GstPreset.html#gst-preset-set-app-dir" title="gst_preset_set_app_dir ()">gst_preset_set_app_dir</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> *
</td>
<td class="function_name">
<a class="link" href="GstPreset.html#gst-preset-get-app-dir" title="gst_preset_get_app_dir ()">gst_preset_get_app_dir</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="GstPreset.html#gst-preset-is-editable" title="gst_preset_is_editable ()">gst_preset_is_editable</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPreset.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"> </td>
<td class="function_name"><a class="link" href="GstPreset.html#GstPreset-struct" title="GstPreset">GstPreset</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstPreset.html#GstPresetInterface" title="struct GstPresetInterface">GstPresetInterface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPreset.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/GTypeModule.html">GInterface</a>
<span class="lineart">╰──</span> GstPreset
</pre>
</div>
<div class="refsect1">
<a name="GstPreset.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstPreset.description"></a><h2>Description</h2>
<p>This interface offers methods to query and manipulate parameter preset sets.
A preset is a bunch of property settings, together with meta data and a name.
The name of a preset serves as key for subsequent method calls to manipulate
single presets.
All instances of one type will share the list of presets. The list is created
on demand, if presets are not used, the list is not created.</p>
<p>The interface comes with a default implementation that serves most plugins.
Wrapper plugins will override most methods to implement support for the
native preset format of those wrapped plugins.
One method that is useful to be overridden is <a class="link" href="GstPreset.html#gst-preset-get-property-names" title="gst_preset_get_property_names ()"><code class="function">gst_preset_get_property_names()</code></a>.
With that one can control which properties are saved and in which order.
When implementing support for read-only presets, one should set the vmethods
for <a class="link" href="GstPreset.html#gst-preset-save-preset" title="gst_preset_save_preset ()"><code class="function">gst_preset_save_preset()</code></a> and <a class="link" href="GstPreset.html#gst-preset-delete-preset" title="gst_preset_delete_preset ()"><code class="function">gst_preset_delete_preset()</code></a> to <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
Applications can use <a class="link" href="GstPreset.html#gst-preset-is-editable" title="gst_preset_is_editable ()"><code class="function">gst_preset_is_editable()</code></a> to check for that.</p>
<p>The default implementation supports presets located in a system directory,
application specific directory and in the users home directory. When getting
a list of presets individual presets are read and overlaid in 1) system,
2) application and 3) user order. Whenever an earlier entry is newer, the
later entries will be updated. Since 1.8 you can also provide extra paths
where to find presets through the GST_PRESET_PATH environment variable.
Presets found in those paths will be concidered as "app presets".</p>
</div>
<div class="refsect1">
<a name="GstPreset.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-preset-get-preset-names"></a><h3>gst_preset_get_preset_names ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
gst_preset_get_preset_names (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</code></em>);</pre>
<p>Get a copy of preset names as a <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated string array.</p>
<div class="refsect3">
<a name="gst-preset-get-preset-names.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-get-preset-names.returns"></a><h4>Returns</h4>
<p> list with names, use <a href="/usr/share/gtk-doc/html/glibglib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</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> gchar*]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-get-property-names"></a><h3>gst_preset_get_property_names ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
gst_preset_get_property_names (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</code></em>);</pre>
<p>Get a the names of the GObject properties that can be used for presets.</p>
<div class="refsect3">
<a name="gst-preset-get-property-names.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-get-property-names.returns"></a><h4>Returns</h4>
<p> an
array of property names which should be freed with <a href="/usr/share/gtk-doc/html/glibglib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> after use. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</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> gchar*]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-load-preset"></a><h3>gst_preset_load_preset ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_load_preset (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *name</code></em>);</pre>
<p>Load the given preset.</p>
<div class="refsect3">
<a name="gst-preset-load-preset.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>preset name to load</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-load-preset.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if e.g. there is no preset with that <em class="parameter"><code>name</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-save-preset"></a><h3>gst_preset_save_preset ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_save_preset (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *name</code></em>);</pre>
<p>Save the current object settings as a preset under the given name. If there
is already a preset by this <em class="parameter"><code>name</code></em>
it will be overwritten.</p>
<div class="refsect3">
<a name="gst-preset-save-preset.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>preset name to save</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-save-preset.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-rename-preset"></a><h3>gst_preset_rename_preset ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_rename_preset (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *old_name</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> *new_name</code></em>);</pre>
<p>Renames a preset. If there is already a preset by the <em class="parameter"><code>new_name</code></em>
it will be
overwritten.</p>
<div class="refsect3">
<a name="gst-preset-rename-preset.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>old_name</p></td>
<td class="parameter_description"><p>current preset name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_name</p></td>
<td class="parameter_description"><p>new preset name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-rename-preset.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if e.g. there is no preset with <em class="parameter"><code>old_name</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-delete-preset"></a><h3>gst_preset_delete_preset ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_delete_preset (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *name</code></em>);</pre>
<p>Delete the given preset.</p>
<div class="refsect3">
<a name="gst-preset-delete-preset.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>preset name to remove</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-delete-preset.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if e.g. there is no preset with that <em class="parameter"><code>name</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-set-meta"></a><h3>gst_preset_set_meta ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_set_meta (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *name</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> *tag</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> *value</code></em>);</pre>
<p>Sets a new <em class="parameter"><code>value</code></em>
for an existing meta data item or adds a new item. Meta
data <em class="parameter"><code>tag</code></em>
names can be something like e.g. "comment". Supplying <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the
<em class="parameter"><code>value</code></em>
will unset an existing value.</p>
<div class="refsect3">
<a name="gst-preset-set-meta.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>preset name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tag</p></td>
<td class="parameter_description"><p>meta data item name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> new value. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-set-meta.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if e.g. there is no preset with that <em class="parameter"><code>name</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-get-meta"></a><h3>gst_preset_get_meta ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_get_meta (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</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> *name</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> *tag</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **value</code></em>);</pre>
<p>Gets the <em class="parameter"><code>value</code></em>
for an existing meta data <em class="parameter"><code>tag</code></em>
. Meta data <em class="parameter"><code>tag</code></em>
names can be
something like e.g. "comment". Returned values need to be released when done.</p>
<div class="refsect3">
<a name="gst-preset-get-meta.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>preset name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tag</p></td>
<td class="parameter_description"><p>meta data item name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> value. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out callee-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-get-meta.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if e.g. there is no preset with that <em class="parameter"><code>name</code></em>
or no value for the given <em class="parameter"><code>tag</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-set-app-dir"></a><h3>gst_preset_set_app_dir ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_set_app_dir (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *app_dir</code></em>);</pre>
<p>Sets an extra directory as an absolute path that should be considered when
looking for presets. Any presets in the application dir will shadow the
system presets.</p>
<div class="refsect3">
<a name="gst-preset-set-app-dir.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>app_dir</p></td>
<td class="parameter_description"><p>the application specific preset dir</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-set-app-dir.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> for success, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the dir already has been set</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-preset-get-app-dir"></a><h3>gst_preset_get_app_dir ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gst_preset_get_app_dir (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the directory for application specific presets if set by the
application.</p>
<div class="refsect3">
<a name="gst-preset-get-app-dir.returns"></a><h4>Returns</h4>
<p> the directory or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, don't free or modify
the string. </p>
<p><span class="annotation">[<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>
<hr>
<div class="refsect2">
<a name="gst-preset-is-editable"></a><h3>gst_preset_is_editable ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_preset_is_editable (<em class="parameter"><code><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> *preset</code></em>);</pre>
<p>Check if one can add new presets, change existing ones and remove presets.</p>
<div class="refsect3">
<a name="gst-preset-is-editable.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>preset</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a> that implements <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-preset-is-editable.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 presets are editable or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are static</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstPreset.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstPreset-struct"></a><h3>GstPreset</h3>
<pre class="programlisting">typedef struct _GstPreset GstPreset;</pre>
<p>Opaque <a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> data structure.</p>
</div>
<hr>
<div class="refsect2">
<a name="GstPresetInterface"></a><h3>struct GstPresetInterface</h3>
<pre class="programlisting">struct GstPresetInterface {
GTypeInterface parent;
/* methods */
gchar** (*get_preset_names) (GstPreset *preset);
gchar** (*get_property_names) (GstPreset *preset);
gboolean (*load_preset) (GstPreset *preset, const gchar *name);
gboolean (*save_preset) (GstPreset *preset, const gchar *name);
gboolean (*rename_preset) (GstPreset *preset, const gchar *old_name,
const gchar *new_name);
gboolean (*delete_preset) (GstPreset *preset, const gchar *name);
gboolean (*set_meta) (GstPreset *preset, const gchar *name,
const gchar *tag, const gchar *value);
gboolean (*get_meta) (GstPreset *preset, const gchar *name,
const gchar *tag, gchar **value);
};
</pre>
<p><a class="link" href="GstPreset.html" title="GstPreset"><span class="type">GstPreset</span></a> interface.</p>
<div class="refsect3">
<a name="GstPresetInterface.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#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GstPresetInterface.parent"></a>parent</code></em>;</p></td>
<td class="struct_member_description"><p>parent interface type.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.get-preset-names"></a>get_preset_names</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual method to get list of presets</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.get-property-names"></a>get_property_names</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to get properties that are persistent</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.load-preset"></a>load_preset</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to load a preset into properties</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.save-preset"></a>save_preset</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to save properties into a preset</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.rename-preset"></a>rename_preset</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to rename a preset</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.delete-preset"></a>delete_preset</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to remove a preset</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.set-meta"></a>set_meta</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to set textual meta data to a preset</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPresetInterface.get-meta"></a>get_meta</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual methods to get textual meta data from a preset</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>