Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
401d2c46
Commit
401d2c46
authored
Mar 13, 2003
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for oldstyle id3 genres.
parent
4815c251
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
3 deletions
+109
-3
modules/demux/util/id3genres.h
modules/demux/util/id3genres.h
+88
-0
modules/demux/util/id3tag.c
modules/demux/util/id3tag.c
+21
-3
No files found.
modules/demux/util/id3genres.h
0 → 100644
View file @
401d2c46
/* id3genres.h: list of genres for id3 genre tags, found at
* http://www.id3.org/id3v2.4.0-frames.txt
*/
#define NUM_GENRES 80
static
char
*
ppsz_genres
[]
=
{
N_
(
"Blues"
),
N_
(
"Classic Rock"
),
N_
(
"Country"
),
N_
(
"Dance"
),
N_
(
"Disco"
),
N_
(
"Funk"
),
N_
(
"Grunge"
),
N_
(
"Hip-Hop"
),
N_
(
"Jazz"
),
N_
(
"Metal"
),
N_
(
"New Age"
),
N_
(
"Oldies"
),
N_
(
"Other"
),
N_
(
"Pop"
),
N_
(
"R&B"
),
N_
(
"Rap"
),
N_
(
"Reggae"
),
N_
(
"Rock"
),
N_
(
"Techno"
),
N_
(
"Industrial"
),
N_
(
"Alternative"
),
N_
(
"Ska"
),
N_
(
"Death Metal"
),
N_
(
"Pranks"
),
N_
(
"Soundtrack"
),
N_
(
"Euro-Techno"
),
N_
(
"Ambient"
),
N_
(
"Trip-Hop"
),
N_
(
"Vocal"
),
N_
(
"Jazz+Funk"
),
N_
(
"Fusion"
),
N_
(
"Trance"
),
N_
(
"Classical"
),
N_
(
"Instrumental"
),
N_
(
"Acid"
),
N_
(
"House"
),
N_
(
"Game"
),
N_
(
"Sound Clip"
),
N_
(
"Gospel"
),
N_
(
"Noise"
),
N_
(
"AlternRock"
),
N_
(
"Bass"
),
N_
(
"Soul"
),
N_
(
"Punk"
),
N_
(
"Space"
),
N_
(
"Meditative"
),
N_
(
"Instrumental Pop"
),
N_
(
"Instrumental Rock"
),
N_
(
"Ethnic"
),
N_
(
"Gothic"
),
N_
(
"Darkwave"
),
N_
(
"Techno-Industrial"
),
N_
(
"Electronic"
),
N_
(
"Pop-Folk"
),
N_
(
"Eurodance"
),
N_
(
"Dream"
),
N_
(
"Southern Rock"
),
N_
(
"Comedy"
),
N_
(
"Cult"
),
N_
(
"Gangsta"
),
N_
(
"Top 40"
),
N_
(
"Christian Rap"
),
N_
(
"Pop/Funk"
),
N_
(
"Jungle"
),
N_
(
"Native American"
),
N_
(
"Cabaret"
),
N_
(
"New Wave"
),
N_
(
"Psychadelic"
),
N_
(
"Rave"
),
N_
(
"Showtunes"
),
N_
(
"Trailer"
),
N_
(
"Lo-Fi"
),
N_
(
"Tribal"
),
N_
(
"Acid Punk"
),
N_
(
"Acid Jazz"
),
N_
(
"Polka"
),
N_
(
"Retro"
),
N_
(
"Musical"
),
N_
(
"Rock & Roll"
),
N_
(
"Hard Rock"
)
};
modules/demux/util/id3tag.c
View file @
401d2c46
...
...
@@ -2,7 +2,7 @@
* id3tag.c: id3 tag parser/skipper based on libid3tag
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3tag.c,v 1.
4 2003/02/22 14:11:38
sigmunau Exp $
* $Id: id3tag.c,v 1.
5 2003/03/13 22:35:51
sigmunau Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <id3tag.h>
#include "id3genres.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -72,8 +73,25 @@ static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size )
i_strings
=
id3_field_getnstrings
(
&
p_frame
->
fields
[
1
]
);
while
(
i_strings
>
0
)
{
psz_temp
=
id3_ucs4_latin1duplicate
(
id3_field_getstrings
(
&
p_frame
->
fields
[
1
],
--
i_strings
)
);
input_AddInfo
(
p_category
,
(
char
*
)
p_frame
->
description
,
psz_temp
);
psz_temp
=
id3_ucs4_latin1duplicate
(
id3_field_getstrings
(
&
p_frame
->
fields
[
1
],
--
i_strings
)
);
if
(
!
strcmp
(
p_frame
->
id
,
ID3_FRAME_GENRE
)
)
{
int
i_genre
;
char
*
psz_endptr
;
i_genre
=
strtol
(
psz_temp
,
&
psz_endptr
,
10
);
if
(
psz_temp
!=
psz_endptr
&&
i_genre
>=
0
&&
i_genre
<
NUM_GENRES
)
{
input_AddInfo
(
p_category
,
(
char
*
)
p_frame
->
description
,
ppsz_genres
[
atoi
(
psz_temp
)]);
}
else
{
input_AddInfo
(
p_category
,
(
char
*
)
p_frame
->
description
,
psz_temp
);
}
}
else
{
input_AddInfo
(
p_category
,
(
char
*
)
p_frame
->
description
,
psz_temp
);
}
free
(
psz_temp
);
}
i
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment