[vlc-commits] demux: mp4: move ID3 genres to meta
Francois Cartegnie
git at videolan.org
Mon May 29 17:54:39 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 29 17:49:27 2017 +0200| [df437c07f21422f3ae90b6091f11f4e84c62d08b] | committer: Francois Cartegnie
demux: mp4: move ID3 genres to meta
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df437c07f21422f3ae90b6091f11f4e84c62d08b
---
modules/demux/Makefile.am | 3 ++-
modules/demux/mp4/meta.c | 6 +++---
modules/{demux/mp4/id3genres.h => meta_engine/ID3Genres.h} | 11 +++++++----
po/POTFILES.in | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index b1c482365e..656675391c 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -203,8 +203,9 @@ EXTRA_LTLIBRARIES += libmkv_plugin.la
libmp4_plugin_la_SOURCES = demux/mp4/mp4.c demux/mp4/mp4.h \
demux/mp4/fragments.c demux/mp4/fragments.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/meta_engine/ID3Genres.h \
demux/mp4/avci.h \
demux/mp4/essetup.c demux/mp4/meta.c
libmp4_plugin_la_LIBADD = $(LIBM)
diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index 180a11e913..3421e847d6 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -22,7 +22,7 @@
#endif
#include "mp4.h"
-#include "id3genres.h" /* for ATOM_gnre */
+#include "../meta_engine/ID3Genres.h" /* for ATOM_gnre */
#include "languages.h"
#include <vlc_meta.h>
@@ -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 )
{
const uint16_t i_genre = GetWBE(BOXDATA(p_data)->p_blob);
- if( i_genre && i_genre <= NUM_GENRES )
- vlc_meta_SetGenre( p_meta, ppsz_genres[i_genre - 1] );
+ if( i_genre && i_genre <= ID3_GENRES_COUNT )
+ vlc_meta_SetGenre( p_meta, ID3_ppsz_genres[i_genre - 1] );
}
break;
}
diff --git a/modules/demux/mp4/id3genres.h b/modules/meta_engine/ID3Genres.h
similarity index 96%
rename from modules/demux/mp4/id3genres.h
rename to modules/meta_engine/ID3Genres.h
index 25cd8e9bc8..852302e157 100644
--- a/modules/demux/mp4/id3genres.h
+++ b/modules/meta_engine/ID3Genres.h
@@ -1,8 +1,7 @@
/*****************************************************************************
- * 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
- * $Id$
*
* Author: Sigmund Augdal Helberg <dnumgis at videolan.org>
* list found at http://www.id3.org/id3v2.4.0-frames.txt
@@ -25,10 +24,12 @@
* along with this program; if not, write to the Free Software Foundation,
* 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_("Classic Rock"),
N_("Country"),
@@ -178,3 +179,5 @@ static const char *ppsz_genres[] = {
N_("JPop"),
N_("Synthpop")
};
+
+#endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 379e281f01..024dba53c5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -468,7 +468,6 @@ modules/demux/mkv/util.hpp
modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.hpp
modules/demux/mod.c
-modules/demux/mp4/id3genres.h
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.h
modules/demux/mp4/mp4.c
@@ -942,6 +941,7 @@ modules/lua/meta.c
modules/lua/vlc.c
modules/lua/vlc.h
modules/meta_engine/folder.c
+modules/meta_engine/ID3Genres.h
modules/meta_engine/taglib.cpp
modules/misc/audioscrobbler.c
modules/misc/gnutls.c
More information about the vlc-commits
mailing list