summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/libflac/doc/html/api/group__flac__metadata__level0.html
blob: f08bb524d6789a01bb76b1443eb6c81ee61ac4ca (plain) (blame)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FLAC: FLAC/metadata.h: metadata level 0 interface</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>FLAC/metadata.h: metadata level 0 interface<br>
<small>
[<a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename. 
<p>
They try to skip any ID3v2 tag at the head of the file. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga0">FLAC__metadata_get_streaminfo</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *streaminfo)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga1">FLAC__metadata_get_tags</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **tags)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga2">FLAC__metadata_get_cuesheet</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **cuesheet)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga3">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#ga114">FLAC__StreamMetadata_Picture_Type</a> type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga0" doxytag="metadata.h::FLAC__metadata_get_streaminfo"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_get_streaminfo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>streaminfo</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>streaminfo</em>&nbsp;</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>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> streaminfo != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</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>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga1" doxytag="metadata.h::FLAC__metadata_get_tags"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_get_tags           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>tags</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tags</em>&nbsp;</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#ga2">FLAC__metadata_object_delete()</a>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> tags != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</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>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="metadata.h::FLAC__metadata_get_cuesheet"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_get_cuesheet           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>cuesheet</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cuesheet</em>&nbsp;</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#ga2">FLAC__metadata_object_delete()</a>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> cuesheet != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</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>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="metadata.h::FLAC__metadata_get_picture"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_get_picture           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>picture</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__format.html#ga114">FLAC__StreamMetadata_Picture_Type</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>mime_type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const FLAC__byte *&nbsp;</td>
          <td class="mdname" nowrap> <em>description</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>max_width</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>max_height</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>max_depth</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>max_colors</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>picture</em>&nbsp;</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#ga2">FLAC__metadata_object_delete()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The desired picture type. Use <code>-1</code> to mean "any type". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mime_type</em>&nbsp;</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 valign="top"></td><td valign="top"><em>description</em>&nbsp;</td><td>The desired description. The string will be matched exactly. Use <code>NULL</code> to mean "any description". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_width</em>&nbsp;</td><td>The maximum width in pixels desired. Use <code></code>(unsigned)(-1) to mean "any width". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_height</em>&nbsp;</td><td>The maximum height in pixels desired. Use <code></code>(unsigned)(-1) to mean "any height". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_depth</em>&nbsp;</td><td>The maximum color depth in bits-per-pixel desired. Use <code></code>(unsigned)(-1) to mean "any depth". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_colors</em>&nbsp;</td><td>The maximum number of colors desired. Use <code></code>(unsigned)(-1) to mean "any number of colors". </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> picture != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</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>
</dl>
    </td>
  </tr>
</table>

<hr size="1">
<div class="copyright">
	<!-- @@@ oh so hacky -->
	<table>
		<tr>
			<td align="left">
				Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
			</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,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
<!-- 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>