option(BUILD_EXAMPLES "Build the examples" OFF)
option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs" OFF)
-option(WITH_ASF "Enable ASF tag reading/writing code" ON)
-option(WITH_MP4 "Enable MP4 tag reading/writing code" ON)
add_definitions(-DHAVE_CONFIG_H)
set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/")
return reinterpret_cast<TagLib_File *>(new Ogg::Speex::File(filename));
case TagLib_File_TrueAudio:
return reinterpret_cast<TagLib_File *>(new TrueAudio::File(filename));
-#ifdef TAGLIB_WITH_MP4
case TagLib_File_MP4:
return reinterpret_cast<TagLib_File *>(new MP4::File(filename));
-#endif
-#ifdef TAGLIB_WITH_ASF
case TagLib_File_ASF:
return reinterpret_cast<TagLib_File *>(new ASF::File(filename));
-#endif
default:
return 0;
}
riff/aiff/aiffproperties.h
riff/wav/wavfile.h
riff/wav/wavproperties.h
+ asf/asffile.h
+ asf/asfproperties.h
+ asf/asftag.h
+ asf/asfattribute.h
+ asf/asfpicture.h
+ mp4/mp4file.h
+ mp4/mp4atom.h
+ mp4/mp4tag.h
+ mp4/mp4item.h
+ mp4/mp4properties.h
+ mp4/mp4coverart.h
)
-if(WITH_ASF)
- set(tag_HDRS ${tag_HDRS}
- asf/asffile.h
- asf/asfproperties.h
- asf/asftag.h
- asf/asfattribute.h
- asf/asfpicture.h
- )
-endif()
-if(WITH_MP4)
- set(tag_HDRS ${tag_HDRS}
- mp4/mp4file.h
- mp4/mp4atom.h
- mp4/mp4tag.h
- mp4/mp4item.h
- mp4/mp4properties.h
- mp4/mp4coverart.h
- )
-endif()
set(mpeg_SRCS
mpeg/mpegfile.cpp
${mpeg_SRCS} ${id3v1_SRCS} ${id3v2_SRCS} ${frames_SRCS} ${ogg_SRCS}
${vorbis_SRCS} ${oggflacs_SRCS} ${mpc_SRCS} ${ape_SRCS} ${toolkit_SRCS} ${flacs_SRCS}
${wavpack_SRCS} ${speex_SRCS} ${trueaudio_SRCS} ${riff_SRCS} ${aiff_SRCS} ${wav_SRCS}
+ ${asf_SRCS} ${mp4_SRCS}
tag.cpp
tagunion.cpp
fileref.cpp
audioproperties.cpp
)
-if(WITH_ASF)
- set(tag_LIB_SRCS ${tag_LIB_SRCS} ${asf_SRCS})
-endif()
-if(WITH_MP4)
- set(tag_LIB_SRCS ${tag_LIB_SRCS} ${mp4_SRCS})
-endif()
add_library(tag ${tag_LIB_SRCS} ${tag_HDRS})
#include <config.h>
#endif
-#ifdef WITH_ASF
-
#include <taglib.h>
#include <tdebug.h>
#include "asfattribute.h"
d->stream = value;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_ASF
-
#include <tdebug.h>
#include <tbytevectorlist.h>
#include <tstring.h>
return data;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_ASF
-
#include <taglib.h>
#include <tdebug.h>
#include "asfattribute.h"
return ret;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_ASF
-
#include <tdebug.h>
#include <tstring.h>
#include "asfproperties.h"
d->encrypted = encrypted;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_ASF
-
#include "asftag.h"
using namespace TagLib;
d->attributeListMap.isEmpty();
}
-#endif
l.append("wv");
l.append("spx");
l.append("tta");
-#ifdef TAGLIB_WITH_MP4
l.append("m4a");
l.append("m4b");
l.append("m4p");
l.append("3g2");
l.append("mp4");
-#endif
-#ifdef TAGLIB_WITH_ASF
l.append("wma");
l.append("asf");
-#endif
l.append("aif");
l.append("aiff");
l.append("wav");
return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle);
if(ext == "TTA")
return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle);
-#ifdef TAGLIB_WITH_MP4
if(ext == "M4A" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2")
return new MP4::File(fileName, readAudioProperties, audioPropertiesStyle);
-#endif
-#ifdef TAGLIB_WITH_ASF
if(ext == "WMA" || ext == "ASF")
return new ASF::File(fileName, readAudioProperties, audioPropertiesStyle);
-#endif
if(ext == "AIF" || ext == "AIFF")
return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle);
if(ext == "WAV")
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <tdebug.h>
#include <tstring.h>
#include "mp4atom.h"
return path;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <taglib.h>
#include <tdebug.h>
#include "mp4coverart.h"
return d->data;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <tdebug.h>
#include <tstring.h>
#include "mp4atom.h"
return d->tag->save();
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <taglib.h>
#include <tdebug.h>
#include "mp4item.h"
return d->valid;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <tdebug.h>
#include <tstring.h>
#include "mp4file.h"
return d->encrypted;
}
-#endif
#include <config.h>
#endif
-#ifdef WITH_MP4
-
#include <tdebug.h>
#include <tstring.h>
#include "mp4atom.h"
return d->items;
}
-#endif
/* taglib_config.h. Generated by cmake from taglib_config.h.cmake */
-#cmakedefine TAGLIB_WITH_ASF 1
-#cmakedefine TAGLIB_WITH_MP4 1
+#define TAGLIB_WITH_ASF 1
+#define TAGLIB_WITH_MP4 1
test_apetag.cpp
test_wav.cpp
test_wavpack.cpp
+ test_mp4.cpp
+ test_mp4item.cpp
+ test_mp4coverart.cpp
+ test_asf.cpp
)
-IF(WITH_MP4)
- SET(test_runner_SRCS ${test_runner_SRCS}
- test_mp4.cpp
- test_mp4item.cpp
- test_mp4coverart.cpp
- )
-ENDIF(WITH_MP4)
-
-IF(WITH_ASF)
- SET(test_runner_SRCS ${test_runner_SRCS} test_asf.cpp)
-ENDIF(WITH_ASF)
ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
class TestFileRef : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestFileRef);
-#ifdef TAGLIB_WITH_ASF
CPPUNIT_TEST(testASF);
-#endif
CPPUNIT_TEST(testMusepack);
CPPUNIT_TEST(testVorbis);
CPPUNIT_TEST(testSpeex);
CPPUNIT_TEST(testMP3);
CPPUNIT_TEST(testOGA_FLAC);
CPPUNIT_TEST(testOGA_Vorbis);
-#ifdef TAGLIB_WITH_MP4
CPPUNIT_TEST(testMP4_1);
CPPUNIT_TEST(testMP4_2);
CPPUNIT_TEST(testMP4_3);
-#endif
CPPUNIT_TEST(testTrueAudio);
CPPUNIT_TEST(testAPE);
CPPUNIT_TEST_SUITE_END();
fileRefSave("click", ".mpc");
}
-#ifdef TAGLIB_WITH_ASF
void testASF()
{
fileRefSave("silence-1", ".wma");
}
-#endif
void testVorbis()
{
fileRefSave("empty", ".tta");
}
-#ifdef TAGLIB_WITH_MP4
void testMP4_1()
{
fileRefSave("has-tags", ".m4a");
{
fileRefSave("no-tags", ".3g2");
}
-#endif
void testOGA_FLAC()
{