Skip to content

Latest commit

 

History

History
310 lines (301 loc) · 17.3 KB

group__flac__metadata__level0.html

File metadata and controls

310 lines (301 loc) · 17.3 KB
 
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FLAC: FLAC/metadata.h: metadata level 0 interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">FLAC
&#160;<span id="projectnumber">1.3.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">FLAC/metadata.h: metadata level 0 interface<div class="ingroups"><a class="el" href="group__flac.html">FLAC C API</a> &raquo; <a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a></div></div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga804b42d9da714199b4b383ce51078d51"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga804b42d9da714199b4b383ce51078d51">FLAC__metadata_get_streaminfo</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *streaminfo)</td></tr>
<tr class="separator:ga804b42d9da714199b4b383ce51078d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga1626af09cd39d4fa37d5b46ebe3790fd">FLAC__metadata_get_tags</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **tags)</td></tr>
<tr class="separator:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f47949dca514506718276205a4fae0b"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga0f47949dca514506718276205a4fae0b">FLAC__metadata_get_cuesheet</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **cuesheet)</td></tr>
<tr class="separator:ga0f47949dca514506718276205a4fae0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9f69e48c5a33cacb924d13986bfb852"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#gab9f69e48c5a33cacb924d13986bfb852">FLAC__metadata_get_picture</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **picture, <a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a> type, const char *mime_type, const FLAC__byte *description, uint32_t max_width, uint32_t max_height, uint32_t max_depth, uint32_t max_colors)</td></tr>
<tr class="separator:gab9f69e48c5a33cacb924d13986bfb852"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename. </p>
<p>They try to skip any ID3v2 tag at the head of the file. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga804b42d9da714199b4b383ce51078d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga804b42d9da714199b4b383ce51078d51">&#9670;&nbsp;</a></span>FLAC__metadata_get_streaminfo()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_streaminfo </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td>
<td class="paramname"><em>streaminfo</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the STREAMINFO metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">streaminfo</td><td>A pointer to space for the STREAMINFO block. Since <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> is a simple structure with no memory allocation involved, you pass the address of an existing structure. It need not be initialized. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div></div><!-- fragment --> <div class="fragment"><div class="line">streaminfo != NULL </div></div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid STREAMINFO block was read from <em>filename</em>. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no STREAMINFO block. (A memory allocation error is possible because this function must set up a file decoder.) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga1626af09cd39d4fa37d5b46ebe3790fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1626af09cd39d4fa37d5b46ebe3790fd">&#9670;&nbsp;</a></span>FLAC__metadata_get_tags()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_tags </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>tags</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the VORBIS_COMMENT metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">tags</td><td>The address where the returned pointer will be stored. The <em>tags</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div></div><!-- fragment --> <div class="fragment"><div class="line">tags != NULL </div></div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid VORBIS_COMMENT block was read from <em>filename</em>, and <em>*tags</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no VORBIS_COMMENT block, and <em>*tags</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga0f47949dca514506718276205a4fae0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f47949dca514506718276205a4fae0b">&#9670;&nbsp;</a></span>FLAC__metadata_get_cuesheet()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_cuesheet </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>cuesheet</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the CUESHEET metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">cuesheet</td><td>The address where the returned pointer will be stored. The <em>cuesheet</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div></div><!-- fragment --> <div class="fragment"><div class="line">cuesheet != NULL </div></div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid CUESHEET block was read from <em>filename</em>, and <em>*cuesheet</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no CUESHEET block, and <em>*cuesheet</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gab9f69e48c5a33cacb924d13986bfb852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9f69e48c5a33cacb924d13986bfb852">&#9670;&nbsp;</a></span>FLAC__metadata_get_picture()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_picture </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>picture</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>mime_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const FLAC__byte *&#160;</td>
<td class="paramname"><em>description</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>max_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>max_height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>max_depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>max_colors</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read a PICTURE metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file. Since there can be more than one PICTURE block in a file, this function takes a number of parameters that act as constraints to the search. The PICTURE block with the largest area matching all the constraints will be returned, or <em>*picture</em> will be set to <code>NULL</code> if there was no such block.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">picture</td><td>The address where the returned pointer will be stored. The <em>picture</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
<tr><td class="paramname">type</td><td>The desired picture type. Use <code>-1</code> to mean "any type". </td></tr>
<tr><td class="paramname">mime_type</td><td>The desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use <code>NULL</code> to mean "any MIME type". </td></tr>
<tr><td class="paramname">description</td><td>The desired description. The string will be matched exactly. Use <code>NULL</code> to mean "any
description". </td></tr>
<tr><td class="paramname">max_width</td><td>The maximum width in pixels desired. Use <code></code>(uint32_t)(-1) to mean "any width". </td></tr>
<tr><td class="paramname">max_height</td><td>The maximum height in pixels desired. Use <code></code>(uint32_t)(-1) to mean "any height". </td></tr>
<tr><td class="paramname">max_depth</td><td>The maximum color depth in bits-per-pixel desired. Use <code></code>(uint32_t)(-1) to mean "any depth". </td></tr>
<tr><td class="paramname">max_colors</td><td>The maximum number of colors desired. Use <code></code>(uint32_t)(-1) to mean "any number of colors". </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div></div><!-- fragment --> <div class="fragment"><div class="line">picture != NULL </div></div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid PICTURE block was read from <em>filename</em>, and <em>*picture</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no PICTURE block, and <em>*picture</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<hr size="1"/>
<div class="copyright">
<!-- @@@ oh so hacky -->
<table>
<tr>
<td align="left">
Copyright (c) 2000-2009 Josh Coalson
Copyright (c) 2011-2016 Xiph.Org Foundation
</td>
<td width="1%" align="right">
<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
</td>
</tr>
</table>
</div>
<!-- Copyright (c) 2000-2009 Josh Coalson -->
<!-- Copyright (c) 2011-2016 Xiph.Org Foundation -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>