Hello community,
here is the log from the commit of package taglib for openSUSE:Factory
checked in at Fri Apr 16 01:41:53 CEST 2010.
--------
--- KDE/taglib/taglib.changes 2010-02-01 13:33:07.000000000 +0100
+++ /mounts/work_src_done/STABLE/taglib/taglib.changes 2010-04-11 19:08:33.000000000 +0200
@@ -1,0 +2,16 @@
+Sun Apr 11 17:07:36 UTC 2010 - tittiatcoke@gmail.com
+
+- update to version 1.6.2
+ * Read Vorbis Comments from the first FLAC metadata block,
+ if there are multipe ones.
+ * Fixed a memory leak in FileRef's OGA format detection.
+ * Fixed compilation with the Sun Studio compiler.
+ * Handle WM/TrackNumber attributes with DWORD content in WMA files.
+ * More strict check if something is a valid MP4 file.
+ * Correctly save MP4 int-pair atoms with flags set to 0.
+ * Fixed compilation of the test runner on Windows.
+ * Store ASF attributes larger than 64k in the metadata library object.
+ * Ignore trailing non-data atoms when parsing MP4 covr atoms.
+ * Don't upgrade ID3v2.2 frame TDA to TDRC.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
taglib-1.6.1.tar.bz2
New:
----
taglib-1.6.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ taglib.spec ++++++
--- /var/tmp/diff_new_pack.VNxppN/_old 2010-04-16 01:41:31.000000000 +0200
+++ /var/tmp/diff_new_pack.VNxppN/_new 2010-04-16 01:41:31.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package taglib (Version 1.6.1)
+# spec file for package taglib (Version 1.6.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -32,8 +32,8 @@
Obsoletes: taglib-64bit
%endif
#
-Version: 1.6.1
-Release: 2
+Version: 1.6.2
+Release: 1
Source0: %name-%version.tar.bz2
Source1: %name.desktop
Source2: baselibs.conf
++++++ taglib-1.6.1.tar.bz2 -> taglib-1.6.2.tar.bz2 ++++++
++++ 14611 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/Makefile.am new/taglib-1.6.2/Makefile.am
--- old/taglib-1.6.1/Makefile.am 2009-10-31 11:04:27.000000000 +0100
+++ new/taglib-1.6.2/Makefile.am 2010-04-04 17:01:21.000000000 +0200
@@ -21,9 +21,9 @@
package-messages:
$(MAKE) -f admin/Makefile.common package-messages
-#dist-hook:
-# cd $(top_distdir) && perl admin/am_edit -padmin
-# cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
+dist-hook:
+ cd $(top_distdir) && perl admin/am_edit -padmin
+ cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
examples: examples-all
@@ -38,7 +38,7 @@
fi; \
cp $(top_srcdir)/admin/Doxyfile.global taglib.doxyfile; \
echo "PROJECT_NAME = TagLib" >> taglib.doxyfile; \
- echo "PROJECT_NUMBER = \"Version 1.6.1\"" >> taglib.doxyfile; \
+ echo "PROJECT_NUMBER = \"Version 1.6.2\"" >> taglib.doxyfile; \
echo "INPUT = $(srcdir)" >> taglib.doxyfile; \
echo "OUTPUT_DIRECTORY = doc/api" >> taglib.doxyfile; \
echo "HTML_OUTPUT = html" >> taglib.doxyfile; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/NEWS new/taglib-1.6.2/NEWS
--- old/taglib-1.6.1/NEWS 2009-10-31 10:23:58.000000000 +0100
+++ new/taglib-1.6.2/NEWS 2010-04-09 11:37:51.000000000 +0200
@@ -1,3 +1,19 @@
+TagLib 1.6.2 (Apr 9, 2010)
+==========================
+
+ * Read Vorbis Comments from the first FLAC metadata block, if there are
+ multipe ones. (BUG:211089)
+ * Fixed a memory leak in FileRef's OGA format detection.
+ * Fixed compilation with the Sun Studio compiler. (BUG:215225)
+ * Handle WM/TrackNumber attributes with DWORD content in WMA files.
+ (BUG:218526)
+ * More strict check if something is a valid MP4 file. (BUG:216819)
+ * Correctly save MP4 int-pair atoms with flags set to 0.
+ * Fixed compilation of the test runner on Windows.
+ * Store ASF attributes larger than 64k in the metadata library object.
+ * Ignore trailing non-data atoms when parsing MP4 covr atoms.
+ * Don't upgrade ID3v2.2 frame TDA to TDRC. (BUG:228968)
+
TagLib 1.6.1 (Oct 31, 2009)
===========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/bindings/c/CMakeLists.txt new/taglib-1.6.2/bindings/c/CMakeLists.txt
--- old/taglib-1.6.1/bindings/c/CMakeLists.txt 2009-09-08 10:52:57.000000000 +0200
+++ new/taglib-1.6.2/bindings/c/CMakeLists.txt 2009-11-25 19:45:13.000000000 +0100
@@ -37,8 +37,13 @@
# the only game in town, the three available STLs -- Cstd,
# stlport4 and stdcxx -- make this a mess. The KDE-Solaris
# team supports stdcxx (Apache RogueWave stdcxx 4.1.3).
- #
- TARGET_LINK_LIBRARIES(tag_c stdcxx Crun)
+
+ # According to http://bugs.kde.org/show_bug.cgi?id=215225 the library can have the following two names:
+ FIND_LIBRARY(ROGUEWAVE_STDCXX_LIBRARY NAMES stdcxx4 stdcxx)
+ IF(NOT ROGUEWAVE_STDCXX_LIBRARY)
+ MESSAGE(FATAL_ERROR "Did not find supported STL library (tried stdcxx4 and stdcxx)")
+ ENDIF(NOT ROGUEWAVE_STDCXX_LIBRARY)
+ TARGET_LINK_LIBRARIES(tag_c ${ROGUEWAVE_STDCXX_LIBRARY} Crun)
ENDIF(HAVE_CRUN_LIB)
SET_TARGET_PROPERTIES(tag_c PROPERTIES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/bindings/c/taglib_c.pc.in new/taglib-1.6.2/bindings/c/taglib_c.pc.in
--- old/taglib-1.6.1/bindings/c/taglib_c.pc.in 2009-10-31 10:57:13.000000000 +0100
+++ new/taglib-1.6.2/bindings/c/taglib_c.pc.in 2010-04-04 17:01:21.000000000 +0200
@@ -6,6 +6,6 @@
Name: TagLib C Bindings
Description: Audio meta-data library (C bindings)
Requires: taglib
-Version: 1.6.1
+Version: 1.6.2
Libs: -L${libdir} -ltag_c
Cflags: -I${includedir}/taglib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/configure.in new/taglib-1.6.2/configure.in
--- old/taglib-1.6.1/configure.in 2009-10-31 11:04:35.000000000 +0100
+++ new/taglib-1.6.2/configure.in 2010-04-09 11:35:53.000000000 +0200
@@ -42,7 +42,7 @@
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
-AM_INIT_AUTOMAKE(taglib,1.6.1)
+AM_INIT_AUTOMAKE(taglib,1.6.2)
dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
dnl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/configure.in.in new/taglib-1.6.2/configure.in.in
--- old/taglib-1.6.1/configure.in.in 2009-10-31 10:23:58.000000000 +0100
+++ new/taglib-1.6.2/configure.in.in 2010-04-04 17:01:21.000000000 +0200
@@ -38,7 +38,7 @@
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
-AM_INIT_AUTOMAKE(taglib,1.6.1)
+AM_INIT_AUTOMAKE(taglib,1.6.2)
dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
dnl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/doc/api-header.html new/taglib-1.6.2/doc/api-header.html
--- old/taglib-1.6.1/doc/api-header.html 2009-10-31 10:43:51.000000000 +0100
+++ new/taglib-1.6.2/doc/api-header.html 2010-04-04 17:01:21.000000000 +0200
@@ -17,7 +17,7 @@
<td>
<div id="intro">
<table border="0" height="119" cellpadding="0" cellspacing="0" width="100%">
- <tr><td valign="top"><h1>TagLib 1.6.1 ($title)</h1></td></tr>
+ <tr><td valign="top"><h1>TagLib 1.6.2 ($title)</h1></td></tr>
<tr>
<td valign="bottom">
<div id="links">
Files old/taglib-1.6.1/doc/taglib.png and new/taglib-1.6.2/doc/taglib.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/examples/tagreader_c.c new/taglib-1.6.2/examples/tagreader_c.c
--- old/taglib-1.6.1/examples/tagreader_c.c 2004-09-05 19:54:00.000000000 +0200
+++ new/taglib-1.6.2/examples/tagreader_c.c 2009-12-12 17:44:34.000000000 +0100
@@ -51,23 +51,27 @@
tag = taglib_file_tag(file);
properties = taglib_file_audioproperties(file);
- printf("-- TAG --\n");
- printf("title - \"%s\"\n", taglib_tag_title(tag));
- printf("artist - \"%s\"\n", taglib_tag_artist(tag));
- printf("album - \"%s\"\n", taglib_tag_album(tag));
- printf("year - \"%i\"\n", taglib_tag_year(tag));
- printf("comment - \"%s\"\n", taglib_tag_comment(tag));
- printf("track - \"%i\"\n", taglib_tag_track(tag));
- printf("genre - \"%s\"\n", taglib_tag_genre(tag));
+ if(tag != NULL) {
+ printf("-- TAG --\n");
+ printf("title - \"%s\"\n", taglib_tag_title(tag));
+ printf("artist - \"%s\"\n", taglib_tag_artist(tag));
+ printf("album - \"%s\"\n", taglib_tag_album(tag));
+ printf("year - \"%i\"\n", taglib_tag_year(tag));
+ printf("comment - \"%s\"\n", taglib_tag_comment(tag));
+ printf("track - \"%i\"\n", taglib_tag_track(tag));
+ printf("genre - \"%s\"\n", taglib_tag_genre(tag));
+ }
- seconds = taglib_audioproperties_length(properties) % 60;
- minutes = (taglib_audioproperties_length(properties) - seconds) / 60;
+ if(properties != NULL) {
+ seconds = taglib_audioproperties_length(properties) % 60;
+ minutes = (taglib_audioproperties_length(properties) - seconds) / 60;
- printf("-- AUDIO --\n");
- printf("bitrate - %i\n", taglib_audioproperties_bitrate(properties));
- printf("sample rate - %i\n", taglib_audioproperties_samplerate(properties));
- printf("channels - %i\n", taglib_audioproperties_channels(properties));
- printf("length - %i:%02i\n", minutes, seconds);
+ printf("-- AUDIO --\n");
+ printf("bitrate - %i\n", taglib_audioproperties_bitrate(properties));
+ printf("sample rate - %i\n", taglib_audioproperties_samplerate(properties));
+ printf("channels - %i\n", taglib_audioproperties_channels(properties));
+ printf("length - %i:%02i\n", minutes, seconds);
+ }
taglib_tag_free_strings();
taglib_file_free(file);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/Makefile.am new/taglib-1.6.2/taglib/Makefile.am
--- old/taglib-1.6.1/taglib/Makefile.am 2009-10-31 10:23:58.000000000 +0100
+++ new/taglib-1.6.2/taglib/Makefile.am 2010-04-04 17:31:23.000000000 +0200
@@ -46,8 +46,9 @@
# 7:0:6 -- TagLib 1.6 RC1
# 7:1:6 -- TagLib 1.6
# 8:0:7 -- TagLib 1.6.1
+# 9:0:8 -- TagLib 1.6.2
-libtag_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 8:0:7
+libtag_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 9:0:8
libtag_la_LIBADD = ./mpeg/libmpeg.la ./ogg/libogg.la ./flac/libflac.la ./mpc/libmpc.la \
./ape/libape.la ./toolkit/libtoolkit.la ./wavpack/libwavpack.la \
./trueaudio/libtrueaudio.la ./riff/libriff.la \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/asf/asfattribute.cpp new/taglib-1.6.2/taglib/asf/asfattribute.cpp
--- old/taglib-1.6.1/taglib/asf/asfattribute.cpp 2009-09-08 09:26:12.000000000 +0200
+++ new/taglib-1.6.2/taglib/asf/asfattribute.cpp 2010-04-02 13:53:28.000000000 +0200
@@ -30,6 +30,7 @@
#ifdef WITH_ASF
#include
+#include
#include "asfattribute.h"
#include "asffile.h"
@@ -197,6 +198,10 @@
name = f.readString(nameLength);
}
+ if(kind != 2 && size > 65535) {
+ debug("ASF::Attribute::parse() -- Value larger than 64kB");
+ }
+
switch(d->type) {
case WordType:
d->shortValue = f.readWORD();
@@ -232,6 +237,27 @@
return name;
}
+int
+ASF::Attribute::dataSize() const
+{
+ switch (d->type) {
+ case WordType:
+ return 2;
+ case BoolType:
+ return 4;
+ case DWordType:
+ return 4;
+ case QWordType:
+ return 5;
+ case UnicodeType:
+ return d->stringValue.size() * 2 + 2;
+ case BytesType:
+ case GuidType:
+ return d->byteVectorValue.size();
+ }
+ return 0;
+}
+
ByteVector
ASF::Attribute::render(const String &name, int kind) const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/asf/asfattribute.h new/taglib-1.6.2/taglib/asf/asfattribute.h
--- old/taglib-1.6.1/taglib/asf/asfattribute.h 2009-10-09 23:03:59.000000000 +0200
+++ new/taglib-1.6.2/taglib/asf/asfattribute.h 2010-04-02 13:53:28.000000000 +0200
@@ -165,6 +165,9 @@
String parse(ASF::File &file, int kind = 0);
#endif
+ //! Returns the size of the stored data
+ int dataSize() const;
+
private:
friend class File;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/asf/asffile.cpp new/taglib-1.6.2/taglib/asf/asffile.cpp
--- old/taglib-1.6.1/taglib/asf/asffile.cpp 2009-09-08 09:26:12.000000000 +0200
+++ new/taglib-1.6.2/taglib/asf/asffile.cpp 2010-04-02 13:53:28.000000000 +0200
@@ -480,11 +480,12 @@
bool inMetadataObject = false;
for(unsigned int j = 0; j < attributes.size(); j++) {
const Attribute &attribute = attributes[j];
- if(!inExtendedContentDescriptionObject && attribute.language() == 0 && attribute.stream() == 0) {
+ bool largeValue = attribute.dataSize() > 65535;
+ if(!inExtendedContentDescriptionObject && !largeValue && attribute.language() == 0 && attribute.stream() == 0) {
d->extendedContentDescriptionObject->attributeData.append(attribute.render(name));
inExtendedContentDescriptionObject = true;
}
- else if(!inMetadataObject && attribute.language() == 0 && attribute.stream() != 0) {
+ else if(!inMetadataObject && !largeValue && attribute.language() == 0 && attribute.stream() != 0) {
d->metadataObject->attributeData.append(attribute.render(name, 1));
inMetadataObject = true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/asf/asftag.cpp new/taglib-1.6.2/taglib/asf/asftag.cpp
--- old/taglib-1.6.1/taglib/asf/asftag.cpp 2009-09-08 09:26:12.000000000 +0200
+++ new/taglib-1.6.2/taglib/asf/asftag.cpp 2009-12-13 16:32:55.000000000 +0100
@@ -105,8 +105,13 @@
unsigned int
ASF::Tag::track() const
{
- if(d->attributeListMap.contains("WM/TrackNumber"))
- return d->attributeListMap["WM/TrackNumber"][0].toString().toInt();
+ if(d->attributeListMap.contains("WM/TrackNumber")) {
+ const ASF::Attribute attr = d->attributeListMap["WM/TrackNumber"][0];
+ if(attr.type() == ASF::Attribute::DWordType)
+ return attr.toUInt();
+ else
+ return attr.toString().toInt();
+ }
if(d->attributeListMap.contains("WM/Track"))
return d->attributeListMap["WM/Track"][0].toUInt();
return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/fileref.cpp new/taglib-1.6.2/taglib/fileref.cpp
--- old/taglib-1.6.1/taglib/fileref.cpp 2009-10-24 14:45:58.000000000 +0200
+++ new/taglib-1.6.2/taglib/fileref.cpp 2009-11-04 16:37:21.000000000 +0100
@@ -227,6 +227,7 @@
File *file = new Ogg::FLAC::File(fileName, readAudioProperties, audioPropertiesStyle);
if (file->isValid())
return file;
+ delete file;
return new Ogg::Vorbis::File(fileName, readAudioProperties, audioPropertiesStyle);
}
if(ext == "FLAC")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/flac/flacfile.cpp new/taglib-1.6.2/taglib/flac/flacfile.cpp
--- old/taglib-1.6.1/taglib/flac/flacfile.cpp 2009-07-12 23:53:18.000000000 +0200
+++ new/taglib-1.6.2/taglib/flac/flacfile.cpp 2009-11-02 20:41:12.000000000 +0100
@@ -406,7 +406,6 @@
nextBlockOffset += length + 4;
// Search through the remaining metadata
-
while(!isLastBlock) {
header = readBlock(4);
@@ -416,8 +415,13 @@
// Found the vorbis-comment
if(blockType == VorbisComment) {
- d->xiphCommentData = readBlock(length);
- d->hasXiphComment = true;
+ if(!d->hasXiphComment) {
+ d->xiphCommentData = readBlock(length);
+ d->hasXiphComment = true;
+ }
+ else {
+ debug("FLAC::File::scan() -- multiple Vorbis Comment blocks found, using the first one");
+ }
}
nextBlockOffset += length + 4;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mp4/mp4file.cpp new/taglib-1.6.2/taglib/mp4/mp4file.cpp
--- old/taglib-1.6.1/taglib/mp4/mp4file.cpp 2009-10-31 09:59:40.000000000 +0100
+++ new/taglib-1.6.2/taglib/mp4/mp4file.cpp 2009-12-14 19:42:40.000000000 +0100
@@ -113,6 +113,13 @@
return;
}
+ // must have a moov atom, otherwise consider it invalid
+ MP4::Atom *moov = d->atoms->find("moov");
+ if(!moov) {
+ setValid(false);
+ return;
+ }
+
d->tag = new Tag(this, d->atoms);
if(readProperties) {
d->properties = new Properties(this, d->atoms, audioPropertiesStyle);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mp4/mp4tag.cpp new/taglib-1.6.2/taglib/mp4/mp4tag.cpp
--- old/taglib-1.6.1/taglib/mp4/mp4tag.cpp 2009-10-29 16:53:20.000000000 +0100
+++ new/taglib-1.6.2/taglib/mp4/mp4tag.cpp 2010-04-02 14:14:32.000000000 +0200
@@ -42,12 +42,12 @@
public:
TagPrivate() : file(0), atoms(0) {}
~TagPrivate() {}
- File *file;
+ TagLib::File *file;
Atoms *atoms;
ItemListMap items;
};
-MP4::Tag::Tag(File *file, MP4::Atoms *atoms)
+MP4::Tag::Tag(TagLib::File *file, MP4::Atoms *atoms)
{
d = new TagPrivate;
d->file = file;
@@ -209,7 +209,7 @@
int flags = data.mid(pos + 8, 4).toUInt();
if(name != "data") {
debug("MP4: Unexpected atom \"" + name + "\", expecting \"data\"");
- return;
+ break;
}
if(flags == MP4::CoverArt::PNG || flags == MP4::CoverArt::JPEG) {
value.append(MP4::CoverArt(MP4::CoverArt::Format(flags),
@@ -270,7 +270,7 @@
ByteVector::fromShort(item.toIntPair().first) +
ByteVector::fromShort(item.toIntPair().second) +
ByteVector(2, '\0'));
- return renderData(name, 0x15, data);
+ return renderData(name, 0x00, data);
}
ByteVector
@@ -280,7 +280,7 @@
data.append(ByteVector(2, '\0') +
ByteVector::fromShort(item.toIntPair().first) +
ByteVector::fromShort(item.toIntPair().second));
- return renderData(name, 0x15, data);
+ return renderData(name, 0x00, data);
}
ByteVector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mpeg/id3v1/id3v1tag.h new/taglib-1.6.2/taglib/mpeg/id3v1/id3v1tag.h
--- old/taglib-1.6.1/taglib/mpeg/id3v1/id3v1tag.h 2009-03-22 20:27:38.000000000 +0100
+++ new/taglib-1.6.2/taglib/mpeg/id3v1/id3v1tag.h 2009-10-31 12:32:31.000000000 +0100
@@ -52,7 +52,7 @@
*
* \warning It is advisable <b>not</b> to write non-ISO-8859-1 data to ID3v1
* tags. Please consider disabling the writing of ID3v1 tags in the case
- * that the data is ISO-8859-1.
+ * that the data is not ISO-8859-1.
*
* \see ID3v1::Tag::setStringHandler()
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2framefactory.cpp new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2framefactory.cpp
--- old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2framefactory.cpp 2009-07-11 16:27:17.000000000 +0200
+++ new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2framefactory.cpp 2010-04-03 18:58:03.000000000 +0200
@@ -282,7 +282,8 @@
frameID == "LNK" ||
frameID == "RVA" ||
frameID == "TIM" ||
- frameID == "TSI")
+ frameID == "TSI" ||
+ frameID == "TDA")
{
debug("ID3v2.4 no longer supports the frame type " + String(frameID) +
". It will be discarded from the tag.");
@@ -310,7 +311,6 @@
convertFrame("TCM", "TCOM", header);
convertFrame("TCO", "TCON", header);
convertFrame("TCR", "TCOP", header);
- convertFrame("TDA", "TDRC", header);
convertFrame("TDY", "TDLY", header);
convertFrame("TEN", "TENC", header);
convertFrame("TFT", "TFLT", header);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2framefactory.h new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2framefactory.h
--- old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2framefactory.h 2008-02-04 16:11:56.000000000 +0100
+++ new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2framefactory.h 2010-04-04 19:33:01.000000000 +0200
@@ -35,7 +35,7 @@
namespace ID3v2 {
- class TAGLIB_EXPORT TextIdentificationFrame;
+ class TextIdentificationFrame;
//! A factory for creating ID3v2 frames during parsing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2synchdata.cpp new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2synchdata.cpp
--- old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2synchdata.cpp 2008-02-06 06:00:24.000000000 +0100
+++ new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2synchdata.cpp 2009-12-01 13:01:43.000000000 +0100
@@ -33,10 +33,28 @@
TagLib::uint SynchData::toUInt(const ByteVector &data)
{
uint sum = 0;
+ bool notSynchSafe = false;
int last = data.size() > 4 ? 3 : data.size() - 1;
- for(int i = 0; i <= last; i++)
+ for(int i = 0; i <= last; i++) {
+ if(data[i] & 0x80) {
+ notSynchSafe = true;
+ break;
+ }
+
sum |= (data[i] & 0x7f) << ((last - i) * 7);
+ }
+
+ if(notSynchSafe) {
+ /*
+ * Invalid data; assume this was created by some buggy software that just
+ * put normal integers here rather than syncsafe ones, and try it that
+ * way.
+ */
+ sum = 0;
+ for(int i = 0; i <= last; i++)
+ sum |= data[i] << ((last - i) * 8);
+ }
return sum;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2tag.cpp new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2tag.cpp
--- old/taglib-1.6.1/taglib/mpeg/id3v2/id3v2tag.cpp 2009-07-11 16:43:58.000000000 +0200
+++ new/taglib-1.6.2/taglib/mpeg/id3v2/id3v2tag.cpp 2010-03-07 20:03:35.000000000 +0100
@@ -352,7 +352,7 @@
// Loop through the frames rendering them and adding them to the tagData.
for(FrameList::Iterator it = d->frameList.begin(); it != d->frameList.end(); it++) {
- if ((*it)->header()->frameID().size() != 4) {
+ if((*it)->header()->frameID().size() != 4) {
debug("A frame of unsupported or unknown type \'"
+ String((*it)->header()->frameID()) + "\' has been discarded");
continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/taglib.pro new/taglib-1.6.2/taglib/taglib.pro
--- old/taglib-1.6.1/taglib/taglib.pro 2009-09-03 20:05:58.000000000 +0200
+++ new/taglib-1.6.2/taglib/taglib.pro 2010-04-04 17:01:21.000000000 +0200
@@ -3,45 +3,54 @@
######################################################################
TEMPLATE = lib
-CONFIG += lib_bundle
-CONFIG += x86 ppc
+CONFIG += lib_bundle staticlib
+CONFIG += x86 x86_64 ppc
CONFIG -= qt
-DEFINES += HAVE_ZLIB=1 NDEBUG
+DEFINES += HAVE_ZLIB=1 NDEBUG WITH_ASF WITH_MP4
LIBS += -lz
TARGET = TagLib
-VERSION = 1.6
+VERSION = 1.6.2
DEPENDPATH += . \
- ape \
- flac \
- mpc \
- mp4 \
- mpeg \
- ogg \
- ogg/speex \
- toolkit \
- trueaudio \
- wavpack \
- mpeg/id3v1 \
- mpeg/id3v2 \
- ogg/flac \
- ogg/vorbis \
- mpeg/id3v2/frames
+ ape \
+ asf \
+ flac \
+ mp4 \
+ mpc \
+ mpeg \
+ mpeg/id3v1 \
+ mpeg/id3v2 \
+ mpeg/id3v2/frames \
+ ogg \
+ ogg/flac \
+ ogg/speex \
+ ogg/vorbis \
+ riff \
+ riff/aiff \
+ riff/wav \
+ toolkit \
+ trueaudio \
+ wavpack
+
INCLUDEPATH += . \
- toolkit \
- mpeg \
- ogg/vorbis \
- ogg \
- flac \
- ogg/flac \
- mpc \
- mp4 \
- wavpack \
- ogg/speex \
- trueaudio \
- ape \
- mpeg/id3v2 \
- mpeg/id3v1 \
- mpeg/id3v2/frames
+ ape \
+ asf \
+ flac \
+ mp4 \
+ mpc \
+ mpeg \
+ mpeg/id3v1 \
+ mpeg/id3v2 \
+ mpeg/id3v2/frames \
+ ogg \
+ ogg/flac \
+ ogg/speex \
+ ogg/vorbis \
+ riff \
+ riff/aiff \
+ riff/wav \
+ toolkit \
+ trueaudio \
+ wavpack
# Input
HEADERS += audioproperties.h \
@@ -108,31 +117,65 @@
mpeg/id3v2/frames/urllinkframe.h \
toolkit/tlist.tcc \
toolkit/tmap.tcc
-SOURCES += audioproperties.cpp \
- fileref.cpp \
- tag.cpp \
- tagunion.cpp \
- ape/apefooter.cpp \
+SOURCES += ape/apefooter.cpp \
ape/apeitem.cpp \
ape/apetag.cpp \
+ asf/asfattribute.cpp \
+ asf/asffile.cpp \
+ asf/asfproperties.cpp \
+ asf/asftag.cpp \
+ audioproperties.cpp \
+ fileref.cpp \
flac/flacfile.cpp \
flac/flacproperties.cpp \
mp4/mp4atom.cpp \
- mp4/mp4item.cpp \
+ mp4/mp4coverart.cpp \
mp4/mp4file.cpp \
+ mp4/mp4item.cpp \
mp4/mp4properties.cpp \
+ mp4/mp4tag.cpp \
mpc/mpcfile.cpp \
mpc/mpcproperties.cpp \
+ mpeg/id3v1/id3v1genres.cpp \
+ mpeg/id3v1/id3v1tag.cpp \
+ mpeg/id3v2/frames/attachedpictureframe.cpp \
+ mpeg/id3v2/frames/commentsframe.cpp \
+ mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp \
+ mpeg/id3v2/frames/popularimeterframe.cpp \
+ mpeg/id3v2/frames/privateframe.cpp \
+ mpeg/id3v2/frames/relativevolumeframe.cpp \
+ mpeg/id3v2/frames/textidentificationframe.cpp \
+ mpeg/id3v2/frames/uniquefileidentifierframe.cpp \
+ mpeg/id3v2/frames/unknownframe.cpp \
+ mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp \
+ mpeg/id3v2/frames/urllinkframe.cpp \
+ mpeg/id3v2/id3v2extendedheader.cpp \
+ mpeg/id3v2/id3v2footer.cpp \
+ mpeg/id3v2/id3v2frame.cpp \
+ mpeg/id3v2/id3v2framefactory.cpp \
+ mpeg/id3v2/id3v2header.cpp \
+ mpeg/id3v2/id3v2synchdata.cpp \
+ mpeg/id3v2/id3v2tag.cpp \
mpeg/mpegfile.cpp \
mpeg/mpegheader.cpp \
mpeg/mpegproperties.cpp \
mpeg/xingheader.cpp \
+ ogg/flac/oggflacfile.cpp \
ogg/oggfile.cpp \
ogg/oggpage.cpp \
ogg/oggpageheader.cpp \
- ogg/xiphcomment.cpp \
ogg/speex/speexfile.cpp \
ogg/speex/speexproperties.cpp \
+ ogg/vorbis/vorbisfile.cpp \
+ ogg/vorbis/vorbisproperties.cpp \
+ ogg/xiphcomment.cpp \
+ riff/aiff/aifffile.cpp \
+ riff/aiff/aiffproperties.cpp \
+ riff/rifffile.cpp \
+ riff/wav/wavfile.cpp \
+ riff/wav/wavproperties.cpp \
+ tag.cpp \
+ tagunion.cpp \
toolkit/tbytevector.cpp \
toolkit/tbytevectorlist.cpp \
toolkit/tdebug.cpp \
@@ -143,92 +186,86 @@
trueaudio/trueaudiofile.cpp \
trueaudio/trueaudioproperties.cpp \
wavpack/wavpackfile.cpp \
- wavpack/wavpackproperties.cpp \
- mpeg/id3v1/id3v1genres.cpp \
- mpeg/id3v1/id3v1tag.cpp \
- mpeg/id3v2/id3v2extendedheader.cpp \
- mpeg/id3v2/id3v2footer.cpp \
- mpeg/id3v2/id3v2frame.cpp \
- mpeg/id3v2/id3v2framefactory.cpp \
- mpeg/id3v2/id3v2header.cpp \
- mpeg/id3v2/id3v2synchdata.cpp \
- mpeg/id3v2/id3v2tag.cpp \
- ogg/flac/oggflacfile.cpp \
- ogg/vorbis/vorbisfile.cpp \
- ogg/vorbis/vorbisproperties.cpp \
- mpeg/id3v2/frames/attachedpictureframe.cpp \
- mpeg/id3v2/frames/commentsframe.cpp \
- mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp \
- mpeg/id3v2/frames/popularimeterframe.cpp \
- mpeg/id3v2/frames/relativevolumeframe.cpp \
- mpeg/id3v2/frames/textidentificationframe.cpp \
- mpeg/id3v2/frames/uniquefileidentifierframe.cpp \
- mpeg/id3v2/frames/unknownframe.cpp \
- mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp \
- mpeg/id3v2/frames/urllinkframe.cpp
+ wavpack/wavpackproperties.cpp
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = \
- audioproperties.h \
- fileref.h \
- tag.h \
- taglib_export.h \
+FRAMEWORK_HEADERS.version = Versions
+FRAMEWORK_HEADERS.files = \
ape/apefooter.h \
ape/apeitem.h \
ape/apetag.h \
+ asf/asfattribute.h \
+ asf/asffile.h \
+ asf/asfproperties.h \
+ asf/asftag.h \
+ audioproperties.h \
+ fileref.h \
flac/flacfile.h \
flac/flacproperties.h \
mp4/mp4atom.h \
- mp4/mp4item.h \
+ mp4/mp4coverart.h \
mp4/mp4file.h \
+ mp4/mp4item.h \
mp4/mp4properties.h \
+ mp4/mp4tag.h \
mpc/mpcfile.h \
mpc/mpcproperties.h \
+ mpeg/id3v1/id3v1genres.h \
+ mpeg/id3v1/id3v1tag.h \
+ mpeg/id3v2/frames/attachedpictureframe.h \
+ mpeg/id3v2/frames/commentsframe.h \
+ mpeg/id3v2/frames/generalencapsulatedobjectframe.h \
+ mpeg/id3v2/frames/popularimeterframe.h \
+ mpeg/id3v2/frames/privateframe.h \
+ mpeg/id3v2/frames/relativevolumeframe.h \
+ mpeg/id3v2/frames/textidentificationframe.h \
+ mpeg/id3v2/frames/uniquefileidentifierframe.h \
+ mpeg/id3v2/frames/unknownframe.h \
+ mpeg/id3v2/frames/unsynchronizedlyricsframe.h \
+ mpeg/id3v2/frames/urllinkframe.h \
+ mpeg/id3v2/id3v2extendedheader.h \
+ mpeg/id3v2/id3v2footer.h \
+ mpeg/id3v2/id3v2frame.h \
+ mpeg/id3v2/id3v2framefactory.h \
+ mpeg/id3v2/id3v2header.h \
+ mpeg/id3v2/id3v2synchdata.h \
+ mpeg/id3v2/id3v2tag.h \
mpeg/mpegfile.h \
mpeg/mpegheader.h \
mpeg/mpegproperties.h \
mpeg/xingheader.h \
+ ogg/flac/oggflacfile.h \
ogg/oggfile.h \
ogg/oggpage.h \
ogg/oggpageheader.h \
- ogg/xiphcomment.h \
ogg/speex/speexfile.h \
ogg/speex/speexproperties.h \
+ ogg/vorbis/vorbisfile.h \
+ ogg/vorbis/vorbisproperties.h \
+ ogg/xiphcomment.h \
+ riff/aiff/aifffile.h \
+ riff/aiff/aiffproperties.h \
+ riff/rifffile.h \
+ riff/wav/wavfile.h \
+ riff/wav/wavproperties.h \
+ tag.h \
+ taglib_export.h \
+ tagunion.h \
toolkit/taglib.h \
toolkit/tbytevector.h \
toolkit/tbytevectorlist.h \
+ toolkit/tdebug.h \
toolkit/tfile.h \
toolkit/tlist.h \
+ toolkit/tlist.tcc \
toolkit/tmap.h \
+ toolkit/tmap.tcc \
toolkit/tstring.h \
toolkit/tstringlist.h \
toolkit/unicode.h \
trueaudio/trueaudiofile.h \
trueaudio/trueaudioproperties.h \
wavpack/wavpackfile.h \
- wavpack/wavpackproperties.h \
- mpeg/id3v1/id3v1genres.h \
- mpeg/id3v1/id3v1tag.h \
- mpeg/id3v2/id3v2extendedheader.h \
- mpeg/id3v2/id3v2footer.h \
- mpeg/id3v2/id3v2frame.h \
- mpeg/id3v2/id3v2framefactory.h \
- mpeg/id3v2/id3v2header.h \
- mpeg/id3v2/id3v2synchdata.h \
- mpeg/id3v2/id3v2tag.h \
- ogg/flac/oggflacfile.h \
- ogg/vorbis/vorbisfile.h \
- ogg/vorbis/vorbisproperties.h \
- mpeg/id3v2/frames/attachedpictureframe.h \
- mpeg/id3v2/frames/commentsframe.h \
- mpeg/id3v2/frames/generalencapsulatedobjectframe.h \
- mpeg/id3v2/frames/relativevolumeframe.h \
- mpeg/id3v2/frames/textidentificationframe.h \
- mpeg/id3v2/frames/uniquefileidentifierframe.h \
- mpeg/id3v2/frames/unknownframe.h \
- mpeg/id3v2/frames/unsynchronizedlyricsframe.h \
- mpeg/id3v2/frames/urllinkframe.h \
- toolkit/tlist.tcc \
- toolkit/tmap.tcc
+ wavpack/wavpackproperties.h
+
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib/taglib_export.h new/taglib-1.6.2/taglib/taglib_export.h
--- old/taglib-1.6.1/taglib/taglib_export.h 2009-10-24 13:07:41.000000000 +0200
+++ new/taglib-1.6.2/taglib/taglib_export.h 2010-03-07 20:03:35.000000000 +0100
@@ -38,6 +38,8 @@
#define TAGLIB_EXPORT
#endif
+#ifdef HAVE_CONFIG_H
#include "taglib_config.h"
+#endif
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib-config.cmake new/taglib-1.6.2/taglib-config.cmake
--- old/taglib-1.6.1/taglib-config.cmake 2009-10-31 10:23:58.000000000 +0100
+++ new/taglib-1.6.2/taglib-config.cmake 2010-04-04 17:01:21.000000000 +0200
@@ -35,7 +35,7 @@
flags="$flags -I$includedir/taglib"
;;
--version)
- echo 1.6.1
+ echo 1.6.2
;;
--prefix)
echo $prefix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/taglib-config.in new/taglib-1.6.2/taglib-config.in
--- old/taglib-1.6.1/taglib-config.in 2009-10-31 10:23:58.000000000 +0100
+++ new/taglib-1.6.2/taglib-config.in 2010-04-04 17:01:21.000000000 +0200
@@ -35,7 +35,7 @@
flags="$flags -I$includedir/taglib"
;;
--version)
- echo 1.6.1
+ echo 1.6.2
;;
--prefix)
echo $prefix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/CMakeLists.txt new/taglib-1.6.2/tests/CMakeLists.txt
--- old/taglib-1.6.1/tests/CMakeLists.txt 2009-10-24 18:55:54.000000000 +0200
+++ new/taglib-1.6.2/tests/CMakeLists.txt 2009-11-02 20:41:12.000000000 +0100
@@ -36,6 +36,7 @@
test_riff.cpp
test_ogg.cpp
test_oggflac.cpp
+ test_flac.cpp
)
IF(WITH_MP4)
SET(test_runner_SRCS ${test_runner_SRCS}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/Makefile.am new/taglib-1.6.2/tests/Makefile.am
--- old/taglib-1.6.1/tests/Makefile.am 2009-10-24 14:01:40.000000000 +0200
+++ new/taglib-1.6.2/tests/Makefile.am 2009-11-02 20:54:10.000000000 +0100
@@ -29,7 +29,8 @@
test_riff.cpp \
test_aiff.cpp \
test_ogg.cpp \
- test_oggflac.cpp
+ test_oggflac.cpp \
+ test_flac.cpp
if build_tests
TESTS = test_runner
Files old/taglib-1.6.1/tests/data/covr-junk.m4a and new/taglib-1.6.2/tests/data/covr-junk.m4a differ
Files old/taglib-1.6.1/tests/data/id3v22-tda.mp3 and new/taglib-1.6.2/tests/data/id3v22-tda.mp3 differ
Files old/taglib-1.6.1/tests/data/multiple-vc.flac and new/taglib-1.6.2/tests/data/multiple-vc.flac differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_aiff.cpp new/taglib-1.6.2/tests/test_aiff.cpp
--- old/taglib-1.6.1/tests/test_aiff.cpp 2009-07-28 20:29:39.000000000 +0200
+++ new/taglib-1.6.2/tests/test_aiff.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -19,12 +19,11 @@
void testReading()
{
- string filename = copyFile("empty", ".aiff");
+ ScopedFileCopy copy("empty", ".aiff");
+ string filename = copy.fileName();
RIFF::AIFF::File *f = new RIFF::AIFF::File(filename.c_str());
CPPUNIT_ASSERT_EQUAL(689, f->audioProperties()->bitrate());
-
- deleteFile(filename);
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_asf.cpp new/taglib-1.6.2/tests/test_asf.cpp
--- old/taglib-1.6.1/tests/test_asf.cpp 2008-11-12 09:17:11.000000000 +0100
+++ new/taglib-1.6.2/tests/test_asf.cpp 2010-04-02 13:53:28.000000000 +0200
@@ -18,6 +18,8 @@
CPPUNIT_TEST(testSaveMultipleValues);
CPPUNIT_TEST(testSaveStream);
CPPUNIT_TEST(testSaveLanguage);
+ CPPUNIT_TEST(testDWordTrackNumber);
+ CPPUNIT_TEST(testSaveLargeValue);
CPPUNIT_TEST_SUITE_END();
public:
@@ -39,7 +41,8 @@
void testSaveMultipleValues()
{
- string newname = copyFile("silence-1", ".wma");
+ ScopedFileCopy copy("silence-1", ".wma");
+ string newname = copy.fileName();
ASF::File *f = new ASF::File(newname.c_str());
ASF::AttributeList values;
@@ -52,13 +55,38 @@
f = new ASF::File(newname.c_str());
CPPUNIT_ASSERT_EQUAL(2, (int)f->tag()->attributeListMap()["WM/AlbumTitle"].size());
delete f;
+ }
+
+ void testDWordTrackNumber()
+ {
+ ScopedFileCopy copy("silence-1", ".wma");
+ string newname = copy.fileName();
+
+ ASF::File *f = new ASF::File(newname.c_str());
+ CPPUNIT_ASSERT(!f->tag()->attributeListMap().contains("WM/TrackNumber"));
+ f->tag()->setAttribute("WM/TrackNumber", (unsigned int)(123));
+ f->save();
+ delete f;
- deleteFile(newname);
+ f = new ASF::File(newname.c_str());
+ CPPUNIT_ASSERT(f->tag()->attributeListMap().contains("WM/TrackNumber"));
+ CPPUNIT_ASSERT_EQUAL(ASF::Attribute::DWordType, f->tag()->attributeListMap()["WM/TrackNumber"].front().type());
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(123), f->tag()->track());
+ f->tag()->setTrack(234);
+ f->save();
+ delete f;
+
+ f = new ASF::File(newname.c_str());
+ CPPUNIT_ASSERT(f->tag()->attributeListMap().contains("WM/TrackNumber"));
+ CPPUNIT_ASSERT_EQUAL(ASF::Attribute::UnicodeType, f->tag()->attributeListMap()["WM/TrackNumber"].front().type());
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(234), f->tag()->track());
+ delete f;
}
void testSaveStream()
{
- string newname = copyFile("silence-1", ".wma");
+ ScopedFileCopy copy("silence-1", ".wma");
+ string newname = copy.fileName();
ASF::File *f = new ASF::File(newname.c_str());
ASF::AttributeList values;
@@ -72,13 +100,12 @@
f = new ASF::File(newname.c_str());
CPPUNIT_ASSERT_EQUAL(43, f->tag()->attributeListMap()["WM/AlbumTitle"][0].stream());
delete f;
-
- deleteFile(newname);
}
void testSaveLanguage()
{
- string newname = copyFile("silence-1", ".wma");
+ ScopedFileCopy copy("silence-1", ".wma");
+ string newname = copy.fileName();
ASF::File *f = new ASF::File(newname.c_str());
ASF::AttributeList values;
@@ -94,8 +121,24 @@
CPPUNIT_ASSERT_EQUAL(32, f->tag()->attributeListMap()["WM/AlbumTitle"][0].stream());
CPPUNIT_ASSERT_EQUAL(56, f->tag()->attributeListMap()["WM/AlbumTitle"][0].language());
delete f;
+ }
+
+ void testSaveLargeValue()
+ {
+ ScopedFileCopy copy("silence-1", ".wma");
+ string newname = copy.fileName();
+
+ ASF::File *f = new ASF::File(newname.c_str());
+ ASF::AttributeList values;
+ ASF::Attribute attr(ByteVector(70000, 'x'));
+ values.append(attr);
+ f->tag()->attributeListMap()["WM/Blob"] = values;
+ f->save();
+ delete f;
- deleteFile(newname);
+ f = new ASF::File(newname.c_str());
+ CPPUNIT_ASSERT_EQUAL(ByteVector(70000, 'x'), f->tag()->attributeListMap()["WM/Blob"][0].toByteVector());
+ delete f;
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_fileref.cpp new/taglib-1.6.2/tests/test_fileref.cpp
--- old/taglib-1.6.1/tests/test_fileref.cpp 2009-10-24 14:17:08.000000000 +0200
+++ new/taglib-1.6.2/tests/test_fileref.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -38,7 +38,8 @@
void fileRefSave(const string &filename, const string &ext)
{
- string newname = copyFile(filename, ext);
+ ScopedFileCopy copy(filename, ext);
+ string newname = copy.fileName();
FileRef *f = new FileRef(newname.c_str());
CPPUNIT_ASSERT(!f->isNull());
@@ -77,8 +78,6 @@
CPPUNIT_ASSERT_EQUAL(f->tag()->track(), TagLib::uint(7));
CPPUNIT_ASSERT_EQUAL(f->tag()->year(), TagLib::uint(2080));
delete f;
-
- deleteFile(newname);
}
void testMusepack()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_flac.cpp new/taglib-1.6.2/tests/test_flac.cpp
--- old/taglib-1.6.1/tests/test_flac.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/taglib-1.6.2/tests/test_flac.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -0,0 +1,39 @@
+#include
+#include <string>
+#include
+#include
+#include
+#include
+#include
+#include "utils.h"
+
+using namespace std;
+using namespace TagLib;
+
+class TestFLAC : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE(TestFLAC);
+ CPPUNIT_TEST(testMultipleCommentBlocks);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void testMultipleCommentBlocks()
+ {
+ ScopedFileCopy copy("multiple-vc", ".flac");
+ string newname = copy.fileName();
+
+ FLAC::File *f = new FLAC::File(newname.c_str());
+ CPPUNIT_ASSERT_EQUAL(String("Artist 1"), f->tag()->artist());
+ f->tag()->setArtist("The Artist");
+ f->save();
+ delete f;
+
+ f = new FLAC::File(newname.c_str());
+ CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
+ delete f;
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TestFLAC);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_id3v2.cpp new/taglib-1.6.2/tests/test_id3v2.cpp
--- old/taglib-1.6.1/tests/test_id3v2.cpp 2009-07-11 16:43:58.000000000 +0200
+++ new/taglib-1.6.2/tests/test_id3v2.cpp 2010-04-03 18:58:03.000000000 +0200
@@ -59,6 +59,8 @@
CPPUNIT_TEST(testUpdateGenre23_1);
CPPUNIT_TEST(testUpdateGenre23_2);
CPPUNIT_TEST(testUpdateGenre24);
+ CPPUNIT_TEST(testUpdateDate22);
+ // CPPUNIT_TEST(testUpdateFullDate22); TODO TYE+TDA should be upgraded to TDRC together
CPPUNIT_TEST_SUITE_END();
public:
@@ -242,7 +244,8 @@
void testPOPMFromFile()
{
- string newname = copyFile("xing", ".mp3");
+ ScopedFileCopy copy("xing", ".mp3");
+ string newname = copy.fileName();
ID3v2::PopularimeterFrame *f = new ID3v2::PopularimeterFrame();
f->setEmail("email@example.com");
@@ -256,7 +259,6 @@
MPEG::File bar(newname.c_str());
CPPUNIT_ASSERT_EQUAL(String("email@example.com"), dynamic_cast(bar.ID3v2Tag()->frameList("POPM").front())->email());
CPPUNIT_ASSERT_EQUAL(200, dynamic_cast(bar.ID3v2Tag()->frameList("POPM").front())->rating());
- deleteFile(newname);
}
// http://bugs.kde.org/show_bug.cgi?id=150481
@@ -369,7 +371,8 @@
void testSaveUTF16Comment()
{
String::Type defaultEncoding = ID3v2::FrameFactory::instance()->defaultTextEncoding();
- string newname = copyFile("xing", ".mp3");
+ ScopedFileCopy copy("xing", ".mp3");
+ string newname = copy.fileName();
ID3v2::FrameFactory::instance()->setDefaultTextEncoding(String::UTF16);
MPEG::File foo(newname.c_str());
foo.strip();
@@ -377,7 +380,6 @@
foo.save();
MPEG::File bar(newname.c_str());
CPPUNIT_ASSERT_EQUAL(String("Test comment!"), bar.tag()->comment());
- deleteFile(newname);
ID3v2::FrameFactory::instance()->setDefaultTextEncoding(defaultEncoding);
}
@@ -439,6 +441,20 @@
CPPUNIT_ASSERT_EQUAL(String("R&B Eurodisco"), tag.genre());
}
+ void testUpdateDate22()
+ {
+ MPEG::File f("data/id3v22-tda.mp3", false);
+ CPPUNIT_ASSERT(f.tag());
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(2010), f.tag()->year());
+ }
+
+ void testUpdateFullDate22()
+ {
+ MPEG::File f("data/id3v22-tda.mp3", false);
+ CPPUNIT_ASSERT(f.tag());
+ CPPUNIT_ASSERT_EQUAL(String("2010-04-03"), f.ID3v2Tag()->frameListMap()["TDRC"].front()->toString());
+ }
+
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestID3v2);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_mp4.cpp new/taglib-1.6.2/tests/test_mp4.cpp
--- old/taglib-1.6.1/tests/test_mp4.cpp 2009-10-29 16:53:20.000000000 +0100
+++ new/taglib-1.6.2/tests/test_mp4.cpp 2010-04-02 14:14:32.000000000 +0200
@@ -16,12 +16,14 @@
CPPUNIT_TEST_SUITE(TestMP4);
CPPUNIT_TEST(testProperties);
CPPUNIT_TEST(testFreeForm);
+ CPPUNIT_TEST(testCheckValid);
CPPUNIT_TEST(testUpdateStco);
CPPUNIT_TEST(testSaveExisingWhenIlstIsLast);
CPPUNIT_TEST(test64BitAtom);
CPPUNIT_TEST(testGnre);
CPPUNIT_TEST(testCovrRead);
CPPUNIT_TEST(testCovrWrite);
+ CPPUNIT_TEST(testCovrRead2);
CPPUNIT_TEST_SUITE_END();
public:
@@ -36,9 +38,18 @@
CPPUNIT_ASSERT_EQUAL(16, ((MP4::Properties *)f.audioProperties())->bitsPerSample());
}
+ void testCheckValid()
+ {
+ MP4::File f("data/empty.aiff");
+ CPPUNIT_ASSERT(!f.isValid());
+ MP4::File f2("data/has-tags.m4a");
+ CPPUNIT_ASSERT(f2.isValid());
+ }
+
void testUpdateStco()
{
- string filename = copyFile("no-tags", ".3g2");
+ ScopedFileCopy copy("no-tags", ".3g2");
+ string filename = copy.fileName();
MP4::File *f = new MP4::File(filename.c_str());
f->tag()->setArtist(ByteVector(3000, 'x'));
@@ -80,13 +91,12 @@
}
delete f;
-
- deleteFile(filename);
}
void testFreeForm()
{
- string filename = copyFile("has-tags", ".m4a");
+ ScopedFileCopy copy("has-tags", ".m4a");
+ string filename = copy.fileName();
MP4::File *f = new MP4::File(filename.c_str());
CPPUNIT_ASSERT(f->tag()->itemListMap().contains("----:com.apple.iTunes:iTunNORM"));
@@ -99,13 +109,12 @@
CPPUNIT_ASSERT_EQUAL(String("Bar"), f->tag()->itemListMap()["----:org.kde.TagLib:Foo"].toStringList()[0]);
f->save();
delete f;
-
- deleteFile(filename);
}
void testSaveExisingWhenIlstIsLast()
{
- string filename = copyFile("ilst-is-last", ".m4a");
+ ScopedFileCopy copy("ilst-is-last", ".m4a");
+ string filename = copy.fileName();
MP4::File *f = new MP4::File(filename.c_str());
CPPUNIT_ASSERT_EQUAL(String("82,164"), f->tag()->itemListMap()["----:com.apple.iTunes:replaygain_track_minmax"].toStringList()[0]);
@@ -118,13 +127,12 @@
CPPUNIT_ASSERT_EQUAL(String("82,164"), f->tag()->itemListMap()["----:com.apple.iTunes:replaygain_track_minmax"].toStringList()[0]);
CPPUNIT_ASSERT_EQUAL(String("Pearl Jam"), f->tag()->artist());
CPPUNIT_ASSERT_EQUAL(String("foo"), f->tag()->comment());
-
- deleteFile(filename);
}
void test64BitAtom()
{
- string filename = copyFile("64bit", ".mp4");
+ ScopedFileCopy copy("64bit", ".mp4");
+ string filename = copy.fileName();
MP4::File *f = new MP4::File(filename.c_str());
CPPUNIT_ASSERT_EQUAL(true, f->tag()->itemListMap()["cpil"].toBool());
@@ -144,14 +152,13 @@
moov = atoms->atoms[0];
// original size + 'pgap' size + padding
CPPUNIT_ASSERT_EQUAL(long(77 + 25 + 974), moov->length);
-
- deleteFile(filename);
}
void testGnre()
{
MP4::File *f = new MP4::File("data/gnre.m4a");
CPPUNIT_ASSERT_EQUAL(TagLib::String("Ska"), f->tag()->genre());
+ delete f;
}
void testCovrRead()
@@ -164,11 +171,13 @@
CPPUNIT_ASSERT_EQUAL(TagLib::uint(79), l[0].data().size());
CPPUNIT_ASSERT_EQUAL(MP4::CoverArt::JPEG, l[1].format());
CPPUNIT_ASSERT_EQUAL(TagLib::uint(287), l[1].data().size());
+ delete f;
}
void testCovrWrite()
{
- string filename = copyFile("has-tags", ".m4a");
+ ScopedFileCopy copy("has-tags", ".m4a");
+ string filename = copy.fileName();
MP4::File *f = new MP4::File(filename.c_str());
CPPUNIT_ASSERT(f->tag()->itemListMap().contains("covr"));
@@ -189,8 +198,19 @@
CPPUNIT_ASSERT_EQUAL(MP4::CoverArt::PNG, l[2].format());
CPPUNIT_ASSERT_EQUAL(TagLib::uint(3), l[2].data().size());
delete f;
+ }
- deleteFile(filename);
+ void testCovrRead2()
+ {
+ MP4::File *f = new MP4::File("data/covr-junk.m4a");
+ CPPUNIT_ASSERT(f->tag()->itemListMap().contains("covr"));
+ MP4::CoverArtList l = f->tag()->itemListMap()["covr"].toCoverArtList();
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(2), l.size());
+ CPPUNIT_ASSERT_EQUAL(MP4::CoverArt::PNG, l[0].format());
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(79), l[0].data().size());
+ CPPUNIT_ASSERT_EQUAL(MP4::CoverArt::JPEG, l[1].format());
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(287), l[1].data().size());
+ delete f;
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_ogg.cpp new/taglib-1.6.2/tests/test_ogg.cpp
--- old/taglib-1.6.1/tests/test_ogg.cpp 2009-09-03 19:20:29.000000000 +0200
+++ new/taglib-1.6.2/tests/test_ogg.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -23,7 +23,8 @@
void testSimple()
{
- string newname = copyFile("empty", ".ogg");
+ ScopedFileCopy copy("empty", ".ogg");
+ string newname = copy.fileName();
Vorbis::File *f = new Vorbis::File(newname.c_str());
f->tag()->setArtist("The Artist");
@@ -33,13 +34,12 @@
f = new Vorbis::File(newname.c_str());
CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
delete f;
-
- deleteFile(newname);
}
void testSplitPackets()
{
- string newname = copyFile("empty", ".ogg");
+ ScopedFileCopy copy("empty", ".ogg");
+ string newname = copy.fileName();
Vorbis::File *f = new Vorbis::File(newname.c_str());
f->tag()->addField("test", ByteVector(128 * 1024, 'x') + ByteVector(1, '\0'));
@@ -49,8 +49,6 @@
f = new Vorbis::File(newname.c_str());
CPPUNIT_ASSERT_EQUAL(19, f->lastPageHeader()->pageSequenceNumber());
delete f;
-
- deleteFile(newname);
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_oggflac.cpp new/taglib-1.6.2/tests/test_oggflac.cpp
--- old/taglib-1.6.1/tests/test_oggflac.cpp 2009-10-24 14:01:40.000000000 +0200
+++ new/taglib-1.6.2/tests/test_oggflac.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -21,7 +21,8 @@
void testFramingBit()
{
- string newname = copyFile("empty_flac", ".oga");
+ ScopedFileCopy copy("empty_flac", ".oga");
+ string newname = copy.fileName();
Ogg::FLAC::File *f = new Ogg::FLAC::File(newname.c_str());
f->tag()->setArtist("The Artist");
@@ -36,7 +37,6 @@
CPPUNIT_ASSERT_EQUAL(9134, size);
delete f;
- //deleteFile(newname);
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/test_riff.cpp new/taglib-1.6.2/tests/test_riff.cpp
--- old/taglib-1.6.1/tests/test_riff.cpp 2009-07-28 20:29:39.000000000 +0200
+++ new/taglib-1.6.2/tests/test_riff.cpp 2009-11-02 20:53:15.000000000 +0100
@@ -35,7 +35,8 @@
void testPadding()
{
- string filename = copyFile("empty", ".aiff");
+ ScopedFileCopy copy("empty", ".aiff");
+ string filename = copy.fileName();
PublicRIFF *f = new PublicRIFF(filename.c_str());
CPPUNIT_ASSERT_EQUAL(ByteVector("TEST"), f->chunkName(2));
@@ -72,8 +73,6 @@
CPPUNIT_ASSERT_EQUAL(ByteVector("TEST"), f->chunkName(2));
CPPUNIT_ASSERT_EQUAL(ByteVector("foo"), f->chunkData(2));
-
- deleteFile(filename);
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/taglib-1.6.1/tests/utils.h new/taglib-1.6.2/tests/utils.h
--- old/taglib-1.6.1/tests/utils.h 2008-05-20 11:29:09.000000000 +0200
+++ new/taglib-1.6.2/tests/utils.h 2010-04-02 14:14:32.000000000 +0200
@@ -1,8 +1,12 @@
-#include <string>
-#include
+#ifdef _WIN32
+#include
+#else
#include
#include
#include
+#endif
+#include
+#include <string>
using namespace std;
@@ -10,6 +14,10 @@
{
string newname = string(tempnam(NULL, NULL)) + ext;
string oldname = string("data/") + filename + ext;
+#ifdef _WIN32
+ CopyFile(oldname.c_str(), newname.c_str(), FALSE);
+ SetFileAttributes(newname.c_str(), GetFileAttributes(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY);
+#else
char buffer[4096];
int bytes;
int inf = open(oldname.c_str(), O_RDONLY);
@@ -18,6 +26,7 @@
write(outf, buffer, bytes);
close(outf);
close(inf);
+#endif
return newname;
}
@@ -25,3 +34,28 @@
{
remove(filename.c_str());
}
+
+class ScopedFileCopy
+{
+public:
+ ScopedFileCopy(const string &filename, const string &ext, bool deleteFile=true)
+ {
+ m_deleteFile = deleteFile;
+ m_filename = copyFile(filename, ext);
+ }
+
+ ~ScopedFileCopy()
+ {
+ if(m_deleteFile)
+ deleteFile(m_filename);
+ }
+
+ string fileName()
+ {
+ return m_filename;
+ }
+
+private:
+ bool m_deleteFile;
+ string m_filename;
+};
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org