From b45afc21484b3580c0b838698b733c8586f6d525 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20Stenac?= Date: Sun, 24 Sep 2006 14:46:03 +0000 Subject: [PATCH] Move the meta readers to the correct folder, and use them for all parsing --- configure.ac | 1 - modules/demux/flac.c | 2 +- modules/demux/mpc.c | 2 +- modules/demux/mpeg/mpga.c | 2 +- modules/demux/util/Modules.am | 6 ------ modules/meta_engine/Modules.am | 2 ++ modules/{demux/util => meta_engine}/id3genres.h | 0 modules/{demux/util => meta_engine}/id3tag.c | 2 +- modules/{misc => meta_engine}/taglib.cpp | 3 +-- 9 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 modules/demux/util/Modules.am rename modules/{demux/util => meta_engine}/id3genres.h (100%) rename modules/{demux/util => meta_engine}/id3tag.c (99%) rename modules/{misc => meta_engine}/taglib.cpp (96%) diff --git a/configure.ac b/configure.ac index 7efb4a4cea..d2a2506abf 100644 --- a/configure.ac +++ b/configure.ac @@ -5662,7 +5662,6 @@ AC_CONFIG_FILES([ modules/demux/mp4/Makefile modules/demux/mpeg/Makefile modules/demux/playlist/Makefile - modules/demux/util/Makefile modules/gui/Makefile modules/gui/beos/Makefile modules/gui/pda/Makefile diff --git a/modules/demux/flac.c b/modules/demux/flac.c index ef8907475e..da31744b5d 100644 --- a/modules/demux/flac.c +++ b/modules/demux/flac.c @@ -137,7 +137,7 @@ static int Open( vlc_object_t * p_this ) p_sys->p_es = es_out_Add( p_demux->out, &fmt ); /* Parse possible id3 header */ - if( ( p_id3 = module_Need( p_demux, "id3", NULL, 0 ) ) ) + if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) ) { p_sys->p_meta = (vlc_meta_t *)p_demux->p_private; p_demux->p_private = NULL; diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c index 4a4caab9a7..a904b712fd 100644 --- a/modules/demux/mpc.c +++ b/modules/demux/mpc.c @@ -226,7 +226,7 @@ static int Open( vlc_object_t * p_this ) /* Parse possible id3 header */ - if( ( p_id3 = module_Need( p_demux, "id3", NULL, 0 ) ) ) + if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) ) { p_sys->p_meta = (vlc_meta_t *)p_demux->p_private; p_demux->p_private = NULL; diff --git a/modules/demux/mpeg/mpga.c b/modules/demux/mpeg/mpga.c index 3b629a19a8..a5692bfb04 100644 --- a/modules/demux/mpeg/mpga.c +++ b/modules/demux/mpeg/mpga.c @@ -262,7 +262,7 @@ static int Open( vlc_object_t * p_this ) p_sys->p_block_out = p_block_out; /* Parse possible id3 header */ - if( ( p_id3 = module_Need( p_demux, "id3", NULL, 0 ) ) ) + if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) ) { p_sys->meta = (vlc_meta_t *)p_demux->p_private; p_demux->p_private = NULL; diff --git a/modules/demux/util/Modules.am b/modules/demux/util/Modules.am deleted file mode 100644 index aed4a4bcd0..0000000000 --- a/modules/demux/util/Modules.am +++ /dev/null @@ -1,6 +0,0 @@ -SOURCES_id3tag = \ - id3tag.c \ - id3genres.h \ - $(NULL) - - diff --git a/modules/meta_engine/Modules.am b/modules/meta_engine/Modules.am index 24002f927c..09011735f7 100644 --- a/modules/meta_engine/Modules.am +++ b/modules/meta_engine/Modules.am @@ -1,3 +1,5 @@ SOURCES_musicbrainz = musicbrainz.c SOURCES_dummy = dummy.c SOURCES_folder = folder.c +SOURCES_taglib = taglib.cpp +SOURCES_id3tag = id3tag.c id3genres.h $(NULL) diff --git a/modules/demux/util/id3genres.h b/modules/meta_engine/id3genres.h similarity index 100% rename from modules/demux/util/id3genres.h rename to modules/meta_engine/id3genres.h diff --git a/modules/demux/util/id3tag.c b/modules/meta_engine/id3tag.c similarity index 99% rename from modules/demux/util/id3tag.c rename to modules/meta_engine/id3tag.c index 01bb6fa4b1..9e11ddd8c1 100644 --- a/modules/demux/util/id3tag.c +++ b/modules/meta_engine/id3tag.c @@ -48,7 +48,7 @@ static int ParseID3Tags ( vlc_object_t * ); *****************************************************************************/ vlc_module_begin(); set_description( _("ID3 tags parser" ) ); - set_capability( "id3", 70 ); + set_capability( "meta reader", 70 ); set_callbacks( ParseID3Tags, NULL ); vlc_module_end(); diff --git a/modules/misc/taglib.cpp b/modules/meta_engine/taglib.cpp similarity index 96% rename from modules/misc/taglib.cpp rename to modules/meta_engine/taglib.cpp index 75bd4416e7..58a26c4bd2 100644 --- a/modules/misc/taglib.cpp +++ b/modules/meta_engine/taglib.cpp @@ -33,12 +33,11 @@ vlc_module_begin(); set_capability( "meta reader", 1000 ); set_callbacks( ReadMeta, NULL ); vlc_module_end(); - + static int ReadMeta( vlc_object_t *p_this ) { demux_t *p_demux = (demux_t *)p_this; - fprintf( stderr, "Demuxing with %s\n", p_demux->psz_access ); if( !strncmp( p_demux->psz_access, "file", 4 ) ) { if( !p_demux->p_private ) -- 2.39.2