Skip to content
Snippets Groups Projects
Commit df437c07 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

demux: mp4: move ID3 genres to meta

parent 9c5a9654
No related branches found
No related tags found
No related merge requests found
...@@ -203,8 +203,9 @@ EXTRA_LTLIBRARIES += libmkv_plugin.la ...@@ -203,8 +203,9 @@ EXTRA_LTLIBRARIES += libmkv_plugin.la
libmp4_plugin_la_SOURCES = demux/mp4/mp4.c demux/mp4/mp4.h \ libmp4_plugin_la_SOURCES = demux/mp4/mp4.c demux/mp4/mp4.h \
demux/mp4/fragments.c demux/mp4/fragments.h \ demux/mp4/fragments.c demux/mp4/fragments.h \
demux/mp4/libmp4.c demux/mp4/libmp4.h \ demux/mp4/libmp4.c demux/mp4/libmp4.h \
demux/mp4/id3genres.h demux/mp4/languages.h \ demux/mp4/languages.h \
demux/asf/asfpacket.c demux/asf/asfpacket.h \ demux/asf/asfpacket.c demux/asf/asfpacket.h \
demux/meta_engine/ID3Genres.h \
demux/mp4/avci.h \ demux/mp4/avci.h \
demux/mp4/essetup.c demux/mp4/meta.c demux/mp4/essetup.c demux/mp4/meta.c
libmp4_plugin_la_LIBADD = $(LIBM) libmp4_plugin_la_LIBADD = $(LIBM)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#endif #endif
#include "mp4.h" #include "mp4.h"
#include "id3genres.h" /* for ATOM_gnre */ #include "../meta_engine/ID3Genres.h" /* for ATOM_gnre */
#include "languages.h" #include "languages.h"
#include <vlc_meta.h> #include <vlc_meta.h>
...@@ -403,8 +403,8 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box ) ...@@ -403,8 +403,8 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
BOXDATA(p_data)->e_wellknowntype == DATA_WKT_RESERVED ) BOXDATA(p_data)->e_wellknowntype == DATA_WKT_RESERVED )
{ {
const uint16_t i_genre = GetWBE(BOXDATA(p_data)->p_blob); const uint16_t i_genre = GetWBE(BOXDATA(p_data)->p_blob);
if( i_genre && i_genre <= NUM_GENRES ) if( i_genre && i_genre <= ID3_GENRES_COUNT )
vlc_meta_SetGenre( p_meta, ppsz_genres[i_genre - 1] ); vlc_meta_SetGenre( p_meta, ID3_ppsz_genres[i_genre - 1] );
} }
break; break;
} }
......
/***************************************************************************** /*****************************************************************************
* id3genres.h: list of genres for id3 genre tags * ID3Genres.h: list of genres for id3 genre tags
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VLC authors and VideoLAN * Copyright (C) 2002-2003 VLC authors and VideoLAN
* $Id$
* *
* Author: Sigmund Augdal Helberg <dnumgis@videolan.org> * Author: Sigmund Augdal Helberg <dnumgis@videolan.org>
* list found at http://www.id3.org/id3v2.4.0-frames.txt * list found at http://www.id3.org/id3v2.4.0-frames.txt
...@@ -25,10 +24,12 @@ ...@@ -25,10 +24,12 @@
* along with this program; if not, write to the Free Software Foundation, * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef ID3GENRES_H
#define ID3GENRES_H
#define NUM_GENRES 148 #define ID3_GENRES_COUNT 148
static const char *ppsz_genres[] = { static const char *ID3_ppsz_genres[] = {
N_("Blues"), N_("Blues"),
N_("Classic Rock"), N_("Classic Rock"),
N_("Country"), N_("Country"),
...@@ -178,3 +179,5 @@ static const char *ppsz_genres[] = { ...@@ -178,3 +179,5 @@ static const char *ppsz_genres[] = {
N_("JPop"), N_("JPop"),
N_("Synthpop") N_("Synthpop")
}; };
#endif
...@@ -468,7 +468,6 @@ modules/demux/mkv/util.hpp ...@@ -468,7 +468,6 @@ modules/demux/mkv/util.hpp
modules/demux/mkv/virtual_segment.cpp modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.hpp modules/demux/mkv/virtual_segment.hpp
modules/demux/mod.c modules/demux/mod.c
modules/demux/mp4/id3genres.h
modules/demux/mp4/libmp4.c modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.h modules/demux/mp4/libmp4.h
modules/demux/mp4/mp4.c modules/demux/mp4/mp4.c
...@@ -942,6 +941,7 @@ modules/lua/meta.c ...@@ -942,6 +941,7 @@ modules/lua/meta.c
modules/lua/vlc.c modules/lua/vlc.c
modules/lua/vlc.h modules/lua/vlc.h
modules/meta_engine/folder.c modules/meta_engine/folder.c
modules/meta_engine/ID3Genres.h
modules/meta_engine/taglib.cpp modules/meta_engine/taglib.cpp
modules/misc/audioscrobbler.c modules/misc/audioscrobbler.c
modules/misc/gnutls.c modules/misc/gnutls.c
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment