• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Install-plugins: GStreamer Base Plugins 1.0 Library Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
8<link rel="up" href="gstreamer-base-utils.html" title="Base Utils Library">
9<link rel="prev" href="gst-plugins-base-libs-Missing-plugins.html" title="Missing plugins">
10<link rel="next" href="GstDiscoverer.html" title="GstDiscoverer">
11<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-base-libs-Install-plugins.description" class="shortcut">Description</a></span>
19</td>
20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21<td><a accesskey="u" href="gstreamer-base-utils.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22<td><a accesskey="p" href="gst-plugins-base-libs-Missing-plugins.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23<td><a accesskey="n" href="GstDiscoverer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24</tr></table>
25<div class="refentry">
26<a name="gst-plugins-base-libs-Install-plugins"></a><div class="titlepage"></div>
27<div class="refnamediv"><table width="100%"><tr>
28<td valign="top">
29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-Install-plugins.top_of_page"></a>Install-plugins</span></h2>
30<p>Install-plugins — Missing plugin installation support for applications</p>
31</td>
32<td class="gallery_image" valign="top" align="right"></td>
33</tr></table></div>
34<div class="refsect1">
35<a name="gst-plugins-base-libs-Install-plugins.functions"></a><h2>Functions</h2>
36<div class="informaltable"><table class="informaltable" width="100%" border="0">
37<colgroup>
38<col width="150px" class="functions_return">
39<col class="functions_name">
40</colgroup>
41<tbody>
42<tr>
43<td class="function_type">
44<span class="returnvalue">void</span>
45</td>
46<td class="function_name">
47<span class="c_punctuation">(</span><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsResultFunc" title="GstInstallPluginsResultFunc ()">*GstInstallPluginsResultFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
48</td>
49</tr>
50<tr>
51<td class="function_type">
52<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="returnvalue">GstInstallPluginsReturn</span></a>
53</td>
54<td class="function_name">
55<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()">gst_install_plugins_async</a> <span class="c_punctuation">()</span>
56</td>
57</tr>
58<tr>
59<td class="function_type">
60<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="returnvalue">GstInstallPluginsReturn</span></a>
61</td>
62<td class="function_name">
63<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-sync" title="gst_install_plugins_sync ()">gst_install_plugins_sync</a> <span class="c_punctuation">()</span>
64</td>
65</tr>
66<tr>
67<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
68</td>
69<td class="function_name">
70<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-return-get-name" title="gst_install_plugins_return_get_name ()">gst_install_plugins_return_get_name</a> <span class="c_punctuation">()</span>
71</td>
72</tr>
73<tr>
74<td class="function_type">
75<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
76</td>
77<td class="function_name">
78<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-installation-in-progress" title="gst_install_plugins_installation_in_progress ()">gst_install_plugins_installation_in_progress</a> <span class="c_punctuation">()</span>
79</td>
80</tr>
81<tr>
82<td class="function_type">
83<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
84</td>
85<td class="function_name">
86<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-supported" title="gst_install_plugins_supported ()">gst_install_plugins_supported</a> <span class="c_punctuation">()</span>
87</td>
88</tr>
89<tr>
90<td class="function_type">
91<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="returnvalue">GstInstallPluginsContext</span></a> *
92</td>
93<td class="function_name">
94<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-new" title="gst_install_plugins_context_new ()">gst_install_plugins_context_new</a> <span class="c_punctuation">()</span>
95</td>
96</tr>
97<tr>
98<td class="function_type">
99<span class="returnvalue">void</span>
100</td>
101<td class="function_name">
102<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-free" title="gst_install_plugins_context_free ()">gst_install_plugins_context_free</a> <span class="c_punctuation">()</span>
103</td>
104</tr>
105<tr>
106<td class="function_type">
107<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="returnvalue">GstInstallPluginsContext</span></a> *
108</td>
109<td class="function_name">
110<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-copy" title="gst_install_plugins_context_copy ()">gst_install_plugins_context_copy</a> <span class="c_punctuation">()</span>
111</td>
112</tr>
113<tr>
114<td class="function_type">
115<span class="returnvalue">void</span>
116</td>
117<td class="function_name">
118<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-set-xid" title="gst_install_plugins_context_set_xid ()">gst_install_plugins_context_set_xid</a> <span class="c_punctuation">()</span>
119</td>
120</tr>
121<tr>
122<td class="function_type">
123<span class="returnvalue">void</span>
124</td>
125<td class="function_name">
126<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-set-confirm-search" title="gst_install_plugins_context_set_confirm_search ()">gst_install_plugins_context_set_confirm_search</a> <span class="c_punctuation">()</span>
127</td>
128</tr>
129<tr>
130<td class="function_type">
131<span class="returnvalue">void</span>
132</td>
133<td class="function_name">
134<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-set-desktop-id" title="gst_install_plugins_context_set_desktop_id ()">gst_install_plugins_context_set_desktop_id</a> <span class="c_punctuation">()</span>
135</td>
136</tr>
137<tr>
138<td class="function_type">
139<span class="returnvalue">void</span>
140</td>
141<td class="function_name">
142<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-set-startup-notification-id" title="gst_install_plugins_context_set_startup_notification_id ()">gst_install_plugins_context_set_startup_notification_id</a> <span class="c_punctuation">()</span>
143</td>
144</tr>
145</tbody>
146</table></div>
147</div>
148<div class="refsect1">
149<a name="gst-plugins-base-libs-Install-plugins.other"></a><h2>Types and Values</h2>
150<div class="informaltable"><table class="informaltable" width="100%" border="0">
151<colgroup>
152<col width="150px" class="name">
153<col class="description">
154</colgroup>
155<tbody>
156<tr>
157<td class="datatype_keyword">enum</td>
158<td class="function_name"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn">GstInstallPluginsReturn</a></td>
159</tr>
160<tr>
161<td class="datatype_keyword"> </td>
162<td class="function_name"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext">GstInstallPluginsContext</a></td>
163</tr>
164</tbody>
165</table></div>
166</div>
167<div class="refsect1">
168<a name="gst-plugins-base-libs-Install-plugins.includes"></a><h2>Includes</h2>
169<pre class="synopsis">#include &lt;gst/pbutils/pbutils.h&gt;
170</pre>
171</div>
172<div class="refsect1">
173<a name="gst-plugins-base-libs-Install-plugins.description"></a><h2>Description</h2>
174<div class="refsect3">
175<a name="id-1.2.14.8.6.2"></a><h4>Overview</h4>
176<p>Using this API, applications can request the installation of missing
177GStreamer plugins. These may be missing decoders/demuxers or
178encoders/muxers for a certain format, sources or sinks for a certain URI
179protocol (e.g. 'http'), or certain elements known by their element
180factory name ('audioresample').</p>
181<p>Whether plugin installation is supported or not depends on the operating
182system and/or distribution in question. The vendor of the operating
183system needs to make sure the necessary hooks and mechanisms are in
184place for plugin installation to work. See below for more detailed
185information.</p>
186<p>From the application perspective, plugin installation is usually
187triggered either</p>
188<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
189<li class="listitem"><p>when the application itself has found that it wants or needs to
190install a certain element</p></li>
191<li class="listitem"><p>when the application has been notified by an element (such as
192playbin or decodebin) that one or more plugins are missing *and* the
193application has decided that it wants to install one or more of
194those missing plugins</p></li>
195</ul></div>
196<p>The install functions in this section all take one or more 'detail
197strings'. These detail strings contain information about the type of
198plugin that needs to be installed (decoder, encoder, source, sink, or
199named element), and some additional information such GStreamer version
200used and a human-readable description of the component to install for
201user dialogs.</p>
202<p>Applications should not concern themselves with the composition of the
203string itself. They should regard the string as if it was a shared
204secret between GStreamer and the plugin installer application.</p>
205<p>Detail strings can be obtained using the function
206<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-plugin-message-get-installer-detail" title="gst_missing_plugin_message_get_installer_detail ()"><code class="function">gst_missing_plugin_message_get_installer_detail()</code></a> on a
207missing-plugin message. Such a message will either have been found by
208the application on a pipeline's <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBus.html#GstBus-struct"><span class="type">GstBus</span></a>, or the application will have
209created it itself using <a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-element-message-new" title="gst_missing_element_message_new ()"><code class="function">gst_missing_element_message_new()</code></a>,
210<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-decoder-message-new" title="gst_missing_decoder_message_new ()"><code class="function">gst_missing_decoder_message_new()</code></a>,
211<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-encoder-message-new" title="gst_missing_encoder_message_new ()"><code class="function">gst_missing_encoder_message_new()</code></a>,
212<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-uri-sink-message-new" title="gst_missing_uri_sink_message_new ()"><code class="function">gst_missing_uri_sink_message_new()</code></a>, or
213<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-uri-source-message-new" title="gst_missing_uri_source_message_new ()"><code class="function">gst_missing_uri_source_message_new()</code></a>.</p>
214<p>For each GStreamer element/plugin/component that should be installed,
215the application needs one of those 'installer detail' string mentioned
216in the previous section. This string can be obtained, as already
217mentioned above, from a missing-plugin message using the function
218<a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-plugin-message-get-installer-detail" title="gst_missing_plugin_message_get_installer_detail ()"><code class="function">gst_missing_plugin_message_get_installer_detail()</code></a>. The
219missing-plugin message is either posted by another element and then
220found on the bus by the application, or the application has created it
221itself as described above.</p>
222<p>The application will then call <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a>, passing a
223NULL-terminated array of installer detail strings, and a function that
224should be called when the installation of the plugins has finished
225(successfully or not). Optionally, a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> created
226with <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-new" title="gst_install_plugins_context_new ()"><code class="function">gst_install_plugins_context_new()</code></a> may be passed as well. This
227way additional optional arguments like the application window's XID can
228be passed to the external installer application.</p>
229<p>gst_install_plugins_async() will return almost immediately, with the
230return code indicating whether plugin installation was started or not.
231If the necessary hooks for plugin installation are in place and an
232external installer application has in fact been called, the passed in
233function will be called with a result code as soon as the external
234installer has finished. If the result code indicates that new plugins
235have been installed, the application will want to call
236<a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-Gst.html#gst-update-registry"><code class="function">gst_update_registry()</code></a> so the run-time plugin registry is updated and
237the new plugins are made available to the application.</p>
238<div class="blockquote"><blockquote class="blockquote">
239<p>A Gtk/GLib main loop must be running in order for the result function
240to be called when the external installer has finished. If this is not
241the case, make sure to regularly call in your code:</p>
242<p>g_main_context_iteration (NULL,FALSE);</p>
243</blockquote></div>
244</div>
245<div class="refsect3">
246<a name="id-1.2.14.8.6.3"></a><h4>1. Installer hook</h4>
247<p>When GStreamer applications initiate plugin installation via
248<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a> or <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-sync" title="gst_install_plugins_sync ()"><code class="function">gst_install_plugins_sync()</code></a>, a
249pre-defined helper application will be called.</p>
250<p>The exact path of the helper application to be called is set at compile
251time, usually by the <code class="literal">./configure</code> script based on the install prefix.
252For a normal package build into the <code class="literal">/usr</code> prefix, this will usually
253default to <code class="literal">/usr/libexec/gst-install-plugins-helper</code> or
254<code class="literal">/usr/lib/gst-install-plugins-helper</code>.</p>
255<p>Vendors/distros who want to support GStreamer plugin installation should
256either provide such a helper script/application or use the <code class="literal">./configure</code>
257option <code class="literal">--with-install-plugins-helper=/path/to/installer</code> to make
258GStreamer call an installer of their own directly.</p>
259<p>It is strongly recommended that vendors provide a small helper
260application as interlocutor to the real installer though, even more so
261if command line argument munging is required to transform the command
262line arguments passed by GStreamer to the helper application into
263arguments that are understood by the real installer.</p>
264<p>The helper application path defined at compile time can be overriden at
265runtime by setting the GST_INSTALL_PLUGINS_HELPER environment
266variable. This can be useful for testing/debugging purposes.</p>
267</div>
268<div class="refsect3">
269<a name="id-1.2.14.8.6.4"></a><h4>2. Arguments passed to the install helper</h4>
270<p>GStreamer will pass the following arguments to the install helper (this
271is in addition to the path of the executable itself, which is by
272convention argv[0]):</p>
273<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
274<li class="listitem"><p>none to many optional arguments in the form of <code class="literal">--foo-bar=val</code>.
275Example: <code class="literal">--transient-for=XID</code> where XID is the X Window ID of the
276main window of the calling application (so the installer can make
277itself transient to that window). Unknown optional arguments should
278be ignored by the installer.</p></li>
279<li class="listitem"><p>one 'installer detail string' argument for each plugin to be
280installed; these strings will have a <code class="literal">gstreamer</code> prefix; the exact
281format of the detail string is explained below</p></li>
282</ul></div>
283</div>
284<div class="refsect3">
285<a name="id-1.2.14.8.6.5"></a><h4>3. Detail string describing the missing plugin</h4>
286<p>The string is in UTF-8 encoding and is made up of several fields,
287separated by '|' characters (but neither the first nor the last
288character is a '|'). The fields are:</p>
289<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
290<li class="listitem"><p>plugin system identifier, ie. "gstreamer"
291This identifier determines the format of the rest of the detail
292string. Automatic plugin installers should not process detail
293strings with unknown identifiers. This allows other plugin-based
294libraries to use the same mechanism for their automatic plugin
295installation needs, or for the format to be changed should it turn
296out to be insufficient.</p></li>
297<li class="listitem"><p>plugin system version, e.g. "1.0"
298This is required so that when there is GStreamer-2.0 at some point
299in future, the different major versions can still co-exist and use
300the same plugin install mechanism in the same way.</p></li>
301<li class="listitem"><p>application identifier, e.g. "totem"
302This may also be in the form of "pid/12345" if the program name
303can't be obtained for some reason.</p></li>
304<li class="listitem"><p>human-readable localised description of the required component, e.g.
305"Vorbis audio decoder"</p></li>
306<li class="listitem">
307<p>identifier string for the required component (see below for details
308about how to map this to the package/plugin that needs installing),
309e.g.</p>
310<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
311<li class="listitem"><p>urisource-$(PROTOCOL_REQUIRED), e.g. urisource-http or
312urisource-mms</p></li>
313<li class="listitem"><p>element-$(ELEMENT_REQUIRED), e.g. element-videoconvert</p></li>
314<li class="listitem">
315<p>decoder-$(CAPS_REQUIRED), e.g. (do read below for more
316details!):</p>
317<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: square; ">
318<li class="listitem"><p>decoder-audio/x-vorbis</p></li>
319<li class="listitem"><p>decoder-application/ogg</p></li>
320<li class="listitem"><p>decoder-audio/mpeg, mpegversion=(int)4</p></li>
321<li class="listitem"><p>decoder-video/mpeg, systemstream=(boolean)true,
322mpegversion=(int)2</p></li>
323</ul></div>
324</li>
325<li class="listitem"><p>encoder-$(CAPS_REQUIRED), e.g. encoder-audio/x-vorbis</p></li>
326</ul></div>
327</li>
328<li class="listitem"><p>optional further fields not yet specified</p></li>
329</ul></div>
330<p>An entire ID string might then look like this, for example: <code class="literal">
331gstreamer|1.0|totem|Vorbis audio decoder|decoder-audio/x-vorbis</code></p>
332<p>Plugin installers parsing this ID string should expect further fields
333also separated by '|' symbols and either ignore them, warn the user, or
334error out when encountering them.</p>
335<p>Those unfamiliar with the GStreamer 'caps' system should note a few
336things about the caps string used in the above decoder/encoder case:</p>
337<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
338<li class="listitem"><p>the first part ("video/mpeg") of the caps string is a GStreamer
339media type and *not* a MIME type. Wherever possible, the GStreamer
340media type will be the same as the corresponding MIME type, but
341often it is not.</p></li>
342<li class="listitem"><p>a caps string may or may not have additional comma-separated fields
343of various types (as seen in the examples above)</p></li>
344<li class="listitem">
345<p>the caps string of a 'required' component (as above) will always
346have fields with fixed values, whereas an introspected string (see
347below) may have fields with non-fixed values. Compare for example:</p>
348<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
349<li class="listitem"><p><code class="literal">audio/mpeg, mpegversion=(int)4</code> vs.
350<code class="literal">audio/mpeg, mpegversion=(int){2, 4}</code></p></li>
351<li class="listitem"><p><code class="literal">video/mpeg, mpegversion=(int)2</code> vs.
352<code class="literal">video/mpeg, systemstream=(boolean){ true, false}, mpegversion=(int)[1, 2]</code></p></li>
353</ul></div>
354</li>
355</ul></div>
356</div>
357<div class="refsect3">
358<a name="id-1.2.14.8.6.6"></a><h4>4. Exit codes the installer should return</h4>
359<p>The installer should return one of the following exit codes when it
360exits:</p>
361<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
362<li class="listitem"><p>0 if all of the requested plugins could be installed
363(<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-SUCCESS:CAPS"><span class="type">GST_INSTALL_PLUGINS_SUCCESS</span></a>)</p></li>
364<li class="listitem"><p>1 if no appropriate installation candidate for any of the requested
365plugins could be found. Only return this if nothing has been
366installed (<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-NOT-FOUND:CAPS"><span class="type">GST_INSTALL_PLUGINS_NOT_FOUND</span></a>)</p></li>
367<li class="listitem"><p>2 if an error occured during the installation. The application will
368assume that the user will already have seen an error message by the
369installer in this case and will usually not show another one
370(<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-ERROR:CAPS"><span class="type">GST_INSTALL_PLUGINS_ERROR</span></a>)</p></li>
371<li class="listitem"><p>3 if some of the requested plugins could be installed, but not all
372(<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-PARTIAL-SUCCESS:CAPS"><span class="type">GST_INSTALL_PLUGINS_PARTIAL_SUCCESS</span></a>)</p></li>
373<li class="listitem"><p>4 if the user aborted the installation
374(<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-USER-ABORT:CAPS"><span class="type">GST_INSTALL_PLUGINS_USER_ABORT</span></a>)</p></li>
375</ul></div>
376</div>
377<div class="refsect3">
378<a name="id-1.2.14.8.6.7"></a><h4>5. How to map the required detail string to packages</h4>
379<p>It is up to the vendor to find mechanism to map required components from
380the detail string to the actual packages/plugins to install. This could
381be a hardcoded list of mappings, for example, or be part of the
382packaging system metadata.</p>
383<p>GStreamer plugin files can be introspected for this information. The
384<code class="literal">gst-inspect</code> utility has a special command line option that will output
385information similar to what is required. For example <code class="literal">
386$ gst-inspect-1.0 --print-plugin-auto-install-info /path/to/libgstvorbis.so
387should output something along the lines of
388</code>decoder-audio/x-vorbis<code class="literal">, </code>element-vorbisdec<code class="literal"> </code>element-vorbisenc<code class="literal">
389</code>element-vorbisparse<code class="literal">, </code>element-vorbistag<code class="literal">, </code>encoder-audio/x-vorbis`</p>
390<p>Note that in the encoder and decoder case the introspected caps can be
391more complex with additional fields, e.g.
392<code class="literal">audio/mpeg,mpegversion=(int){2,4}</code>, so they will not always exactly
393match the caps wanted by the application. It is up to the installer to
394deal with this (either by doing proper caps intersection using the
395GStreamer <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> API, or by only taking into account the media type).</p>
396<p>Another potential source of problems are plugins such as ladspa or
397libvisual where the list of elements depends on the installed
398ladspa/libvisual plugins at the time. This is also up to the
399distribution to handle (but usually not relevant for playback
400applications).</p>
401</div>
402</div>
403<div class="refsect1">
404<a name="gst-plugins-base-libs-Install-plugins.functions_details"></a><h2>Functions</h2>
405<div class="refsect2">
406<a name="GstInstallPluginsResultFunc"></a><h3>GstInstallPluginsResultFunc ()</h3>
407<pre class="programlisting"><span class="returnvalue">void</span>
408<span class="c_punctuation">(</span>*GstInstallPluginsResultFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="type">GstInstallPluginsReturn</span></a> result</code></em>,
409                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
410<p>The prototype of the callback function that will be called once the
411external plugin installer program has returned. You only need to provide
412a callback function if you are using the asynchronous interface.</p>
413<div class="refsect3">
414<a name="GstInstallPluginsResultFunc.parameters"></a><h4>Parameters</h4>
415<div class="informaltable"><table class="informaltable" width="100%" border="0">
416<colgroup>
417<col width="150px" class="parameters_name">
418<col class="parameters_description">
419<col width="200px" class="parameters_annotations">
420</colgroup>
421<tbody>
422<tr>
423<td class="parameter_name"><p>result</p></td>
424<td class="parameter_description"><p>whether the installation of the requested plugins succeeded or not</p></td>
425<td class="parameter_annotations"> </td>
426</tr>
427<tr>
428<td class="parameter_name"><p>user_data</p></td>
429<td class="parameter_description"><p>the user data passed to <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a></p></td>
430<td class="parameter_annotations"> </td>
431</tr>
432</tbody>
433</table></div>
434</div>
435</div>
436<hr>
437<div class="refsect2">
438<a name="gst-install-plugins-async"></a><h3>gst_install_plugins_async ()</h3>
439<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="returnvalue">GstInstallPluginsReturn</span></a>
440gst_install_plugins_async (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *details</code></em>,
441                           <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>,
442                           <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsResultFunc" title="GstInstallPluginsResultFunc ()"><span class="type">GstInstallPluginsResultFunc</span></a> func</code></em>,
443                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
444<p>Requests plugin installation without blocking. Once the plugins have been
445installed or installation has failed, <em class="parameter"><code>func</code></em>
446 will be called with the result
447of the installation and your provided <em class="parameter"><code>user_data</code></em>
448 pointer.</p>
449<p>This function requires a running GLib/Gtk main loop. If you are not
450running a GLib/Gtk main loop, make sure to regularly call
451g_main_context_iteration(NULL,FALSE).</p>
452<p>The installer strings that make up <em class="parameter"><code>detail</code></em>
453 are typically obtained by
454calling <a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-plugin-message-get-installer-detail" title="gst_missing_plugin_message_get_installer_detail ()"><code class="function">gst_missing_plugin_message_get_installer_detail()</code></a> on missing-plugin
455messages that have been caught on a pipeline's bus or created by the
456application via the provided API, such as <a class="link" href="gst-plugins-base-libs-Missing-plugins.html#gst-missing-element-message-new" title="gst_missing_element_message_new ()"><code class="function">gst_missing_element_message_new()</code></a>.</p>
457<p>It is possible to request the installation of multiple missing plugins in
458one go (as might be required if there is a demuxer for a certain format
459installed but no suitable video decoder and no suitable audio decoder).</p>
460<div class="refsect3">
461<a name="gst-install-plugins-async.parameters"></a><h4>Parameters</h4>
462<div class="informaltable"><table class="informaltable" width="100%" border="0">
463<colgroup>
464<col width="150px" class="parameters_name">
465<col class="parameters_description">
466<col width="200px" class="parameters_annotations">
467</colgroup>
468<tbody>
469<tr>
470<td class="parameter_name"><p>details</p></td>
471<td class="parameter_description"><p>NULL-terminated array
472of installer string details (see below). </p></td>
473<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
474</tr>
475<tr>
476<td class="parameter_name"><p>ctx</p></td>
477<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a>, or NULL. </p></td>
478<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>
479</tr>
480<tr>
481<td class="parameter_name"><p>func</p></td>
482<td class="parameter_description"><p>the function to call when the installer program returns. </p></td>
483<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>
484</tr>
485<tr>
486<td class="parameter_name"><p>user_data</p></td>
487<td class="parameter_description"><p>the user data to pass to <em class="parameter"><code>func</code></em>
488when called, or NULL. </p></td>
489<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
490</tr>
491</tbody>
492</table></div>
493</div>
494<div class="refsect3">
495<a name="gst-install-plugins-async.returns"></a><h4>Returns</h4>
496<p> result code whether an external installer could be started</p>
497</div>
498</div>
499<hr>
500<div class="refsect2">
501<a name="gst-install-plugins-sync"></a><h3>gst_install_plugins_sync ()</h3>
502<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="returnvalue">GstInstallPluginsReturn</span></a>
503gst_install_plugins_sync (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *details</code></em>,
504                          <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>);</pre>
505<p>Requests plugin installation and block until the plugins have been
506installed or installation has failed.</p>
507<p>This function should almost never be used, it only exists for cases where
508a non-GLib main loop is running and the user wants to run it in a separate
509thread and marshal the result back asynchronously into the main thread
510using the other non-GLib main loop. You should almost always use
511<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a> instead of this function.</p>
512<div class="refsect3">
513<a name="gst-install-plugins-sync.parameters"></a><h4>Parameters</h4>
514<div class="informaltable"><table class="informaltable" width="100%" border="0">
515<colgroup>
516<col width="150px" class="parameters_name">
517<col class="parameters_description">
518<col width="200px" class="parameters_annotations">
519</colgroup>
520<tbody>
521<tr>
522<td class="parameter_name"><p>details</p></td>
523<td class="parameter_description"><p>NULL-terminated array
524of installer string details. </p></td>
525<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
526</tr>
527<tr>
528<td class="parameter_name"><p>ctx</p></td>
529<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a>, or NULL. </p></td>
530<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>
531</tr>
532</tbody>
533</table></div>
534</div>
535<div class="refsect3">
536<a name="gst-install-plugins-sync.returns"></a><h4>Returns</h4>
537<p> the result of the installation.</p>
538</div>
539</div>
540<hr>
541<div class="refsect2">
542<a name="gst-install-plugins-return-get-name"></a><h3>gst_install_plugins_return_get_name ()</h3>
543<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
544gst_install_plugins_return_get_name (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsReturn" title="enum GstInstallPluginsReturn"><span class="type">GstInstallPluginsReturn</span></a> ret</code></em>);</pre>
545<p>Convenience function to return the descriptive string associated
546with a status code.  This function returns English strings and
547should not be used for user messages. It is here only to assist
548in debugging.</p>
549<div class="refsect3">
550<a name="gst-install-plugins-return-get-name.parameters"></a><h4>Parameters</h4>
551<div class="informaltable"><table class="informaltable" width="100%" border="0">
552<colgroup>
553<col width="150px" class="parameters_name">
554<col class="parameters_description">
555<col width="200px" class="parameters_annotations">
556</colgroup>
557<tbody><tr>
558<td class="parameter_name"><p>ret</p></td>
559<td class="parameter_description"><p>the return status code</p></td>
560<td class="parameter_annotations"> </td>
561</tr></tbody>
562</table></div>
563</div>
564<div class="refsect3">
565<a name="gst-install-plugins-return-get-name.returns"></a><h4>Returns</h4>
566<p> a descriptive string for the status code in <em class="parameter"><code>ret</code></em>
567</p>
568</div>
569</div>
570<hr>
571<div class="refsect2">
572<a name="gst-install-plugins-installation-in-progress"></a><h3>gst_install_plugins_installation_in_progress ()</h3>
573<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
574gst_install_plugins_installation_in_progress
575                               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
576<p>Checks whether plugin installation (initiated by this application only)
577is currently in progress.</p>
578<div class="refsect3">
579<a name="gst-install-plugins-installation-in-progress.returns"></a><h4>Returns</h4>
580<p> TRUE if plugin installation is in progress, otherwise FALSE</p>
581</div>
582</div>
583<hr>
584<div class="refsect2">
585<a name="gst-install-plugins-supported"></a><h3>gst_install_plugins_supported ()</h3>
586<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
587gst_install_plugins_supported (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
588<p>Checks whether plugin installation is likely to be supported by the
589current environment. This currently only checks whether the helper script
590that is to be provided by the distribution or operating system vendor
591exists.</p>
592<div class="refsect3">
593<a name="gst-install-plugins-supported.returns"></a><h4>Returns</h4>
594<p> TRUE if plugin installation is likely to be supported.</p>
595</div>
596</div>
597<hr>
598<div class="refsect2">
599<a name="gst-install-plugins-context-new"></a><h3>gst_install_plugins_context_new ()</h3>
600<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="returnvalue">GstInstallPluginsContext</span></a> *
601gst_install_plugins_context_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
602<p>Creates a new <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a>.</p>
603<div class="refsect3">
604<a name="gst-install-plugins-context-new.returns"></a><h4>Returns</h4>
605<p> a new <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a>. Free with
606<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-context-free" title="gst_install_plugins_context_free ()"><code class="function">gst_install_plugins_context_free()</code></a> when no longer needed</p>
607</div>
608</div>
609<hr>
610<div class="refsect2">
611<a name="gst-install-plugins-context-free"></a><h3>gst_install_plugins_context_free ()</h3>
612<pre class="programlisting"><span class="returnvalue">void</span>
613gst_install_plugins_context_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>);</pre>
614<p>Frees a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a>.</p>
615<div class="refsect3">
616<a name="gst-install-plugins-context-free.parameters"></a><h4>Parameters</h4>
617<div class="informaltable"><table class="informaltable" width="100%" border="0">
618<colgroup>
619<col width="150px" class="parameters_name">
620<col class="parameters_description">
621<col width="200px" class="parameters_annotations">
622</colgroup>
623<tbody><tr>
624<td class="parameter_name"><p>ctx</p></td>
625<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a></p></td>
626<td class="parameter_annotations"> </td>
627</tr></tbody>
628</table></div>
629</div>
630</div>
631<hr>
632<div class="refsect2">
633<a name="gst-install-plugins-context-copy"></a><h3>gst_install_plugins_context_copy ()</h3>
634<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="returnvalue">GstInstallPluginsContext</span></a> *
635gst_install_plugins_context_copy (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>);</pre>
636</div>
637<hr>
638<div class="refsect2">
639<a name="gst-install-plugins-context-set-xid"></a><h3>gst_install_plugins_context_set_xid ()</h3>
640<pre class="programlisting"><span class="returnvalue">void</span>
641gst_install_plugins_context_set_xid (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>,
642                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> xid</code></em>);</pre>
643<p>This function is for X11-based applications (such as most Gtk/Qt
644applications on linux/unix) only. You can use it to tell the external
645installer the XID of your main application window. That way the installer
646can make its own window transient to your application window during the
647installation.</p>
648<p>If set, the XID will be passed to the installer via a --transient-for=XID
649command line option.</p>
650<p>Gtk+/Gnome application should be able to obtain the XID of the top-level
651window like this:</p>
652<div class="informalexample">
653  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
654    <tbody>
655      <tr>
656        <td class="listing_lines" align="right"><pre>1
6572
6583
6594
6605
6616
6627
6638
6649</pre></td>
665        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">##include &lt;gtk/gtk.h&gt;</span>
666<span class="gtkdoc ppc">##ifdef GDK_WINDOWING_X11</span>
667<span class="gtkdoc ppc">##include &lt;gdk/gdkx.h&gt;</span>
668<span class="gtkdoc ppc">##endif</span>
669<span class="gtkdoc opt">...</span>
670<span class="gtkdoc ppc">##ifdef GDK_WINDOWING_X11</span>
671  xid <span class="gtkdoc opt">=</span> <span class="function">GDK_WINDOW_XWINDOW</span> <span class="gtkdoc opt">(</span><span class="function">GTK_WIDGET</span> <span class="gtkdoc opt">(</span>application_window<span class="gtkdoc opt">)-&gt;</span>window<span class="gtkdoc opt">);</span>
672<span class="gtkdoc ppc">##endif</span>
673<span class="gtkdoc opt">...</span></pre></td>
674      </tr>
675    </tbody>
676  </table>
677</div>
678
679<p></p>
680<div class="refsect3">
681<a name="gst-install-plugins-context-set-xid.parameters"></a><h4>Parameters</h4>
682<div class="informaltable"><table class="informaltable" width="100%" border="0">
683<colgroup>
684<col width="150px" class="parameters_name">
685<col class="parameters_description">
686<col width="200px" class="parameters_annotations">
687</colgroup>
688<tbody>
689<tr>
690<td class="parameter_name"><p>ctx</p></td>
691<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a></p></td>
692<td class="parameter_annotations"> </td>
693</tr>
694<tr>
695<td class="parameter_name"><p>xid</p></td>
696<td class="parameter_description"><p>the XWindow ID (XID) of the top-level application</p></td>
697<td class="parameter_annotations"> </td>
698</tr>
699</tbody>
700</table></div>
701</div>
702</div>
703<hr>
704<div class="refsect2">
705<a name="gst-install-plugins-context-set-confirm-search"></a><h3>gst_install_plugins_context_set_confirm_search ()</h3>
706<pre class="programlisting"><span class="returnvalue">void</span>
707gst_install_plugins_context_set_confirm_search
708                               (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>,
709                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> confirm_search</code></em>);</pre>
710<p>This function is used to tell the external installer process whether it
711should ask for confirmation or not before searching for missing plugins.</p>
712<p>If set, this option will be passed to the installer via a
713--interaction=[show-confirm-search|hide-confirm-search] command line option.</p>
714<div class="refsect3">
715<a name="gst-install-plugins-context-set-confirm-search.parameters"></a><h4>Parameters</h4>
716<div class="informaltable"><table class="informaltable" width="100%" border="0">
717<colgroup>
718<col width="150px" class="parameters_name">
719<col class="parameters_description">
720<col width="200px" class="parameters_annotations">
721</colgroup>
722<tbody>
723<tr>
724<td class="parameter_name"><p>ctx</p></td>
725<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a></p></td>
726<td class="parameter_annotations"> </td>
727</tr>
728<tr>
729<td class="parameter_name"><p>confirm_search</p></td>
730<td class="parameter_description"><p>whether to ask for confirmation before searching for plugins</p></td>
731<td class="parameter_annotations"> </td>
732</tr>
733</tbody>
734</table></div>
735</div>
736<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
737</div>
738<hr>
739<div class="refsect2">
740<a name="gst-install-plugins-context-set-desktop-id"></a><h3>gst_install_plugins_context_set_desktop_id ()</h3>
741<pre class="programlisting"><span class="returnvalue">void</span>
742gst_install_plugins_context_set_desktop_id
743                               (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>,
744                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *desktop_id</code></em>);</pre>
745<p>This function is used to pass the calling application's desktop file ID to
746the external installer process.</p>
747<p>A desktop file ID is the basename of the desktop file, including the
748.desktop extension.</p>
749<p>If set, the desktop file ID will be passed to the installer via a
750--desktop-id= command line option.</p>
751<div class="refsect3">
752<a name="gst-install-plugins-context-set-desktop-id.parameters"></a><h4>Parameters</h4>
753<div class="informaltable"><table class="informaltable" width="100%" border="0">
754<colgroup>
755<col width="150px" class="parameters_name">
756<col class="parameters_description">
757<col width="200px" class="parameters_annotations">
758</colgroup>
759<tbody>
760<tr>
761<td class="parameter_name"><p>ctx</p></td>
762<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a></p></td>
763<td class="parameter_annotations"> </td>
764</tr>
765<tr>
766<td class="parameter_name"><p>desktop_id</p></td>
767<td class="parameter_description"><p>the desktop file ID of the calling application</p></td>
768<td class="parameter_annotations"> </td>
769</tr>
770</tbody>
771</table></div>
772</div>
773<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
774</div>
775<hr>
776<div class="refsect2">
777<a name="gst-install-plugins-context-set-startup-notification-id"></a><h3>gst_install_plugins_context_set_startup_notification_id ()</h3>
778<pre class="programlisting"><span class="returnvalue">void</span>
779gst_install_plugins_context_set_startup_notification_id
780                               (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a> *ctx</code></em>,
781                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *startup_id</code></em>);</pre>
782<p>Sets the startup notification ID for the launched process.</p>
783<p>This is typically used to to pass the current X11 event timestamp to the
784external installer process.</p>
785<p>Startup notification IDs are defined in the
786<a class="ulink" href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt" target="_top">FreeDesktop.Org Startup Notifications standard</a>.</p>
787<p>If set, the ID will be passed to the installer via a
788--startup-notification-id= command line option.</p>
789<p>GTK+/GNOME applications should be able to create a startup notification ID
790like this:</p>
791<div class="informalexample">
792  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
793    <tbody>
794      <tr>
795        <td class="listing_lines" align="right"><pre>1
7962
7973</pre></td>
798        <td class="listing_code"><pre class="programlisting">timestamp <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-get-current-event-time">gtk_get_current_event_time</a></span> <span class="gtkdoc opt">();</span>
799startup_id <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;_TIME%u&quot;</span><span class="gtkdoc opt">,</span> timestamp<span class="gtkdoc opt">);</span>
800<span class="gtkdoc opt">...</span></pre></td>
801      </tr>
802    </tbody>
803  </table>
804</div>
805
806<p></p>
807<div class="refsect3">
808<a name="gst-install-plugins-context-set-startup-notification-id.parameters"></a><h4>Parameters</h4>
809<div class="informaltable"><table class="informaltable" width="100%" border="0">
810<colgroup>
811<col width="150px" class="parameters_name">
812<col class="parameters_description">
813<col width="200px" class="parameters_annotations">
814</colgroup>
815<tbody>
816<tr>
817<td class="parameter_name"><p>ctx</p></td>
818<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsContext" title="GstInstallPluginsContext"><span class="type">GstInstallPluginsContext</span></a></p></td>
819<td class="parameter_annotations"> </td>
820</tr>
821<tr>
822<td class="parameter_name"><p>startup_id</p></td>
823<td class="parameter_description"><p>the startup notification ID</p></td>
824<td class="parameter_annotations"> </td>
825</tr>
826</tbody>
827</table></div>
828</div>
829<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
830</div>
831</div>
832<div class="refsect1">
833<a name="gst-plugins-base-libs-Install-plugins.other_details"></a><h2>Types and Values</h2>
834<div class="refsect2">
835<a name="GstInstallPluginsReturn"></a><h3>enum GstInstallPluginsReturn</h3>
836<p>Result codes returned by <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a> and
837<a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-sync" title="gst_install_plugins_sync ()"><code class="function">gst_install_plugins_sync()</code></a>, and also the result code passed to the
838<a class="link" href="gst-plugins-base-libs-Install-plugins.html#GstInstallPluginsResultFunc" title="GstInstallPluginsResultFunc ()"><span class="type">GstInstallPluginsResultFunc</span></a> specified with <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a>.</p>
839<p>These codes indicate success or failure of starting an external installer
840program and to what extent the requested plugins could be installed.</p>
841<div class="refsect3">
842<a name="GstInstallPluginsReturn.members"></a><h4>Members</h4>
843<div class="informaltable"><table class="informaltable" width="100%" border="0">
844<colgroup>
845<col width="300px" class="enum_members_name">
846<col class="enum_members_description">
847<col width="200px" class="enum_members_annotations">
848</colgroup>
849<tbody>
850<tr>
851<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-SUCCESS:CAPS"></a>GST_INSTALL_PLUGINS_SUCCESS</p></td>
852<td class="enum_member_description">
853<p>all of the requested plugins could be
854    installed</p>
855</td>
856<td class="enum_member_annotations"> </td>
857</tr>
858<tr>
859<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-NOT-FOUND:CAPS"></a>GST_INSTALL_PLUGINS_NOT_FOUND</p></td>
860<td class="enum_member_description">
861<p>no appropriate installation candidate for
862    any of the requested plugins could be found. Only return this if nothing
863    has been installed. Return <a class="link" href="gst-plugins-base-libs-Install-plugins.html#GST-INSTALL-PLUGINS-PARTIAL-SUCCESS:CAPS"><span class="type">GST_INSTALL_PLUGINS_PARTIAL_SUCCESS</span></a> if
864    some (but not all) of the requested plugins could be installed.</p>
865</td>
866<td class="enum_member_annotations"> </td>
867</tr>
868<tr>
869<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-ERROR:CAPS"></a>GST_INSTALL_PLUGINS_ERROR</p></td>
870<td class="enum_member_description">
871<p>an error occured during the installation. If
872    this happens, the  user has already seen an error message and another
873    one should not be displayed</p>
874</td>
875<td class="enum_member_annotations"> </td>
876</tr>
877<tr>
878<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-PARTIAL-SUCCESS:CAPS"></a>GST_INSTALL_PLUGINS_PARTIAL_SUCCESS</p></td>
879<td class="enum_member_description">
880<p>some of the requested plugins could
881    be installed, but not all</p>
882</td>
883<td class="enum_member_annotations"> </td>
884</tr>
885<tr>
886<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-USER-ABORT:CAPS"></a>GST_INSTALL_PLUGINS_USER_ABORT</p></td>
887<td class="enum_member_description">
888<p>the user has aborted the installation</p>
889</td>
890<td class="enum_member_annotations"> </td>
891</tr>
892<tr>
893<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-CRASHED:CAPS"></a>GST_INSTALL_PLUGINS_CRASHED</p></td>
894<td class="enum_member_description">
895<p>the installer had an unclean exit code
896    (ie. death by signal)</p>
897</td>
898<td class="enum_member_annotations"> </td>
899</tr>
900<tr>
901<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-INVALID:CAPS"></a>GST_INSTALL_PLUGINS_INVALID</p></td>
902<td class="enum_member_description">
903<p>the helper returned an invalid status code</p>
904</td>
905<td class="enum_member_annotations"> </td>
906</tr>
907<tr>
908<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-STARTED-OK:CAPS"></a>GST_INSTALL_PLUGINS_STARTED_OK</p></td>
909<td class="enum_member_description">
910<p>returned by <a class="link" href="gst-plugins-base-libs-Install-plugins.html#gst-install-plugins-async" title="gst_install_plugins_async ()"><code class="function">gst_install_plugins_async()</code></a> to
911    indicate that everything went fine so far and the provided callback
912    will be called with the result of the installation later</p>
913</td>
914<td class="enum_member_annotations"> </td>
915</tr>
916<tr>
917<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-INTERNAL-FAILURE:CAPS"></a>GST_INSTALL_PLUGINS_INTERNAL_FAILURE</p></td>
918<td class="enum_member_description">
919<p>some internal failure has
920    occured when trying to start the installer</p>
921</td>
922<td class="enum_member_annotations"> </td>
923</tr>
924<tr>
925<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-HELPER-MISSING:CAPS"></a>GST_INSTALL_PLUGINS_HELPER_MISSING</p></td>
926<td class="enum_member_description">
927<p>the helper script to call the
928    actual installer is not installed</p>
929</td>
930<td class="enum_member_annotations"> </td>
931</tr>
932<tr>
933<td class="enum_member_name"><p><a name="GST-INSTALL-PLUGINS-INSTALL-IN-PROGRESS:CAPS"></a>GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS</p></td>
934<td class="enum_member_description">
935<p>a previously-started plugin
936    installation is still in progress, try again later</p>
937</td>
938<td class="enum_member_annotations"> </td>
939</tr>
940</tbody>
941</table></div>
942</div>
943</div>
944<hr>
945<div class="refsect2">
946<a name="GstInstallPluginsContext"></a><h3>GstInstallPluginsContext</h3>
947<pre class="programlisting">typedef struct _GstInstallPluginsContext GstInstallPluginsContext;</pre>
948<p>Opaque context structure for the plugin installation. Use the provided
949API to set details on it.</p>
950</div>
951</div>
952</div>
953<div class="footer">
954<hr>Generated by GTK-Doc V1.28</div>
955</body>
956</html>