Commit df437c07 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: move ID3 genres to meta

parent 9c5a9654
......@@ -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)
......
......@@ -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;
}
......
/*****************************************************************************
* 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@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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment