mirror of
https://github.com/taglib/taglib.git
synced 2025-07-29 10:24:37 -04:00
Compile time configuration in public taglib_config.h (#1262)
This allows the client to check which formats are available.
This commit is contained in:
@ -23,10 +23,7 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tbytevector.h"
|
||||
#include "tvariant.h"
|
||||
#include "tzlib.h"
|
||||
@ -35,19 +32,19 @@
|
||||
#include "id3v2tag.h"
|
||||
#include "attachedpictureframe.h"
|
||||
#include "generalencapsulatedobjectframe.h"
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
#include "asfpicture.h"
|
||||
#include "asftag.h"
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
#include "flacpicture.h"
|
||||
#include "flacfile.h"
|
||||
#include "xiphcomment.h"
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
#include "apetag.h"
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
#include "mp4tag.h"
|
||||
#endif
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
@ -84,20 +81,20 @@ class TestComplexProperties : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testSetGetId3Geob);
|
||||
CPPUNIT_TEST(testSetGetId3Picture);
|
||||
CPPUNIT_TEST(testNonExistent);
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
CPPUNIT_TEST(testReadM4aPicture);
|
||||
CPPUNIT_TEST(testSetGetMp4Picture);
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_TEST(testReadOggPicture);
|
||||
CPPUNIT_TEST(testReadWriteFlacPicture);
|
||||
CPPUNIT_TEST(testReadWriteMultipleProperties);
|
||||
CPPUNIT_TEST(testSetGetXiphPicture);
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_TEST(testSetGetApePicture);
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
CPPUNIT_TEST(testSetGetAsfPicture);
|
||||
#endif
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
@ -123,7 +120,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
void testReadM4aPicture()
|
||||
{
|
||||
const ByteVector expectedData1(
|
||||
@ -168,7 +165,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testReadOggPicture()
|
||||
{
|
||||
FileRef f(TEST_FILE_PATH_C("lowercase-fields.ogg"), false);
|
||||
@ -335,7 +332,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(ID3v2::AttachedPictureFrame::FrontCover, frame->type());
|
||||
}
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testSetGetApePicture()
|
||||
{
|
||||
const String FRONT_COVER("COVER ART (FRONT)");
|
||||
@ -353,7 +350,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
void testSetGetAsfPicture()
|
||||
{
|
||||
VariantMap picture(TEST_PICTURE);
|
||||
@ -373,7 +370,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
void testSetGetMp4Picture()
|
||||
{
|
||||
VariantMap picture(TEST_PICTURE);
|
||||
@ -391,7 +388,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testSetGetXiphPicture()
|
||||
{
|
||||
VariantMap picture(TEST_PICTURE);
|
||||
|
@ -23,47 +23,44 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tfilestream.h"
|
||||
#include "tbytevectorstream.h"
|
||||
#include "tag.h"
|
||||
#include "fileref.h"
|
||||
#include "mpegfile.h"
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
#include "oggflacfile.h"
|
||||
#include "vorbisfile.h"
|
||||
#include "speexfile.h"
|
||||
#include "flacfile.h"
|
||||
#include "opusfile.h"
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
#include "mpcfile.h"
|
||||
#include "apefile.h"
|
||||
#include "wavpackfile.h"
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
#include "asffile.h"
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
#include "trueaudiofile.h"
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
#include "mp4file.h"
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
#include "wavfile.h"
|
||||
#include "aifffile.h"
|
||||
#endif
|
||||
#ifdef WITH_MOD
|
||||
#ifdef TAGLIB_WITH_MOD
|
||||
#include "xmfile.h"
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
#include "dsffile.h"
|
||||
#include "dsdifffile.h"
|
||||
#endif
|
||||
@ -75,7 +72,7 @@ using namespace TagLib;
|
||||
|
||||
namespace
|
||||
{
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
class DummyResolver : public FileRef::FileTypeResolver
|
||||
{
|
||||
public:
|
||||
@ -86,7 +83,7 @@ namespace
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
class DummyStreamResolver : public FileRef::StreamTypeResolver
|
||||
{
|
||||
public:
|
||||
@ -111,15 +108,15 @@ class TestFileRef : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testAudioProperties);
|
||||
CPPUNIT_TEST(testDefaultFileExtensions);
|
||||
CPPUNIT_TEST(testFileResolver);
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
CPPUNIT_TEST(testASF);
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_TEST(testMusepack);
|
||||
CPPUNIT_TEST(testAPE);
|
||||
CPPUNIT_TEST(testWavPack);
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_TEST(testVorbis);
|
||||
CPPUNIT_TEST(testSpeex);
|
||||
CPPUNIT_TEST(testFLAC);
|
||||
@ -127,21 +124,21 @@ class TestFileRef : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testOGA_Vorbis);
|
||||
CPPUNIT_TEST(testOpus);
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
CPPUNIT_TEST(testMP4_1);
|
||||
CPPUNIT_TEST(testMP4_2);
|
||||
CPPUNIT_TEST(testMP4_3);
|
||||
CPPUNIT_TEST(testMP4_4);
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
CPPUNIT_TEST(testTrueAudio);
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_TEST(testWav);
|
||||
CPPUNIT_TEST(testAIFF_1);
|
||||
CPPUNIT_TEST(testAIFF_2);
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
CPPUNIT_TEST(testDSF);
|
||||
CPPUNIT_TEST(testDSDIFF);
|
||||
#endif
|
||||
@ -277,21 +274,21 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testMusepack()
|
||||
{
|
||||
fileRefSave<MPC::File>("click", ".mpc");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
void testASF()
|
||||
{
|
||||
fileRefSave<ASF::File>("silence-1", ".wma");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testVorbis()
|
||||
{
|
||||
fileRefSave<Ogg::Vorbis::File>("empty", ".ogg");
|
||||
@ -313,14 +310,14 @@ public:
|
||||
fileRefSave<MPEG::File>("xing", ".mp3");
|
||||
}
|
||||
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
void testTrueAudio()
|
||||
{
|
||||
fileRefSave<TrueAudio::File>("empty", ".tta");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
void testMP4_1()
|
||||
{
|
||||
fileRefSave<MP4::File>("has-tags", ".m4a");
|
||||
@ -342,14 +339,14 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
void testWav()
|
||||
{
|
||||
fileRefSave<RIFF::WAV::File>("empty", ".wav");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testOGA_FLAC()
|
||||
{
|
||||
fileRefSave<Ogg::FLAC::File>("empty_flac", ".oga");
|
||||
@ -361,14 +358,14 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testAPE()
|
||||
{
|
||||
fileRefSave<APE::File>("mac-399", ".ape");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
void testAIFF_1()
|
||||
{
|
||||
fileRefSave<RIFF::AIFF::File>("empty", ".aiff");
|
||||
@ -380,21 +377,21 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testWavPack()
|
||||
{
|
||||
fileRefSave<WavPack::File>("click", ".wv");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testOpus()
|
||||
{
|
||||
fileRefSave<Ogg::Opus::File>("correctness_gain_silent_output", ".opus");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
void testDSF()
|
||||
{
|
||||
fileRefSave<DSF::File>("empty10ms",".dsf");
|
||||
@ -426,54 +423,54 @@ public:
|
||||
void testDefaultFileExtensions()
|
||||
{
|
||||
const StringList extensions = FileRef::defaultFileExtensions();
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT(extensions.contains("mpc"));
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
CPPUNIT_ASSERT(extensions.contains("wma"));
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_ASSERT(extensions.contains("ogg"));
|
||||
CPPUNIT_ASSERT(extensions.contains("spx"));
|
||||
CPPUNIT_ASSERT(extensions.contains("flac"));
|
||||
#endif
|
||||
CPPUNIT_ASSERT(extensions.contains("mp3"));
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
CPPUNIT_ASSERT(extensions.contains("tta"));
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
CPPUNIT_ASSERT(extensions.contains("m4a"));
|
||||
CPPUNIT_ASSERT(extensions.contains("3g2"));
|
||||
CPPUNIT_ASSERT(extensions.contains("m4v"));
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_ASSERT(extensions.contains("wav"));
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_ASSERT(extensions.contains("oga"));
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT(extensions.contains("ape"));
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_ASSERT(extensions.contains("aiff"));
|
||||
CPPUNIT_ASSERT(extensions.contains("aifc"));
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT(extensions.contains("wv"));
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_ASSERT(extensions.contains("opus"));
|
||||
#endif
|
||||
#ifdef WITH_MOD
|
||||
#ifdef TAGLIB_WITH_MOD
|
||||
CPPUNIT_ASSERT(extensions.contains("xm"));
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
CPPUNIT_ASSERT(extensions.contains("dsf"));
|
||||
CPPUNIT_ASSERT(extensions.contains("dff"));
|
||||
CPPUNIT_ASSERT(extensions.contains("dsdiff"));
|
||||
#endif
|
||||
#ifdef WITH_SHORTEN
|
||||
#ifdef TAGLIB_WITH_SHORTEN
|
||||
CPPUNIT_ASSERT(extensions.contains("shn"));
|
||||
#endif
|
||||
}
|
||||
@ -485,7 +482,7 @@ public:
|
||||
CPPUNIT_ASSERT(dynamic_cast<MPEG::File *>(f.file()) != nullptr);
|
||||
}
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
DummyResolver resolver;
|
||||
FileRef::addFileTypeResolver(&resolver);
|
||||
|
||||
@ -495,7 +492,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
DummyStreamResolver streamResolver;
|
||||
FileRef::addFileTypeResolver(&streamResolver);
|
||||
|
||||
|
@ -23,13 +23,10 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "mpegproperties.h"
|
||||
#include "tbytevector.h"
|
||||
#include "tpropertymap.h"
|
||||
@ -37,19 +34,19 @@
|
||||
#include "id3v2tag.h"
|
||||
#include "id3v2frame.h"
|
||||
#include "id3v2framefactory.h"
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
#include "flacproperties.h"
|
||||
#include "flacfile.h"
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
#include "trueaudiofile.h"
|
||||
#include "trueaudioproperties.h"
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
#include "wavfile.h"
|
||||
#include "aifffile.h"
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
#include "dsffile.h"
|
||||
#include "dsdifffile.h"
|
||||
#endif
|
||||
@ -130,17 +127,17 @@ class TestId3v2FrameFactory : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestId3v2FrameFactory);
|
||||
CPPUNIT_TEST(testMPEG);
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_TEST(testFLAC);
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
CPPUNIT_TEST(testTrueAudio);
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_TEST(testWAV);
|
||||
CPPUNIT_TEST(testAIFF);
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
CPPUNIT_TEST(testDSF);
|
||||
CPPUNIT_TEST(testDSDIFF);
|
||||
#endif
|
||||
@ -256,7 +253,7 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testFLAC()
|
||||
{
|
||||
ScopedFileCopy copy("no-tags", ".flac");
|
||||
@ -283,7 +280,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
void testTrueAudio()
|
||||
{
|
||||
ScopedFileCopy copy("empty", ".tta");
|
||||
@ -310,7 +307,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
void testWAV()
|
||||
{
|
||||
ScopedFileCopy copy("empty", ".wav");
|
||||
@ -362,7 +359,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
void testDSF()
|
||||
{
|
||||
ScopedFileCopy copy("empty10ms", ".dsf");
|
||||
|
@ -23,20 +23,17 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <array>
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tstring.h"
|
||||
#include "tpropertymap.h"
|
||||
#include "mpegfile.h"
|
||||
#include "id3v2tag.h"
|
||||
#include "id3v1tag.h"
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
#include "apetag.h"
|
||||
#endif
|
||||
#include "mpegproperties.h"
|
||||
@ -73,7 +70,7 @@ class TestMPEG : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testRepeatedSave3);
|
||||
CPPUNIT_TEST(testEmptyID3v2);
|
||||
CPPUNIT_TEST(testEmptyID3v1);
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_TEST(testEmptyAPE);
|
||||
#endif
|
||||
CPPUNIT_TEST(testIgnoreGarbage);
|
||||
@ -312,7 +309,7 @@ public:
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
f.ID3v2Tag(true)->setTitle("ID3v2");
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
f.APETag(true)->setTitle("APE");
|
||||
#endif
|
||||
f.ID3v1Tag(true)->setTitle("ID3v1");
|
||||
@ -322,7 +319,7 @@ public:
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String("ID3v2"), f.properties()["TITLE"].front());
|
||||
f.strip(MPEG::File::ID3v2);
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT_EQUAL(String("APE"), f.properties()["TITLE"].front());
|
||||
f.strip(MPEG::File::APE);
|
||||
#endif
|
||||
@ -476,21 +473,21 @@ public:
|
||||
CPPUNIT_ASSERT(!f.hasAPETag());
|
||||
CPPUNIT_ASSERT(!f.hasID3v1Tag());
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
f.APETag(true)->setTitle("01234 56789 ABCDE FGHIJ");
|
||||
f.save();
|
||||
f.APETag()->setTitle("0");
|
||||
f.save();
|
||||
#endif
|
||||
f.ID3v1Tag(true)->setTitle("01234 56789 ABCDE FGHIJ");
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
f.APETag()->setTitle("01234 56789 ABCDE FGHIJ 01234 56789 ABCDE FGHIJ 01234 56789");
|
||||
#endif
|
||||
f.save();
|
||||
}
|
||||
{
|
||||
MPEG::File f(copy.fileName().c_str());
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT(f.hasAPETag());
|
||||
#endif
|
||||
CPPUNIT_ASSERT(f.hasID3v1Tag());
|
||||
@ -537,7 +534,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testEmptyAPE()
|
||||
{
|
||||
ScopedFileCopy copy("xing", ".mp3");
|
||||
|
@ -23,27 +23,24 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tpropertymap.h"
|
||||
#include "tag.h"
|
||||
#include "id3v1tag.h"
|
||||
#include "id3v2tag.h"
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
#include "apetag.h"
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
#include "asftag.h"
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
#include "infotag.h"
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
#include "mp4tag.h"
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
#include "xiphcomment.h"
|
||||
#endif
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
@ -58,19 +55,19 @@ class TestPropertyMap : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testGetSetId3v1);
|
||||
CPPUNIT_TEST(testGetSetId3v2);
|
||||
CPPUNIT_TEST(testGetSet);
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_TEST(testGetSetApe);
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
CPPUNIT_TEST(testGetSetAsf);
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_TEST(testGetSetInfo);
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
CPPUNIT_TEST(testGetSetMp4);
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_TEST(testGetSetXiphComment);
|
||||
#endif
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
@ -165,35 +162,35 @@ public:
|
||||
tagGetSet<ID3v2::Tag>();
|
||||
}
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testGetSetXiphComment()
|
||||
{
|
||||
tagGetSet<Ogg::XiphComment>();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
void testGetSetApe()
|
||||
{
|
||||
tagGetSet<APE::Tag>();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
void testGetSetAsf()
|
||||
{
|
||||
tagGetSet<ASF::Tag>();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
void testGetSetMp4()
|
||||
{
|
||||
tagGetSet<MP4::Tag>();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
void testGetSetInfo()
|
||||
{
|
||||
tagGetSet<RIFF::Info::Tag>();
|
||||
|
@ -23,12 +23,9 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tag.h"
|
||||
#include "tbytevector.h"
|
||||
#include "tbytevectorlist.h"
|
||||
@ -72,7 +69,7 @@
|
||||
#include "unknownframe.h"
|
||||
#include "unsynchronizedlyricsframe.h"
|
||||
#include "urllinkframe.h"
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
#include "aifffile.h"
|
||||
#include "aiffproperties.h"
|
||||
#include "infotag.h"
|
||||
@ -80,7 +77,7 @@
|
||||
#include "wavfile.h"
|
||||
#include "wavproperties.h"
|
||||
#endif
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
#include "apefile.h"
|
||||
#include "apefooter.h"
|
||||
#include "apeitem.h"
|
||||
@ -91,20 +88,20 @@
|
||||
#include "wavpackfile.h"
|
||||
#include "wavpackproperties.h"
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
#include "asfattribute.h"
|
||||
#include "asffile.h"
|
||||
#include "asfpicture.h"
|
||||
#include "asfproperties.h"
|
||||
#include "asftag.h"
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
#include "dsffile.h"
|
||||
#include "dsfproperties.h"
|
||||
#include "dsdifffile.h"
|
||||
#include "dsdiffproperties.h"
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
#include "flacfile.h"
|
||||
#include "flacmetadatablock.h"
|
||||
#include "flacunknownmetadatablock.h"
|
||||
@ -122,7 +119,7 @@
|
||||
#include "vorbisproperties.h"
|
||||
#include "xiphcomment.h"
|
||||
#endif
|
||||
#ifdef WITH_MOD
|
||||
#ifdef TAGLIB_WITH_MOD
|
||||
#include "itfile.h"
|
||||
#include "itproperties.h"
|
||||
#include "modfile.h"
|
||||
@ -134,7 +131,7 @@
|
||||
#include "xmfile.h"
|
||||
#include "xmproperties.h"
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
#include "mp4coverart.h"
|
||||
#include "mp4file.h"
|
||||
#include "mp4item.h"
|
||||
@ -142,12 +139,12 @@
|
||||
#include "mp4properties.h"
|
||||
#include "mp4tag.h"
|
||||
#endif
|
||||
#ifdef WITH_SHORTEN
|
||||
#ifdef TAGLIB_WITH_SHORTEN
|
||||
#include "shortenfile.h"
|
||||
#include "shortenproperties.h"
|
||||
#include "shortentag.h"
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
#include "trueaudiofile.h"
|
||||
#include "trueaudioproperties.h"
|
||||
#endif
|
||||
@ -219,7 +216,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::String));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(2, false), sizeof(TagLib::StringList));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::Tag));
|
||||
#ifdef WITH_APE
|
||||
#ifdef TAGLIB_WITH_APE
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::APE::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Footer));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(0, false), sizeof(TagLib::APE::Item));
|
||||
@ -230,21 +227,21 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::WavPack::Properties));
|
||||
#endif
|
||||
#ifdef WITH_ASF
|
||||
#ifdef TAGLIB_WITH_ASF
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Attribute));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::ASF::Picture));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::ASF::Tag));
|
||||
#endif
|
||||
#ifdef WITH_DSF
|
||||
#ifdef TAGLIB_WITH_DSF
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::DIIN::Tag));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSDIFF::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::DSF::Properties));
|
||||
#endif
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(0, true), sizeof(TagLib::FLAC::MetadataBlock));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::FLAC::Picture));
|
||||
@ -262,7 +259,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Ogg::Vorbis::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Ogg::XiphComment));
|
||||
#endif
|
||||
#ifdef WITH_MOD
|
||||
#ifdef TAGLIB_WITH_MOD
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::IT::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::IT::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::Mod::File));
|
||||
@ -275,7 +272,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::XM::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::Variant));
|
||||
#endif
|
||||
#ifdef WITH_MP4
|
||||
#ifdef TAGLIB_WITH_MP4
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::CoverArt));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, false), sizeof(TagLib::MP4::Item));
|
||||
@ -283,7 +280,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::MP4::Tag));
|
||||
#endif
|
||||
#ifdef WITH_RIFF
|
||||
#ifdef TAGLIB_WITH_RIFF
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::RIFF::AIFF::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::AIFF::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::File));
|
||||
@ -292,12 +289,12 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(2, true), sizeof(TagLib::RIFF::WAV::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::RIFF::WAV::Properties));
|
||||
#endif
|
||||
#ifdef WITH_SHORTEN
|
||||
#ifdef TAGLIB_WITH_SHORTEN
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Properties));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::Shorten::Tag));
|
||||
#endif
|
||||
#ifdef WITH_TRUEAUDIO
|
||||
#ifdef TAGLIB_WITH_TRUEAUDIO
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::File));
|
||||
CPPUNIT_ASSERT_EQUAL(classSize(1, true), sizeof(TagLib::TrueAudio::Properties));
|
||||
#endif
|
||||
|
@ -23,14 +23,11 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <list>
|
||||
|
||||
#include "taglib_config.h"
|
||||
#include "tag_c.h"
|
||||
#include "tbytevector.h"
|
||||
#include "tstring.h"
|
||||
@ -81,7 +78,7 @@ class TestTagC : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestTagC);
|
||||
CPPUNIT_TEST(testMp3);
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
CPPUNIT_TEST(testStream);
|
||||
#endif
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
@ -171,7 +168,7 @@ public:
|
||||
taglib_tag_free_strings();
|
||||
}
|
||||
|
||||
#ifdef WITH_VORBIS
|
||||
#ifdef TAGLIB_WITH_VORBIS
|
||||
void testStream()
|
||||
{
|
||||
// Only fetch the beginning of a FLAC file
|
||||
|
Reference in New Issue
Block a user