Commit 01cf7007 authored by Rémi Duraffort's avatar Rémi Duraffort

taglib: check for the presence of apefile.h

parent da61086b
...@@ -1761,6 +1761,7 @@ AS_IF([test "${enable_taglib}" != "no"], [ ...@@ -1761,6 +1761,7 @@ AS_IF([test "${enable_taglib}" != "no"], [
VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS]) VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(taglib/mp4coverart.h) AC_CHECK_HEADERS(taglib/mp4coverart.h)
AC_CHECK_HEADERS(taglib/apefile.h)
AC_LANG_POP(C++) AC_LANG_POP(C++)
], [ ], [
AC_MSG_WARN(TagLib library not found)]) AC_MSG_WARN(TagLib library not found)])
......
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
#include <id3v2tag.h> #include <id3v2tag.h>
#include <xiphcomment.h> #include <xiphcomment.h>
#ifdef HAVE_TAGLIB_APEFILE_H
#include <apefile.h> #include <apefile.h>
#endif
#include <flacfile.h> #include <flacfile.h>
#include <mpcfile.h> #include <mpcfile.h>
#include <mpegfile.h> #include <mpegfile.h>
...@@ -436,12 +438,15 @@ static int ReadMeta( vlc_object_t* p_this) ...@@ -436,12 +438,15 @@ static int ReadMeta( vlc_object_t* p_this)
// Try now to read special tags // Try now to read special tags
#ifdef HAVE_TAGLIB_APEFILE_H
if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) ) if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
{ {
if( ape->APETag() ) if( ape->APETag() )
ReadMetaFromAPE( ape->APETag(), p_demux_meta, p_meta ); ReadMetaFromAPE( ape->APETag(), p_demux_meta, p_meta );
} }
else if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) ) else
#endif
if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{ {
if( flac->ID3v2Tag() ) if( flac->ID3v2Tag() )
ReadMetaFromId3v2( flac->ID3v2Tag(), p_demux_meta, p_meta ); ReadMetaFromId3v2( flac->ID3v2Tag(), p_demux_meta, p_meta );
...@@ -659,12 +664,15 @@ static int WriteMeta( vlc_object_t *p_this ) ...@@ -659,12 +664,15 @@ static int WriteMeta( vlc_object_t *p_this )
// Try now to write special tags // Try now to write special tags
#ifdef HAVE_TAGLIB_APEFILE_H
if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) ) if( APE::File* ape = dynamic_cast<APE::File*>(f.file()) )
{ {
if( ape->APETag() ) if( ape->APETag() )
WriteMetaToAPE( ape->APETag(), p_item ); WriteMetaToAPE( ape->APETag(), p_item );
} }
else if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) ) else
#endif
if( FLAC::File* flac = dynamic_cast<FLAC::File*>(f.file()) )
{ {
if( flac->ID3v2Tag() ) if( flac->ID3v2Tag() )
WriteMetaToId3v2( flac->ID3v2Tag(), p_item ); WriteMetaToId3v2( flac->ID3v2Tag(), p_item );
......
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