This file is indexed.

/usr/share/gtk-doc/html/clutter-gst/clutter-gst-Utilities.html is in libclutter-gst-doc 1.6.0-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Clutter Gst 1.6.0 Reference Manual">
<link rel="up" href="ch02.html" title="Clutter Actors And Objects">
<link rel="prev" href="ClutterGstVideoSink.html" title="ClutterGstVideoSink">
<link rel="next" href="clutter-gst-Versioning-Macros.html" title="Versioning Macros">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ClutterGstVideoSink.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Clutter Gst 1.6.0
 Reference Manual</th>
<td><a accesskey="n" href="clutter-gst-Versioning-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#clutter-gst-Utilities.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#clutter-gst-Utilities.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="clutter-gst-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="clutter-gst-Utilities.top_of_page"></a>Utilities</span></h2>
<p>Utilities — Utility functions for Clutter-Gst.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="clutter-gst-Utilities.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><span class="returnvalue">ClutterInitError</span>    <a class="link" href="clutter-gst-Utilities.html#clutter-gst-init" title="clutter_gst_init ()">clutter_gst_init</a>                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);
<span class="returnvalue">ClutterInitError</span>    <a class="link" href="clutter-gst-Utilities.html#clutter-gst-init-with-args" title="clutter_gst_init_with_args ()">clutter_gst_init_with_args</a>          (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
                                                         <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="clutter-gst-Utilities.description"></a><h2>Description</h2>
<p>
The <span class="application">Clutter-Gst</span> library should be initialized
with <a class="link" href="clutter-gst-Utilities.html#clutter-gst-init" title="clutter_gst_init ()"><code class="function">clutter_gst_init()</code></a> before it can be used. You should pass pointers to
the main argc and argv variables so that GStreamer, Clutter and Clutter-Gst
gst can process their own command line options, as shown in the following
example:
</p>
<p>
</p>
<div class="example">
<a name="id2721303"></a><p class="title"><b>Example 1. Initializing the Clutter-Gst library</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="type">int</span>
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
<span class="cbracket">{</span>
<span class="normal">  </span><span class="comment">// initialize the Clutter-Gst library</span>
<span class="normal">  </span><span class="function"><a href="clutter-gst-Utilities.html#clutter-gst-init">clutter_gst_init</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">argv</span><span class="symbol">);</span>
<span class="normal">  </span><span class="symbol">...</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
<p>
It's allowed to pass two NULL pointers to <a class="link" href="clutter-gst-Utilities.html#clutter-gst-init" title="clutter_gst_init ()"><code class="function">clutter_gst_init()</code></a> in case you
don't want to pass the command line arguments to GStreamer, Clutter and
Clutter-Gst.
</p>
<p>
You can also use a <span class="type">GOptionEntry</span> array to initialize your own parameters
as shown in the next code fragment:
</p>
<p>
</p>
<div class="example">
<a name="id2699838"></a><p class="title"><b>Example 2. Initializing the Clutter-Gst library with additional options</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="usertype">GOptionEntry</span><span class="normal"> options</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span>
<span class="cbracket">{</span>
<span class="normal">  </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"framerate"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">'f'</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> G_OPTION_ARG_INT</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">opt_framerate</span><span class="symbol">,</span>
<span class="normal">    </span><span class="string">"Number of frames per second"</span><span class="symbol">,</span><span class="normal"> NULL </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">  </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"fourcc"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">'o'</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> G_OPTION_ARG_STRING</span><span class="symbol">,</span>
<span class="normal">     </span><span class="symbol">&amp;</span><span class="normal">opt_fourcc</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Fourcc of the wanted YUV format"</span><span class="symbol">,</span><span class="normal"> NULL </span><span class="cbracket">}</span><span class="symbol">,</span>
<span class="normal">  </span><span class="cbracket">{</span><span class="normal"> NULL </span><span class="cbracket">}</span>
<span class="cbracket">}</span><span class="symbol">;</span>

<span class="type">int</span>
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
<span class="cbracket">{</span>
<span class="normal">   </span><span class="usertype">GError</span><span class="normal">           </span><span class="symbol">*</span><span class="normal">error </span><span class="symbol">=</span><span class="normal"> NULL</span><span class="symbol">;</span>
<span class="normal">   </span><span class="usertype">gboolean</span><span class="normal">          result</span><span class="symbol">;</span>

<span class="normal">   </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="function">g_thread_supported</span><span class="normal"> </span><span class="symbol">())</span>
<span class="normal">     </span><span class="function">g_thread_init</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">);</span>

<span class="normal">   result </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="clutter-gst-Utilities.html#clutter-gst-init-with-args">clutter_gst_init_with_args</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">argv</span><span class="symbol">,</span>
<span class="normal">                                        </span><span class="string">" - Test YUV frames uploading"</span><span class="symbol">,</span>
<span class="normal">                                        options</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="normal">   </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">)</span>
<span class="normal">     </span><span class="cbracket">{</span>
<span class="normal">       </span><span class="function">g_print</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">       </span><span class="function">g_error_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">       </span><span class="keyword">return</span><span class="normal"> EXIT_FAILURE</span><span class="symbol">;</span>
<span class="normal">     </span><span class="cbracket">}</span>
<span class="normal">  </span><span class="symbol">...</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1">
<a name="clutter-gst-Utilities.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="clutter-gst-init"></a><h3>clutter_gst_init ()</h3>
<pre class="programlisting"><span class="returnvalue">ClutterInitError</span>    clutter_gst_init                    (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>);</pre>
<p>
Utility function to initialize both Clutter and GStreamer.
</p>
<p>
This function should be called before calling any other GLib functions. If
this is not an option, your program must initialise the GLib thread system
using <code class="function">g_thread_init()</code> before any other GLib functions are called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>The number of arguments in <em class="parameter"><code>argv</code></em>. <span class="annotation">[<a href="http://foldoc.org/inout"><span class="acronym">inout</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>A pointer to an array. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=argc][<a href="http://foldoc.org/inout"><span class="acronym">inout</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <span class="type">ClutterInitError</span>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="clutter-gst-init-with-args"></a><h3>clutter_gst_init_with_args ()</h3>
<pre class="programlisting"><span class="returnvalue">ClutterInitError</span>    clutter_gst_init_with_args          (<em class="parameter"><code><span class="type">int</span> *argc</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> ***argv</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *parameter_string</code></em>,
                                                         <em class="parameter"><code><span class="type">GOptionEntry</span> *entries</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *translation_domain</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
This function does the same work as <a class="link" href="clutter-gst-Utilities.html#clutter-gst-init" title="clutter_gst_init ()"><code class="function">clutter_gst_init()</code></a>. Additionally, it
allows you to add your own command line options, and it automatically
generates nicely formatted --help output. Clutter's and GStreamer's
<span class="type">GOptionGroup</span>s are added to the set of available options.
</p>
<p>
Your program must initialise the GLib thread system using <code class="function">g_thread_init()</code>
before any other GLib functions are called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>The number of arguments in <em class="parameter"><code>argv</code></em>. <span class="annotation">[<a href="http://foldoc.org/inout"><span class="acronym">inout</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>A pointer to an array. <span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=argc][<a href="http://foldoc.org/inout"><span class="acronym">inout</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameter_string</code></em> :</span></p></td>
<td>a string which is displayed in
the first line of <code class="option">--help</code> output, after
<code class="literal"><em class="replaceable"><code>programname</code></em> [OPTION...]</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>a <code class="literal">NULL</code>-terminated array of <span class="type">GOptionEntry</span>s
describing the options of your program</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>translation_domain</code></em> :</span></p></td>
<td>a translation domain to use for translating
the <code class="option">--help</code> output for the options in <em class="parameter"><code>entries</code></em>
with <code class="function">gettext()</code>, or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a return location for errors</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">CLUTTER_INIT_SUCCESS</code> on success, a negative integer
on failure.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>