Chris@1
|
1 /* grabbag - Convenience lib for various routines common to several tools
|
Chris@1
|
2 * Copyright (C) 2006,2007 Josh Coalson
|
Chris@1
|
3 *
|
Chris@1
|
4 * This program is free software; you can redistribute it and/or
|
Chris@1
|
5 * modify it under the terms of the GNU General Public License
|
Chris@1
|
6 * as published by the Free Software Foundation; either version 2
|
Chris@1
|
7 * of the License, or (at your option) any later version.
|
Chris@1
|
8 *
|
Chris@1
|
9 * This program is distributed in the hope that it will be useful,
|
Chris@1
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Chris@1
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Chris@1
|
12 * GNU General Public License for more details.
|
Chris@1
|
13 *
|
Chris@1
|
14 * You should have received a copy of the GNU General Public License
|
Chris@1
|
15 * along with this program; if not, write to the Free Software
|
Chris@1
|
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Chris@1
|
17 */
|
Chris@1
|
18
|
Chris@1
|
19 /* This .h cannot be included by itself; #include "share/grabbag.h" instead. */
|
Chris@1
|
20
|
Chris@1
|
21 #ifndef GRABBAG__PICTURE_H
|
Chris@1
|
22 #define GRABBAG__PICTURE_H
|
Chris@1
|
23
|
Chris@1
|
24 #include "FLAC/metadata.h"
|
Chris@1
|
25
|
Chris@1
|
26 #ifdef __cplusplus
|
Chris@1
|
27 extern "C" {
|
Chris@1
|
28 #endif
|
Chris@1
|
29
|
Chris@1
|
30 /* spec should be of the form "[TYPE]|MIME_TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE", e.g.
|
Chris@1
|
31 * "|image/jpeg|||cover.jpg"
|
Chris@1
|
32 * "4|image/jpeg||300x300x24|backcover.jpg"
|
Chris@1
|
33 * "|image/png|description|300x300x24/71|cover.png"
|
Chris@1
|
34 * "-->|image/gif||300x300x24/71|http://blah.blah.blah/cover.gif"
|
Chris@1
|
35 *
|
Chris@1
|
36 * empty type means default to FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER
|
Chris@1
|
37 * empty resolution spec means to get from the file (cannot get used with "-->" linked images)
|
Chris@1
|
38 * spec and error_message must not be NULL
|
Chris@1
|
39 */
|
Chris@1
|
40 FLAC__StreamMetadata *grabbag__picture_parse_specification(const char *spec, const char **error_message);
|
Chris@1
|
41
|
Chris@1
|
42 #ifdef __cplusplus
|
Chris@1
|
43 }
|
Chris@1
|
44 #endif
|
Chris@1
|
45
|
Chris@1
|
46 #endif
|