id3v1.h 1.47 KB
Newer Older
Josh Coalson's avatar
Josh Coalson committed
1
/* plugin_common - Routines common to several plugins
Josh Coalson's avatar
Josh Coalson committed
2
 * Copyright (C) 2002,2003,2004  Josh Coalson
Josh Coalson's avatar
Josh Coalson committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef FLAC__PLUGIN_COMMON__ID3V1_H
#define FLAC__PLUGIN_COMMON__ID3V1_H

#include <string.h>

#include "FLAC/ordinals.h"

26
27
#pragma pack(push, 1)

Josh Coalson's avatar
Josh Coalson committed
28
29
30
31
32
33
typedef struct {
	char tag[3];
	char title[30];
	char artist[30];
	char album[30];
	char year[4];
Josh Coalson's avatar
Josh Coalson committed
34
	/* always use layout of id3 v1.1 */
35
36
37
	char comment[28];
	char zero;
	unsigned char track;
Josh Coalson's avatar
Josh Coalson committed
38
39
40
	unsigned char genre;
} FLAC_Plugin__Id3v1_Tag;

41
42
#pragma pack(pop)

43
FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag);
Josh Coalson's avatar
Josh Coalson committed
44
45


Josh Coalson's avatar
Josh Coalson committed
46
#define FLAC_PLUGIN__ID3V1_TAG_INVALID_GENRE 255
Josh Coalson's avatar
Josh Coalson committed
47

48
49
const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code);
unsigned FLAC_plugin__id3v1_tag_genre_table_max();
Josh Coalson's avatar
Josh Coalson committed
50
51

#endif