This file is indexed.

/usr/share/gtk-doc/html/libmediaart/libmediaart-Extraction.html is in libmediaart-doc 0.4.0-1ubuntu1.

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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libmediaart Library Reference Manual: Extraction</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libmediaart Library Reference Manual">
<link rel="up" href="ch02.html" title="Reference">
<link rel="prev" href="ch02.html" title="Reference">
<link rel="next" href="libmediaart-Caching-and-Management.html" title="Caching and Management">
<meta name="generator" content="GTK-Doc V1.20 (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="10"><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="#libmediaart-Extraction.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#libmediaart-Extraction.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="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libmediaart-Caching-and-Management.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libmediaart-Extraction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libmediaart-Extraction.top_of_page"></a>Extraction</span></h2>
<p>Extraction — Extraction of music and movie art.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libmediaart-Extraction.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libmediaart-Extraction.html#media-art-init" title="media_art_init ()">media_art_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libmediaart-Extraction.html#media-art-shutdown" title="media_art_shutdown ()">media_art_shutdown</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libmediaart-Extraction.html#media-art-process-file" title="media_art_process_file ()">media_art_process_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libmediaart-Extraction.html#media-art-process" title="media_art_process ()">media_art_process</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libmediaart-Extraction.html#MediaArtType" title="enum MediaArtType">MediaArtType</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">
</pre>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libmediaart/mediaart.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.description"></a><h2>Description</h2>
<p>The libmediaart library supports taking image data that you have extracted
from a media file and saving it into the media art cache, so that future
applications can display the media art without having to extract the image
again. This is done using the <a class="link" href="libmediaart-Extraction.html#media-art-process-file" title="media_art_process_file ()"><code class="function">media_art_process_file()</code></a> or
<a class="link" href="libmediaart-Extraction.html#media-art-process" title="media_art_process ()"><code class="function">media_art_process()</code></a> functions.</p>
<p>Extracting new media art from a file needs to be done by your application.
Usually, when an application loads a media file any embedded images will be
made available as a side effect. For example, if you are using GStreamer any
images will be returned through the <span class="type">GstTagList</span> interface as <code class="literal">GST_TAG_IMAGE</code>
tags.</p>
<p>The media art cache requires that all images are saved as 'application/jpeg'
files. Embedded images can be in several formats, and
<a class="link" href="libmediaart-Extraction.html#media-art-process-file" title="media_art_process_file ()"><code class="function">media_art_process_file()</code></a> and <a class="link" href="libmediaart-Extraction.html#media-art-process" title="media_art_process ()"><code class="function">media_art_process()</code></a> functions will
convert the supplied image data into the correct format if
necessary. There are multiple backends that can be used for this,
and you can choose which is used at build time using the library's
'configure' script.</p>
<p>If there is no embedded media art in a file,
<a class="link" href="libmediaart-Extraction.html#media-art-process-file" title="media_art_process_file ()"><code class="function">media_art_process_file()</code></a> and <a class="link" href="libmediaart-Extraction.html#media-art-process" title="media_art_process ()"><code class="function">media_art_process()</code></a> functions will
look in the directory that contains the media file for likely media
art using a simple heuristic.</p>
<p>You must call <a class="link" href="libmediaart-Extraction.html#media-art-init" title="media_art_init ()"><code class="function">media_art_init()</code></a> before using the functions in libmediaart,
and call <a class="link" href="libmediaart-Extraction.html#media-art-shutdown" title="media_art_shutdown ()"><code class="function">media_art_shutdown()</code></a> to free the resources it uses.</p>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="media-art-init"></a><h3>media_art_init ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
media_art_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Initialize libmediaart.</p>
<p>This function initializes cache hash tables, backend plugins,
storage modules used for removable devices and connections to D-Bus.</p>
<div class="refsect3">
<a name="id-1.3.3.2.8.2.6"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if initialisation was successful, <code class="literal">FALSE</code> otherwise.</p>
<p></p>
</div>
<p class="since">Since 0.2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="media-art-shutdown"></a><h3>media_art_shutdown ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
media_art_shutdown (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Clean up and free the resources created and mentioned in <a class="link" href="libmediaart-Extraction.html#media-art-init" title="media_art_init ()"><code class="function">media_art_init()</code></a>.</p>
<p class="since">Since 0.2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="media-art-process-file"></a><h3>media_art_process_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
media_art_process_file (<em class="parameter"><code>const <span class="type">guchar</span> *buffer</code></em>,
                        <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
                        <em class="parameter"><code>const <span class="type">gchar</span> *mime</code></em>,
                        <em class="parameter"><code><a class="link" href="libmediaart-Extraction.html#MediaArtType" title="enum MediaArtType"><span class="type">MediaArtType</span></a> type</code></em>,
                        <em class="parameter"><code>const <span class="type">gchar</span> *artist</code></em>,
                        <em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
                        <em class="parameter"><code><span class="type">GFile</span> *file</code></em>);</pre>
<p>Processes a media file. If you have extracted any embedded media art and
passed this in as <em class="parameter"><code>buffer</code></em>
, the image data will be converted to the correct
format and saved in the media art cache.</p>
<p>If <em class="parameter"><code>buffer</code></em>
 is <code class="literal">NULL</code>, libmediaart will search the parent directory of <em class="parameter"><code>file</code></em>

for image files that are likely to be media art for <em class="parameter"><code>file</code></em>
, and if one is
found it will be saved in the media art cache.</p>
<p>If <em class="parameter"><code>file</code></em>
 is on a removable filesystem, the media art file will be saved in a
cache on the removable file system rather than on the host machine.</p>
<div class="refsect3">
<a name="id-1.3.3.2.8.4.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>buffer</p></td>
<td class="parameter_description"><p> a buffer containing <em class="parameter"><code>file</code></em>
data, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>buffer</code></em>
, or 0</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime</p></td>
<td class="parameter_description"><p>MIME type of <em class="parameter"><code>buffer</code></em>
, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The type of media</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>artist</p></td>
<td class="parameter_description"><p>The media file artist name, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>title</p></td>
<td class="parameter_description"><p>The media file title, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>File to be processed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.2.8.4.8"></a><h4>Returns</h4>
<p> <span class="type">TRUE</span> if the file could be processed.</p>
<p></p>
</div>
<p class="since">Since 0.2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="media-art-process"></a><h3>media_art_process ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
media_art_process (<em class="parameter"><code>const unsigned <span class="type">char</span> *buffer</code></em>,
                   <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                   <em class="parameter"><code>const <span class="type">gchar</span> *mime</code></em>,
                   <em class="parameter"><code><a class="link" href="libmediaart-Extraction.html#MediaArtType" title="enum MediaArtType"><span class="type">MediaArtType</span></a> type</code></em>,
                   <em class="parameter"><code>const <span class="type">gchar</span> *artist</code></em>,
                   <em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
                   <em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>);</pre>
<p>This function is the same as <a class="link" href="libmediaart-Extraction.html#media-art-process-file" title="media_art_process_file ()"><code class="function">media_art_process_file()</code></a>, but takes the URI as
a string rather than a <span class="type">GFile</span> object.</p>
<div class="refsect3">
<a name="id-1.3.3.2.8.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>buffer</p></td>
<td class="parameter_description"><p> A buffer of binary image data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>The length of <em class="parameter"><code>buffer</code></em>
, in bytes</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime</p></td>
<td class="parameter_description"><p>The MIME type of the data stored in <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The type of media that contained the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>artist</p></td>
<td class="parameter_description"><p> Artist name of the media. </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>
<tr>
<td class="parameter_name"><p>title</p></td>
<td class="parameter_description"><p> Title of the media. </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>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI of the media file that contained the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.2.8.5.6"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> in case of success, <code class="literal">FALSE</code> otherwise.</p>
<p></p>
</div>
<p class="since">Since 0.2.0</p>
</div>
</div>
<div class="refsect1">
<a name="libmediaart-Extraction.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="MediaArtType"></a><h3>enum MediaArtType</h3>
<p>This type categorized the type of media art we're dealing with.</p>
<div class="refsect3">
<a name="id-1.3.3.2.9.2.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="MEDIA-ART-NONE:CAPS"></a>MEDIA_ART_NONE</p></td>
<td class="enum_member_description">
<p>No media art is available</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="MEDIA-ART-ALBUM:CAPS"></a>MEDIA_ART_ALBUM</p></td>
<td class="enum_member_description">
<p>Media art is an album</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="MEDIA-ART-VIDEO:CAPS"></a>MEDIA_ART_VIDEO</p></td>
<td class="enum_member_description">
<p>Media art is a movie or video</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>