[vlc-commits] meta_reader: taglib: remove now defaulted ifdefs
Francois Cartegnie
git at videolan.org
Fri Feb 19 16:09:42 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 18 22:30:43 2016 +0100| [affc32b905d33ad1ec03274ead997724e01d9e0d] | committer: Francois Cartegnie
meta_reader: taglib: remove now defaulted ifdefs
As we're now requiring 1.9
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=affc32b905d33ad1ec03274ead997724e01d9e0d
---
modules/meta_engine/taglib.cpp | 36 ++++--------------------------------
1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index b9d657c..b6df4f9 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -60,34 +60,21 @@
#include <tag.h>
#include <tbytevector.h>
-#if TAGLIB_VERSION >= VERSION_INT(1,7,0)
-# define TAGLIB_HAVE_APEFILE_H
-# include <apefile.h>
-# ifdef TAGLIB_WITH_ASF // ASF pictures comes with v1.7.0
-# define TAGLIB_HAVE_ASFPICTURE_H
-# include <asffile.h>
-# endif
-#endif
-
-#if TAGLIB_VERSION >= VERSION_INT(1,9,0)
-# include <opusfile.h>
-#endif
-
+#include <apefile.h>
+#include <asffile.h>
#include <apetag.h>
#include <flacfile.h>
#include <mpcfile.h>
#include <mpegfile.h>
+#include <mp4file.h>
#include <oggfile.h>
#include <oggflacfile.h>
+#include <opusfile.h>
#include "../demux/xiph_metadata.h"
#include <aifffile.h>
#include <wavfile.h>
-#if defined(TAGLIB_WITH_MP4)
-# include <mp4file.h>
-#endif
-
#include <speexfile.h>
#include <trueaudiofile.h>
#include <vorbisfile.h>
@@ -315,7 +302,6 @@ static void ReadMetaFromASF( ASF::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
#undef SET
#undef SET_EXTRA
-#ifdef TAGLIB_HAVE_ASFPICTURE_H
// List the pictures
list = tag->attributeListMap()["WM/Picture"];
ASF::AttributeList::Iterator iter;
@@ -357,7 +343,6 @@ static void ReadMetaFromASF( ASF::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
}
free( psz_name );
}
-#endif
}
@@ -661,8 +646,6 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
}
}
-
-#if defined(TAGLIB_WITH_MP4)
/**
* Read the meta information from mp4 specific tags
* @param tag: the mp4 tag
@@ -711,8 +694,6 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta
}
}
}
-#endif
-
/**
* Get the tags from the file using TagLib
@@ -794,23 +775,18 @@ static int ReadMeta( vlc_object_t* p_this)
TAB_INIT( p_demux_meta->i_attachments, p_demux_meta->attachments );
- // Try now to read special tags
-#ifdef TAGLIB_HAVE_APEFILE_H
if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
{
if( ape->APETag() )
ReadMetaFromAPE( ape->APETag(), p_demux_meta, p_meta );
}
else
-#endif
-#ifdef TAGLIB_WITH_ASF
if( ASF::File* asf = dynamic_cast<ASF::File*>(f.file()) )
{
if( asf->tag() )
ReadMetaFromASF( asf->tag(), p_demux_meta, p_meta );
}
else
-#endif
if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{
if( flac->ID3v2Tag() )
@@ -818,13 +794,11 @@ static int ReadMeta( vlc_object_t* p_this)
else if( flac->xiphComment() )
ReadMetaFromXiph( flac->xiphComment(), p_demux_meta, p_meta );
}
-#if defined(TAGLIB_WITH_MP4)
else if( MP4::File *mp4 = dynamic_cast<MP4::File*>(f.file()) )
{
if( mp4->tag() )
ReadMetaFromMP4( mp4->tag(), p_demux_meta, p_meta );
}
-#endif
else if( MPC::File* mpc = dynamic_cast<MPC::File*>(f.file()) )
{
if( mpc->APETag() )
@@ -1136,14 +1110,12 @@ static int WriteMeta( vlc_object_t *p_this )
// Try now to write special tags
-#ifdef TAGLIB_HAVE_APEFILE_H
if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
{
if( ape->APETag() )
WriteMetaToAPE( ape->APETag(), p_item );
}
else
-#endif
if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{
if( flac->ID3v2Tag() )
More information about the vlc-commits
mailing list