From kde-commits Sat Jul 03 11:32:27 2010 From: =?utf-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 03 Jul 2010 11:32:27 +0000 To: kde-commits Subject: kdesupport/taglib Message-Id: <20100703113227.81C86AC8E3 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=127815622308205 SVN commit 1145554 by lalinsky: Support for reading/writing tags from Monkey's Audio files Patch by Alex Novichkov, slightly modified by me (code formatting + tests). M +5 -0 NEWS M +2 -0 taglib/CMakeLists.txt M +1 -1 taglib/ape/CMakeLists.txt M +2 -2 taglib/ape/Makefile.am A taglib/ape/apefile.cpp [License: LGPL (v2.1) (wrong address)] A taglib/ape/apefile.h [License: LGPL (v2.1) (wrong address)] A taglib/ape/apeproperties.cpp [License: LGPL (v2.1) (wrong address)] A taglib/ape/apeproperties.h [License: LGPL (v2.1) (wrong address)] M +1 -1 taglib/ape/apetag.h M +8 -0 taglib/fileref.cpp M +2 -0 tests/CMakeLists.txt M +2 -0 tests/Makefile.am AM tests/data/mac-390-hdr.ape AM tests/data/mac-396.ape AM tests/data/mac-399.ape A tests/test_ape.cpp [License: UNKNOWN] M +5 -0 tests/test_fileref.cpp --- trunk/kdesupport/taglib/NEWS #1145553:1145554 @@ -1,3 +1,8 @@ +TagLib 1.7 +========== + + * Support for reading/writing tags from Monkey's Audio files. + TagLib 1.6.3 (Apr 17, 2010) =========================== --- trunk/kdesupport/taglib/taglib/CMakeLists.txt #1145553:1145554 @@ -121,6 +121,8 @@ ape/apetag.cpp ape/apefooter.cpp ape/apeitem.cpp +ape/apefile.cpp +ape/apeproperties.cpp ) SET(wavpack_SRCS --- trunk/kdesupport/taglib/taglib/ape/CMakeLists.txt #1145553:1145554 @@ -1 +1 @@ -INSTALL( FILES apetag.h apefooter.h apeitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) +INSTALL( FILES apefile.h apeproperties.h apetag.h apefooter.h apeitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/taglib) --- trunk/kdesupport/taglib/taglib/ape/Makefile.am #1145553:1145554 @@ -6,7 +6,7 @@ noinst_LTLIBRARIES = libape.la -libape_la_SOURCES = apetag.cpp apefooter.cpp apeitem.cpp +libape_la_SOURCES = apetag.cpp apefooter.cpp apeitem.cpp apefile.cpp apeproperties.cpp -taglib_include_HEADERS = apetag.h apefooter.h apeitem.h +taglib_include_HEADERS = apetag.h apefooter.h apeitem.h apefile.h apeproperties.cpp taglib_includedir = $(includedir)/taglib --- trunk/kdesupport/taglib/taglib/ape/apetag.h #1145553:1145554 @@ -66,7 +66,7 @@ * Create an APE tag and parse the data in \a file with APE footer at * \a tagOffset. */ - Tag(File *file, long footerLocation); + Tag(TagLib::File *file, long footerLocation); /*! * Destroys this Tag instance. --- trunk/kdesupport/taglib/taglib/fileref.cpp #1145553:1145554 @@ -1,6 +1,10 @@ /*************************************************************************** copyright : (C) 2002 - 2008 by Scott Wheeler email : wheeler@kde.org + + copyright : (C) 2010 by Alex Novichkov + email : novichko@atnet.ru + (added APE file support) ***************************************************************************/ /*************************************************************************** @@ -44,6 +48,7 @@ #include "trueaudiofile.h" #include "aifffile.h" #include "wavfile.h" +#include "apefile.h" using namespace TagLib; @@ -156,6 +161,7 @@ l.append("aif"); l.append("aiff"); l.append("wav"); + l.append("ape"); return l; } @@ -254,6 +260,8 @@ return new RIFF::WAV::File(fileName, readAudioProperties, audioPropertiesStyle); if(ext == "AIFF") return new RIFF::AIFF::File(fileName, readAudioProperties, audioPropertiesStyle); + if(ext == "APE") + return new APE::File(fileName, readAudioProperties, audioPropertiesStyle); } return 0; --- trunk/kdesupport/taglib/tests/CMakeLists.txt #1145553:1145554 @@ -3,6 +3,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../taglib ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit + ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/asf ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v1 ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2 @@ -37,6 +38,7 @@ test_ogg.cpp test_oggflac.cpp test_flac.cpp + test_ape.cpp ) IF(WITH_MP4) SET(test_runner_SRCS ${test_runner_SRCS} --- trunk/kdesupport/taglib/tests/Makefile.am #1145553:1145554 @@ -2,6 +2,7 @@ -I$(top_srcdir)/taglib\ -I$(top_srcdir)/taglib/toolkit \ -I$(top_srcdir)/taglib/trueaudio \ + -I$(top_srcdir)/taglib/ape \ -I$(top_srcdir)/taglib/mpeg \ -I$(top_srcdir)/taglib/mpeg/id3v1 \ -I$(top_srcdir)/taglib/mpeg/id3v2 \ @@ -19,6 +20,7 @@ test_map.cpp \ test_mpeg.cpp \ test_synchdata.cpp \ + test_ape.cpp \ test_trueaudio.cpp \ test_bytevector.cpp \ test_string.cpp \ --- trunk/kdesupport/taglib/tests/test_fileref.cpp #1145553:1145554 @@ -32,6 +32,7 @@ CPPUNIT_TEST(testMP4_3); #endif CPPUNIT_TEST(testTrueAudio); + CPPUNIT_TEST(testAPE); CPPUNIT_TEST_SUITE_END(); public: @@ -148,6 +149,10 @@ CPPUNIT_ASSERT(dynamic_cast(f->file()) == NULL); } + void testAPE() + { + fileRefSave("mac-399.ape", ".ape"); + } }; CPPUNIT_TEST_SUITE_REGISTRATION(TestFileRef);