annotate id3v1.c @ 5016:eb6dd7717805 libavformat

Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c. patch by Patrick Dehne, patrick mysonicweb com
author diego
date Thu, 11 Jun 2009 15:26:57 +0000
parents mp3.c@d24b4e25db8d
children 1763f7d0d8d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 858
diff changeset
1 /*
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
2 * ID3v1 header parser
4251
77e0c7511d41 cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 4221
diff changeset
3 * Copyright (c) 2003 Fabrice Bellard
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
4 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
5 * This file is part of FFmpeg.
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
6 *
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
11 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
15 * Lesser General Public License for more details.
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
16 *
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
896
edbe5c3717f9 Update licensing information: The FSF changed postal address.
diego
parents: 885
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
20 */
3286
6f61c3b36632 Use full path for #includes from another directory.
diego
parents: 3278
diff changeset
21
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
22 #include "id3v1.h"
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
23
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
24 const char *ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = {
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
25 [0] = "Blues",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
26 [1] = "Classic Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
27 [2] = "Country",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
28 [3] = "Dance",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
29 [4] = "Disco",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
30 [5] = "Funk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
31 [6] = "Grunge",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
32 [7] = "Hip-Hop",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
33 [8] = "Jazz",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
34 [9] = "Metal",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
35 [10] = "New Age",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
36 [11] = "Oldies",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
37 [12] = "Other",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
38 [13] = "Pop",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
39 [14] = "R&B",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
40 [15] = "Rap",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
41 [16] = "Reggae",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
42 [17] = "Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
43 [18] = "Techno",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
44 [19] = "Industrial",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
45 [20] = "Alternative",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
46 [21] = "Ska",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
47 [22] = "Death Metal",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
48 [23] = "Pranks",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
49 [24] = "Soundtrack",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
50 [25] = "Euro-Techno",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
51 [26] = "Ambient",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
52 [27] = "Trip-Hop",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
53 [28] = "Vocal",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
54 [29] = "Jazz+Funk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
55 [30] = "Fusion",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
56 [31] = "Trance",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
57 [32] = "Classical",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
58 [33] = "Instrumental",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
59 [34] = "Acid",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
60 [35] = "House",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
61 [36] = "Game",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
62 [37] = "Sound Clip",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
63 [38] = "Gospel",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
64 [39] = "Noise",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
65 [40] = "AlternRock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
66 [41] = "Bass",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
67 [42] = "Soul",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
68 [43] = "Punk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
69 [44] = "Space",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
70 [45] = "Meditative",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
71 [46] = "Instrumental Pop",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
72 [47] = "Instrumental Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
73 [48] = "Ethnic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
74 [49] = "Gothic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
75 [50] = "Darkwave",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
76 [51] = "Techno-Industrial",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
77 [52] = "Electronic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
78 [53] = "Pop-Folk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
79 [54] = "Eurodance",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
80 [55] = "Dream",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
81 [56] = "Southern Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
82 [57] = "Comedy",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
83 [58] = "Cult",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
84 [59] = "Gangsta",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
85 [60] = "Top 40",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
86 [61] = "Christian Rap",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
87 [62] = "Pop/Funk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
88 [63] = "Jungle",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
89 [64] = "Native American",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
90 [65] = "Cabaret",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
91 [66] = "New Wave",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
92 [67] = "Psychadelic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
93 [68] = "Rave",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
94 [69] = "Showtunes",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
95 [70] = "Trailer",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
96 [71] = "Lo-Fi",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
97 [72] = "Tribal",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
98 [73] = "Acid Punk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
99 [74] = "Acid Jazz",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
100 [75] = "Polka",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
101 [76] = "Retro",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
102 [77] = "Musical",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
103 [78] = "Rock & Roll",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
104 [79] = "Hard Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
105 [80] = "Folk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
106 [81] = "Folk-Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
107 [82] = "National Folk",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
108 [83] = "Swing",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
109 [84] = "Fast Fusion",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
110 [85] = "Bebob",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
111 [86] = "Latin",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
112 [87] = "Revival",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
113 [88] = "Celtic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
114 [89] = "Bluegrass",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
115 [90] = "Avantgarde",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
116 [91] = "Gothic Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
117 [92] = "Progressive Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
118 [93] = "Psychedelic Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
119 [94] = "Symphonic Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
120 [95] = "Slow Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
121 [96] = "Big Band",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
122 [97] = "Chorus",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
123 [98] = "Easy Listening",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
124 [99] = "Acoustic",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
125 [100] = "Humour",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
126 [101] = "Speech",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
127 [102] = "Chanson",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
128 [103] = "Opera",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
129 [104] = "Chamber Music",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
130 [105] = "Sonata",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
131 [106] = "Symphony",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
132 [107] = "Booty Bass",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
133 [108] = "Primus",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
134 [109] = "Porn Groove",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
135 [110] = "Satire",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
136 [111] = "Slow Jam",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
137 [112] = "Club",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
138 [113] = "Tango",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
139 [114] = "Samba",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
140 [115] = "Folklore",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
141 [116] = "Ballad",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
142 [117] = "Power Ballad",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
143 [118] = "Rhythmic Soul",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
144 [119] = "Freestyle",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
145 [120] = "Duet",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
146 [121] = "Punk Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
147 [122] = "Drum Solo",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
148 [123] = "A capella",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
149 [124] = "Euro-House",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
150 [125] = "Dance Hall",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
151 };