mirror of
https://github.com/taglib/taglib.git
synced 2026-06-07 23:09:49 -04:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c840222a39 | ||
|
|
39e712796f | ||
|
|
97203503b0 | ||
|
|
e21640bf10 | ||
|
|
a31356e330 | ||
|
|
9ef9514bfa | ||
|
|
967c0eefed | ||
|
|
abbf880872 | ||
|
|
e49724ae5f | ||
|
|
9427d8f3ba | ||
|
|
f40290dcaf | ||
|
|
983a35f5ae | ||
|
|
4dc6bdcd28 | ||
|
|
c963d1189a | ||
|
|
1ac61ffe19 | ||
|
|
a564d743f8 | ||
|
|
8c4d663393 | ||
|
|
bc5e56d3eb | ||
|
|
8aa7dd81d8 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,7 @@ cmake_uninstall.cmake
|
||||
Makefile
|
||||
CTestTestfile.cmake
|
||||
CMakeFiles/
|
||||
CMakeLists.txt.user*
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
@@ -50,6 +51,7 @@ taglib.xcodeproj
|
||||
CMakeScripts
|
||||
/.clang-format
|
||||
/compile_commands.json
|
||||
/build/
|
||||
.clangd
|
||||
.cache
|
||||
.idea
|
||||
|
||||
@@ -93,7 +93,7 @@ endif()
|
||||
# 3. If any interfaces have been added since the last public release, then increment age.
|
||||
# 4. If any interfaces have been removed since the last public release, then set age to 0.
|
||||
set(TAGLIB_SOVERSION_CURRENT 20)
|
||||
set(TAGLIB_SOVERSION_REVISION 0)
|
||||
set(TAGLIB_SOVERSION_REVISION 1)
|
||||
set(TAGLIB_SOVERSION_AGE 19)
|
||||
|
||||
math(EXPR TAGLIB_SOVERSION_MAJOR "${TAGLIB_SOVERSION_CURRENT} - ${TAGLIB_SOVERSION_AGE}")
|
||||
|
||||
12
NEWS
12
NEWS
@@ -1,3 +1,15 @@
|
||||
TagLib 1.13.1 (Jul 1, 2023)
|
||||
===========================
|
||||
|
||||
* Fixed parsing of TXXX frames without description.
|
||||
* Detect MP4 atoms with invalid length or type.
|
||||
* Do not miss ID3v2 frames when an extended header is present.
|
||||
* Use property "DISCSUBTITLE" for ID3v2 "TSST" frame.
|
||||
* Build system improvements: Use absolute path for macOS dylib install name,
|
||||
support --define-prefix when using pkg-config, fixed minimum required
|
||||
CppUnit version.
|
||||
* Code clean up using clang-tidy.
|
||||
|
||||
TagLib 1.13 (Oct 27, 2022)
|
||||
==========================
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ set_target_properties(tag_c PROPERTIES
|
||||
VERSION 0.0.0
|
||||
SOVERSION 0
|
||||
DEFINE_SYMBOL MAKE_TAGLIB_C_LIB
|
||||
INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
|
||||
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
)
|
||||
install(TARGETS tag_c
|
||||
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
@@ -69,7 +69,7 @@ install(TARGETS tag_c
|
||||
)
|
||||
|
||||
if(NOT BUILD_FRAMEWORK)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
prefix=${CMAKE_INSTALL_PREFIX}
|
||||
exec_prefix=${CMAKE_INSTALL_PREFIX}
|
||||
libdir=${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
||||
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: TagLib C Bindings
|
||||
Description: Audio meta-data library (C bindings)
|
||||
Requires: taglib
|
||||
Version: ${TAGLIB_LIB_VERSION_STRING}
|
||||
Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -ltag_c
|
||||
Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}/taglib
|
||||
Version: @TAGLIB_LIB_VERSION_STRING@
|
||||
Libs: -L${libdir} -ltag_c
|
||||
Cflags: -I${includedir}/taglib
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
include (MacroEnsureVersion)
|
||||
|
||||
if(NOT CPPUNIT_MIN_VERSION)
|
||||
SET(CPPUNIT_MIN_VERSION 1.12.0)
|
||||
SET(CPPUNIT_MIN_VERSION 1.14.0)
|
||||
endif(NOT CPPUNIT_MIN_VERSION)
|
||||
|
||||
FIND_PROGRAM(CPPUNIT_CONFIG_EXECUTABLE cppunit-config )
|
||||
@@ -56,7 +56,7 @@ IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK )
|
||||
|
||||
IF(NOT CPPUNIT_INSTALLED_VERSION_OK)
|
||||
MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or major is required")
|
||||
MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or newer is required")
|
||||
SET(CppUnit_FOUND FALSE)
|
||||
ENDIF(NOT CPPUNIT_INSTALLED_VERSION_OK)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: TagLib
|
||||
Description: Audio meta-data library
|
||||
|
||||
@@ -344,7 +344,7 @@ endif()
|
||||
set_target_properties(tag PROPERTIES
|
||||
VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH}
|
||||
SOVERSION ${TAGLIB_SOVERSION_MAJOR}
|
||||
INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
|
||||
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
DEFINE_SYMBOL MAKE_TAGLIB_LIB
|
||||
LINK_INTERFACE_LIBRARIES ""
|
||||
PUBLIC_HEADER "${tag_HDRS}"
|
||||
|
||||
@@ -49,7 +49,7 @@ using namespace TagLib;
|
||||
namespace
|
||||
{
|
||||
enum { ApeAPEIndex = 0, ApeID3v1Index = 1 };
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class APE::File::FilePrivate
|
||||
{
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace APE
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace TagLib {
|
||||
FooterPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace APE
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -257,7 +257,7 @@ void APE::Item::parse(const ByteVector &data)
|
||||
const ByteVector value = data.mid(8 + d->key.size() + 1, valueLength);
|
||||
|
||||
setReadOnly(flags & 1);
|
||||
setType(ItemTypes((flags >> 1) & 3));
|
||||
setType(static_cast<ItemTypes>((flags >> 1) & 3));
|
||||
|
||||
if(Text == d->type)
|
||||
d->text = StringList(ByteVectorList::split(value, '\0'), String::UTF8);
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
#include "tstringlist.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace APE {
|
||||
|
||||
//! An implementation of APE-items
|
||||
|
||||
/*!
|
||||
@@ -215,10 +213,7 @@ namespace TagLib {
|
||||
class ItemPrivate;
|
||||
ItemPrivate *d;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace APE
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace
|
||||
|
||||
return header.toUShort(4, false);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void APE::Properties::read(File *file, long streamLength)
|
||||
{
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace APE
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace TagLib {
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace APE
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -185,7 +185,7 @@ String ASF::Attribute::parse(ASF::File &f, int kind)
|
||||
if(kind == 0) {
|
||||
nameLength = readWORD(&f);
|
||||
name = readString(&f, nameLength);
|
||||
d->type = ASF::Attribute::AttributeTypes(readWORD(&f));
|
||||
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
|
||||
size = readWORD(&f);
|
||||
}
|
||||
// metadata & metadata library
|
||||
@@ -197,7 +197,7 @@ String ASF::Attribute::parse(ASF::File &f, int kind)
|
||||
}
|
||||
d->stream = readWORD(&f);
|
||||
nameLength = readWORD(&f);
|
||||
d->type = ASF::Attribute::AttributeTypes(readWORD(&f));
|
||||
d->type = static_cast<ASF::Attribute::AttributeTypes>(readWORD(&f));
|
||||
size = readDWORD(&f);
|
||||
name = readString(&f, nameLength);
|
||||
}
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
|
||||
namespace TagLib
|
||||
{
|
||||
|
||||
namespace ASF
|
||||
{
|
||||
|
||||
class File;
|
||||
class Picture;
|
||||
|
||||
@@ -201,8 +199,7 @@ namespace TagLib
|
||||
class AttributePrivate;
|
||||
AttributePrivate *d;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#include "asftag.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
//! An implementation of ASF (WMA) metadata
|
||||
namespace ASF {
|
||||
|
||||
/*!
|
||||
* This implements and provides an interface for ASF files to the
|
||||
* TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing
|
||||
@@ -130,9 +128,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -172,7 +172,6 @@ void ASF::Picture::parse(const ByteVector& bytes)
|
||||
|
||||
d->picture = bytes.mid(pos, dataLen);
|
||||
d->valid = true;
|
||||
return;
|
||||
}
|
||||
|
||||
ASF::Picture ASF::Picture::fromInvalid()
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace TagLib
|
||||
class PicturePrivate;
|
||||
PicturePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
|
||||
#endif // ASFPICTURE_H
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
#include "taglib_export.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace ASF {
|
||||
|
||||
//! An implementation of ASF audio properties
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
@@ -178,9 +176,6 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -206,6 +206,6 @@ namespace TagLib {
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -95,9 +95,9 @@ namespace TagLib
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace ASF
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -122,6 +122,6 @@ namespace TagLib {
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
};
|
||||
|
||||
FLAC::MetadataBlock::MetadataBlock()
|
||||
: d(0)
|
||||
{
|
||||
d = 0;
|
||||
}
|
||||
|
||||
FLAC::MetadataBlock::~MetadataBlock()
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
#include "taglib_export.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace FLAC {
|
||||
|
||||
class TAGLIB_EXPORT MetadataBlock
|
||||
{
|
||||
public:
|
||||
@@ -67,9 +65,6 @@ namespace TagLib {
|
||||
class MetadataBlockPrivate;
|
||||
MetadataBlockPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ bool FLAC::Picture::parse(const ByteVector &data)
|
||||
}
|
||||
|
||||
unsigned int pos = 0;
|
||||
d->type = FLAC::Picture::Type(data.toUInt(pos));
|
||||
d->type = static_cast<FLAC::Picture::Type>(data.toUInt(pos));
|
||||
pos += 4;
|
||||
unsigned int mimeTypeLength = data.toUInt(pos);
|
||||
pos += 4;
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
#include "flacmetadatablock.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace FLAC {
|
||||
|
||||
class TAGLIB_EXPORT Picture : public MetadataBlock
|
||||
{
|
||||
public:
|
||||
@@ -200,9 +198,6 @@ namespace TagLib {
|
||||
};
|
||||
|
||||
typedef List<Picture> PictureList;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include "flacmetadatablock.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace FLAC {
|
||||
|
||||
class TAGLIB_EXPORT UnknownMetadataBlock : public MetadataBlock
|
||||
{
|
||||
public:
|
||||
@@ -73,9 +71,6 @@ namespace TagLib {
|
||||
class UnknownMetadataBlockPrivate;
|
||||
UnknownMetadataBlockPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace IT
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace IT
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#include "modproperties.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace Mod {
|
||||
|
||||
class TAGLIB_EXPORT File : public TagLib::Mod::FileBase
|
||||
{
|
||||
public:
|
||||
@@ -106,9 +104,6 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace Mod
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -35,9 +35,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace Mod {
|
||||
|
||||
class TAGLIB_EXPORT FileBase : public TagLib::File
|
||||
{
|
||||
protected:
|
||||
@@ -58,9 +56,6 @@ namespace TagLib {
|
||||
bool readU16B(unsigned short &number);
|
||||
bool readU32B(unsigned long &number);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace Mod
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
#include "audioproperties.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace Mod {
|
||||
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
@@ -63,9 +61,6 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace Mod
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
#include "tag.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace Mod {
|
||||
|
||||
/*!
|
||||
* Tags for module files (Mod, S3M, IT, XM).
|
||||
*
|
||||
@@ -186,9 +184,6 @@ namespace TagLib {
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace Mod
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -38,10 +38,10 @@ const char *const MP4::Atom::containers[11] = {
|
||||
};
|
||||
|
||||
MP4::Atom::Atom(File *file)
|
||||
: offset(file->tell())
|
||||
{
|
||||
children.setAutoDelete(true);
|
||||
|
||||
offset = file->tell();
|
||||
ByteVector header = file->readBlock(8);
|
||||
if(header.size() != 8) {
|
||||
// The atom header must be 8 bytes long, otherwise there is either
|
||||
@@ -73,7 +73,7 @@ MP4::Atom::Atom(File *file)
|
||||
}
|
||||
}
|
||||
|
||||
if(length < 8) {
|
||||
if(length < 8 || length > file->length() - offset) {
|
||||
debug("MP4: Invalid atom size");
|
||||
length = 0;
|
||||
file->seek(0, File::End);
|
||||
@@ -81,6 +81,14 @@ MP4::Atom::Atom(File *file)
|
||||
}
|
||||
|
||||
name = header.mid(4, 4);
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
const char ch = name.at(i);
|
||||
if((ch < ' ' || ch > '~') && ch != '\251') {
|
||||
debug("MP4: Invalid atom type");
|
||||
length = 0;
|
||||
file->seek(0, File::End);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < numContainers; i++) {
|
||||
if(name == containers[i]) {
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#include "tlist.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace MP4 {
|
||||
|
||||
class Atom;
|
||||
typedef TagLib::List<Atom *> AtomList;
|
||||
|
||||
@@ -101,10 +99,8 @@ namespace TagLib {
|
||||
AtomList path(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
|
||||
AtomList atoms;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include "mp4atom.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace MP4 {
|
||||
|
||||
class TAGLIB_EXPORT CoverArt
|
||||
{
|
||||
public:
|
||||
@@ -76,9 +74,6 @@ namespace TagLib {
|
||||
};
|
||||
|
||||
typedef List<CoverArt> CoverArtList;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#include "mp4tag.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
//! An implementation of MP4 (AAC, ALAC, ...) metadata
|
||||
namespace MP4 {
|
||||
|
||||
class Atoms;
|
||||
|
||||
/*!
|
||||
@@ -157,9 +155,6 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
#include "taglib_export.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace MP4 {
|
||||
|
||||
class TAGLIB_EXPORT Item
|
||||
{
|
||||
public:
|
||||
@@ -85,9 +83,6 @@ namespace TagLib {
|
||||
class ItemPrivate;
|
||||
ItemPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
#include "audioproperties.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace MP4 {
|
||||
|
||||
class Atoms;
|
||||
class File;
|
||||
|
||||
@@ -112,9 +110,6 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ MP4::Tag::parseData2(const MP4::Atom *atom, int expectedFlags, bool freeForm)
|
||||
debug("MP4: Unexpected atom \"" + name + "\", expecting \"name\"");
|
||||
return result;
|
||||
}
|
||||
result.append(AtomData(AtomDataType(flags), data.mid(pos + 12, length - 12)));
|
||||
result.append(AtomData(static_cast<AtomDataType>(flags), data.mid(pos + 12, length - 12)));
|
||||
}
|
||||
else {
|
||||
if(name != "data") {
|
||||
@@ -152,7 +152,7 @@ MP4::Tag::parseData2(const MP4::Atom *atom, int expectedFlags, bool freeForm)
|
||||
return result;
|
||||
}
|
||||
if(expectedFlags == -1 || flags == expectedFlags) {
|
||||
result.append(AtomData(AtomDataType(flags), data.mid(pos + 16, length - 16)));
|
||||
result.append(AtomData(static_cast<AtomDataType>(flags), data.mid(pos + 16, length - 16)));
|
||||
}
|
||||
}
|
||||
pos += length;
|
||||
@@ -316,7 +316,7 @@ MP4::Tag::parseCovr(const MP4::Atom *atom)
|
||||
}
|
||||
if(flags == TypeJPEG || flags == TypePNG || flags == TypeBMP ||
|
||||
flags == TypeGIF || flags == TypeImplicit) {
|
||||
value.append(MP4::CoverArt(MP4::CoverArt::Format(flags),
|
||||
value.append(MP4::CoverArt(static_cast<MP4::CoverArt::Format>(flags),
|
||||
data.mid(pos + 16, length - 16)));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
#include "mp4item.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace MP4 {
|
||||
|
||||
/*!
|
||||
* \deprecated Use ItemMap.
|
||||
*/
|
||||
@@ -161,9 +159,6 @@ namespace TagLib {
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,7 @@ using namespace TagLib;
|
||||
namespace
|
||||
{
|
||||
enum { MPCAPEIndex = 0, MPCID3v1Index = 1 };
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class MPC::File::FilePrivate
|
||||
{
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPC
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPC
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace TagLib {
|
||||
* will be returned.
|
||||
*/
|
||||
int TAGLIB_EXPORT genreIndex(const String &name);
|
||||
}
|
||||
}
|
||||
} // namespace ID3v1
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace
|
||||
{
|
||||
const ID3v1::StringHandler defaultStringHandler;
|
||||
const ID3v1::StringHandler *stringHandler = &defaultStringHandler;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class ID3v1::Tag::TagPrivate
|
||||
{
|
||||
@@ -112,9 +112,9 @@ ByteVector ID3v1::Tag::render() const
|
||||
data.append(stringHandler->render(d->album).resize(30));
|
||||
data.append(stringHandler->render(d->year).resize(4));
|
||||
data.append(stringHandler->render(d->comment).resize(28));
|
||||
data.append(char(0));
|
||||
data.append(char(d->track));
|
||||
data.append(char(d->genre));
|
||||
data.append(static_cast<char>(0));
|
||||
data.append(static_cast<char>(d->track));
|
||||
data.append(static_cast<char>(d->genre));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace TagLib {
|
||||
class TagPrivate;
|
||||
TagPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v1
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -133,7 +133,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
|
||||
int pos = 1;
|
||||
|
||||
@@ -156,10 +156,10 @@ ByteVector AttachedPictureFrame::renderFields() const
|
||||
|
||||
String::Type encoding = checkTextEncoding(d->description, d->textEncoding);
|
||||
|
||||
data.append(char(encoding));
|
||||
data.append(static_cast<char>(encoding));
|
||||
data.append(d->mimeType.data(String::Latin1));
|
||||
data.append(textDelimiter(String::Latin1));
|
||||
data.append(char(d->type));
|
||||
data.append(static_cast<char>(d->type));
|
||||
data.append(d->description.data(encoding));
|
||||
data.append(textDelimiter(encoding));
|
||||
data.append(d->data);
|
||||
@@ -189,7 +189,7 @@ void AttachedPictureFrameV22::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
|
||||
int pos = 1;
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace TagLib {
|
||||
AttachedPictureFrameV22(const ByteVector &data, Header *h);
|
||||
friend class FrameFactory;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -124,7 +124,7 @@ void ChapterFrame::setElementID(const ByteVector &eID)
|
||||
{
|
||||
d->elementID = eID;
|
||||
|
||||
if(d->elementID.endsWith(char(0)))
|
||||
if(d->elementID.endsWith(static_cast<char>(0)))
|
||||
d->elementID = d->elementID.mid(0, d->elementID.size() - 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace TagLib {
|
||||
class ChapterFramePrivate;
|
||||
ChapterFramePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -150,7 +150,7 @@ void CommentsFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
d->language = data.mid(1, 3);
|
||||
|
||||
int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8 ? 1 : 2;
|
||||
@@ -177,7 +177,7 @@ ByteVector CommentsFrame::renderFields() const
|
||||
encoding = checkTextEncoding(d->description, encoding);
|
||||
encoding = checkTextEncoding(d->text, encoding);
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
v.append(d->language.size() == 3 ? d->language : "XXX");
|
||||
v.append(d->description.data(encoding));
|
||||
v.append(textDelimiter(encoding));
|
||||
|
||||
@@ -174,6 +174,6 @@ namespace TagLib {
|
||||
CommentsFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -104,7 +104,7 @@ void EventTimingCodesFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->timestampFormat = TimestampFormat(data[0]);
|
||||
d->timestampFormat = static_cast<TimestampFormat>(data[0]);
|
||||
|
||||
int pos = 1;
|
||||
d->synchedEvents.clear();
|
||||
@@ -120,12 +120,12 @@ ByteVector EventTimingCodesFrame::renderFields() const
|
||||
{
|
||||
ByteVector v;
|
||||
|
||||
v.append(char(d->timestampFormat));
|
||||
v.append(static_cast<char>(d->timestampFormat));
|
||||
for(SynchedEventList::ConstIterator it = d->synchedEvents.begin();
|
||||
it != d->synchedEvents.end();
|
||||
++it) {
|
||||
const SynchedEvent &entry = *it;
|
||||
v.append(char(entry.type));
|
||||
v.append(static_cast<char>(entry.type));
|
||||
v.append(ByteVector::fromUInt(entry.time));
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +180,6 @@ namespace TagLib {
|
||||
EventTimingCodesFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -142,7 +142,7 @@ void GeneralEncapsulatedObjectFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
|
||||
int pos = 1;
|
||||
|
||||
@@ -163,7 +163,7 @@ ByteVector GeneralEncapsulatedObjectFrame::renderFields() const
|
||||
|
||||
ByteVector data;
|
||||
|
||||
data.append(char(encoding));
|
||||
data.append(static_cast<char>(encoding));
|
||||
data.append(d->mimeType.data(String::Latin1));
|
||||
data.append(textDelimiter(String::Latin1));
|
||||
data.append(d->fileName.data(encoding));
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace TagLib {
|
||||
class GeneralEncapsulatedObjectFramePrivate;
|
||||
GeneralEncapsulatedObjectFramePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -123,7 +123,7 @@ void OwnershipFrame::parseFields(const ByteVector &data)
|
||||
}
|
||||
|
||||
// Get the text encoding
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
pos += 1;
|
||||
|
||||
// Read the price paid this is a null terminate string
|
||||
@@ -155,7 +155,7 @@ ByteVector OwnershipFrame::renderFields() const
|
||||
|
||||
ByteVector v;
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
v.append(d->pricePaid.data(String::Latin1));
|
||||
v.append(textDelimiter(String::Latin1));
|
||||
v.append(d->datePurchased.data(String::Latin1));
|
||||
|
||||
@@ -146,6 +146,6 @@ namespace TagLib {
|
||||
OwnershipFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -77,6 +77,6 @@ namespace TagLib {
|
||||
PodcastFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -102,7 +102,7 @@ void PopularimeterFrame::setCounter(unsigned int s)
|
||||
|
||||
void PopularimeterFrame::parseFields(const ByteVector &data)
|
||||
{
|
||||
int pos = 0, size = int(data.size());
|
||||
int pos = 0, size = static_cast<int>(data.size());
|
||||
|
||||
d->email = readStringField(data, String::Latin1, &pos);
|
||||
|
||||
@@ -122,7 +122,7 @@ ByteVector PopularimeterFrame::renderFields() const
|
||||
|
||||
data.append(d->email.data(String::Latin1));
|
||||
data.append(textDelimiter(String::Latin1));
|
||||
data.append(char(d->rating));
|
||||
data.append(static_cast<char>(d->rating));
|
||||
data.append(ByteVector::fromUInt(d->counter));
|
||||
|
||||
return data;
|
||||
|
||||
@@ -127,6 +127,6 @@ namespace TagLib {
|
||||
PopularimeterFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -106,6 +106,6 @@ namespace TagLib {
|
||||
PrivateFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -121,7 +121,7 @@ void RelativeVolumeFrame::setVolumeAdjustmentIndex(short index)
|
||||
|
||||
float RelativeVolumeFrame::volumeAdjustment(ChannelType type) const
|
||||
{
|
||||
return d->channels.contains(type) ? float(d->channels[type].volumeAdjustment) / float(512) : 0;
|
||||
return d->channels.contains(type) ? static_cast<float>(d->channels[type].volumeAdjustment) / static_cast<float>(512) : 0;
|
||||
}
|
||||
|
||||
float RelativeVolumeFrame::volumeAdjustment() const
|
||||
@@ -131,7 +131,7 @@ float RelativeVolumeFrame::volumeAdjustment() const
|
||||
|
||||
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment, ChannelType type)
|
||||
{
|
||||
d->channels[type].volumeAdjustment = short(adjustment * float(512));
|
||||
d->channels[type].volumeAdjustment = static_cast<short>(adjustment * static_cast<float>(512));
|
||||
}
|
||||
|
||||
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment)
|
||||
@@ -182,7 +182,7 @@ void RelativeVolumeFrame::parseFields(const ByteVector &data)
|
||||
|
||||
while(pos <= static_cast<int>(data.size()) - 4) {
|
||||
|
||||
ChannelType type = ChannelType(data[pos]);
|
||||
ChannelType type = static_cast<ChannelType>(data[pos]);
|
||||
pos += 1;
|
||||
|
||||
ChannelData &channel = d->channels[type];
|
||||
@@ -212,9 +212,9 @@ ByteVector RelativeVolumeFrame::renderFields() const
|
||||
ChannelType type = (*it).first;
|
||||
const ChannelData &channel = (*it).second;
|
||||
|
||||
data.append(char(type));
|
||||
data.append(static_cast<char>(type));
|
||||
data.append(ByteVector::fromShort(channel.volumeAdjustment));
|
||||
data.append(char(channel.peakVolume.bitsRepresentingPeak));
|
||||
data.append(static_cast<char>(channel.peakVolume.bitsRepresentingPeak));
|
||||
data.append(channel.peakVolume.peakVolume);
|
||||
}
|
||||
|
||||
|
||||
@@ -269,6 +269,6 @@ namespace TagLib {
|
||||
RelativeVolumeFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -150,10 +150,10 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
d->language = data.mid(1, 3);
|
||||
d->timestampFormat = TimestampFormat(data[4]);
|
||||
d->type = Type(data[5]);
|
||||
d->timestampFormat = static_cast<TimestampFormat>(data[4]);
|
||||
d->type = static_cast<Type>(data[5]);
|
||||
|
||||
int pos = 6;
|
||||
|
||||
@@ -212,10 +212,10 @@ ByteVector SynchronizedLyricsFrame::renderFields() const
|
||||
encoding = checkTextEncoding(it->text, encoding);
|
||||
}
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
v.append(d->language.size() == 3 ? d->language : "XXX");
|
||||
v.append(char(d->timestampFormat));
|
||||
v.append(char(d->type));
|
||||
v.append(static_cast<char>(d->timestampFormat));
|
||||
v.append(static_cast<char>(d->type));
|
||||
v.append(d->description.data(encoding));
|
||||
v.append(textDelimiter(encoding));
|
||||
for(SynchedTextList::ConstIterator it = d->synchedText.begin();
|
||||
|
||||
@@ -226,6 +226,6 @@ namespace TagLib {
|
||||
SynchronizedLyricsFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace TagLib {
|
||||
class TableOfContentsFramePrivate;
|
||||
TableOfContentsFramePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -194,7 +194,7 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
|
||||
|
||||
// read the string data type (the first byte of the field data)
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
|
||||
// split the byte array into chunks based on the string type (two byte delimiter
|
||||
// for unicode encodings)
|
||||
@@ -220,7 +220,7 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
|
||||
|
||||
unsigned short firstBom = 0;
|
||||
for(ByteVectorList::ConstIterator it = l.begin(); it != l.end(); it++) {
|
||||
if(!(*it).isEmpty()) {
|
||||
if(!it->isEmpty() || (it == l.begin() && frameID() == "TXXX")) {
|
||||
if(d->textEncoding == String::Latin1) {
|
||||
d->fieldList.append(Tag::latin1StringHandler()->parse(*it));
|
||||
}
|
||||
@@ -254,7 +254,7 @@ ByteVector TextIdentificationFrame::renderFields() const
|
||||
|
||||
ByteVector v;
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
|
||||
for(StringList::ConstIterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) {
|
||||
|
||||
|
||||
@@ -308,6 +308,6 @@ namespace TagLib {
|
||||
UserTextIdentificationFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -134,7 +134,7 @@ ByteVector UniqueFileIdentifierFrame::renderFields() const
|
||||
ByteVector data;
|
||||
|
||||
data.append(d->owner.data(String::Latin1));
|
||||
data.append(char(0));
|
||||
data.append(static_cast<char>(0));
|
||||
data.append(d->identifier);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace TagLib {
|
||||
class UniqueFileIdentifierFramePrivate;
|
||||
UniqueFileIdentifierFramePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -74,6 +74,6 @@ namespace TagLib {
|
||||
UnknownFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -147,7 +147,7 @@ void UnsynchronizedLyricsFrame::parseFields(const ByteVector &data)
|
||||
return;
|
||||
}
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
d->language = data.mid(1, 3);
|
||||
|
||||
int byteAlign
|
||||
@@ -177,7 +177,7 @@ ByteVector UnsynchronizedLyricsFrame::renderFields() const
|
||||
|
||||
ByteVector v;
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
v.append(d->language.size() == 3 ? d->language : "XXX");
|
||||
v.append(d->description.data(encoding));
|
||||
v.append(textDelimiter(encoding));
|
||||
|
||||
@@ -174,6 +174,6 @@ namespace TagLib {
|
||||
UnsynchronizedLyricsFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -201,7 +201,7 @@ void UserUrlLinkFrame::parseFields(const ByteVector &data)
|
||||
|
||||
int pos = 0;
|
||||
|
||||
d->textEncoding = String::Type(data[0]);
|
||||
d->textEncoding = static_cast<String::Type>(data[0]);
|
||||
pos += 1;
|
||||
|
||||
if(d->textEncoding == String::Latin1 || d->textEncoding == String::UTF8) {
|
||||
@@ -230,7 +230,7 @@ ByteVector UserUrlLinkFrame::renderFields() const
|
||||
|
||||
String::Type encoding = checkTextEncoding(d->description, d->textEncoding);
|
||||
|
||||
v.append(char(encoding));
|
||||
v.append(static_cast<char>(encoding));
|
||||
v.append(d->description.data(encoding));
|
||||
v.append(textDelimiter(encoding));
|
||||
v.append(url().data(String::Latin1));
|
||||
|
||||
@@ -185,6 +185,6 @@ namespace TagLib {
|
||||
UserUrlLinkFramePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace TagLib {
|
||||
v3 = 3, //<! ID3v2.3
|
||||
v4 = 4 //<! ID3v2.4
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -88,6 +88,6 @@ namespace TagLib {
|
||||
ExtendedHeaderPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -77,6 +77,6 @@ namespace TagLib {
|
||||
FooterPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
||||
@@ -373,6 +373,7 @@ namespace
|
||||
std::make_pair("TSO2", "ALBUMARTISTSORT"), // non-standard, used by iTunes
|
||||
std::make_pair("TSRC", "ISRC"),
|
||||
std::make_pair("TSSE", "ENCODING"),
|
||||
std::make_pair("TSST", "DISCSUBTITLE"),
|
||||
// URL frames
|
||||
std::make_pair("WCOP", "COPYRIGHTURL"),
|
||||
std::make_pair("WOAF", "FILEWEBPAGE"),
|
||||
@@ -815,7 +816,7 @@ bool Frame::Header::dataLengthIndicator() const
|
||||
|
||||
ByteVector Frame::Header::render() const
|
||||
{
|
||||
ByteVector flags(2, char(0)); // just blank for the moment
|
||||
ByteVector flags(2, static_cast<char>(0)); // just blank for the moment
|
||||
|
||||
ByteVector v = d->frameID +
|
||||
(d->version == 3
|
||||
|
||||
@@ -517,7 +517,7 @@ namespace TagLib {
|
||||
HeaderPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -348,13 +348,13 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
|
||||
tdat &&
|
||||
tdat->data().size() >= 5)
|
||||
{
|
||||
String date(tdat->data().mid(1), String::Type(tdat->data()[0]));
|
||||
String date(tdat->data().mid(1), static_cast<String::Type>(tdat->data()[0]));
|
||||
if(date.length() == 4) {
|
||||
tdrc->setText(tdrc->toString() + '-' + date.substr(2, 2) + '-' + date.substr(0, 2));
|
||||
if(tag->frameList("TIME").size() == 1) {
|
||||
UnknownFrame *timeframe = dynamic_cast<UnknownFrame *>(tag->frameList("TIME").front());
|
||||
if(timeframe && timeframe->data().size() >= 5) {
|
||||
String time(timeframe->data().mid(1), String::Type(timeframe->data()[0]));
|
||||
String time(timeframe->data().mid(1), static_cast<String::Type>(timeframe->data()[0]));
|
||||
if(time.length() == 4) {
|
||||
tdrc->setText(tdrc->toString() + 'T' + time.substr(0, 2) + ':' + time.substr(2, 2));
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace TagLib {
|
||||
FrameFactoryPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -160,8 +160,8 @@ ByteVector Header::render() const
|
||||
// add the version number -- we always render a 2.4.0 tag regardless of what
|
||||
// the tag originally was.
|
||||
|
||||
v.append(char(majorVersion()));
|
||||
v.append(char(0));
|
||||
v.append(static_cast<char>(majorVersion()));
|
||||
v.append(static_cast<char>(0));
|
||||
|
||||
// Currently we don't actually support writing extended headers, footers or
|
||||
// unsynchronized tags, make sure that the flags are set accordingly.
|
||||
@@ -178,7 +178,7 @@ ByteVector Header::render() const
|
||||
flags[5] = d->experimentalIndicator;
|
||||
flags[4] = d->footerPresent;
|
||||
|
||||
v.append(char(flags.to_ulong()));
|
||||
v.append(static_cast<char>(flags.to_ulong()));
|
||||
|
||||
// add the size
|
||||
v.append(SynchData::fromUInt(d->tagSize));
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace TagLib {
|
||||
HeaderPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,9 +62,9 @@ namespace TagLib {
|
||||
* Convert the data from unsynchronized data to its original format.
|
||||
*/
|
||||
TAGLIB_EXPORT ByteVector decode(const ByteVector &input);
|
||||
}
|
||||
} // namespace SynchData
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -186,9 +186,13 @@ String ID3v2::Tag::genre() const
|
||||
// the behavior the same as released versions it is being left with " ".
|
||||
|
||||
const FrameList &tconFrames = d->frameListMap["TCON"];
|
||||
TextIdentificationFrame *f;
|
||||
if(tconFrames.isEmpty() ||
|
||||
!(f = dynamic_cast<TextIdentificationFrame *>(tconFrames.front())))
|
||||
if(tconFrames.isEmpty())
|
||||
{
|
||||
return String();
|
||||
}
|
||||
|
||||
TextIdentificationFrame *f = dynamic_cast<TextIdentificationFrame *>(tconFrames.front());
|
||||
if(!f)
|
||||
{
|
||||
return String();
|
||||
}
|
||||
@@ -780,7 +784,6 @@ void ID3v2::Tag::parse(const ByteVector &origData)
|
||||
d->extendedHeader->setData(data);
|
||||
if(d->extendedHeader->size() <= data.size()) {
|
||||
frameDataPosition += d->extendedHeader->size();
|
||||
frameDataLength -= d->extendedHeader->size();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace TagLib {
|
||||
TagPrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace ID3v2
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@ using namespace TagLib;
|
||||
namespace
|
||||
{
|
||||
enum { ID3v2Index = 0, APEIndex = 1, ID3v1Index = 2 };
|
||||
}
|
||||
} // namespace
|
||||
|
||||
class MPEG::File::FilePrivate
|
||||
{
|
||||
@@ -237,10 +237,10 @@ bool MPEG::File::save(int tags, StripTags strip, ID3v2::Version version, Duplica
|
||||
// Copy the values from the tag that does exist into the new tag,
|
||||
// except if the existing tag is to be stripped.
|
||||
|
||||
if((tags & ID3v2) && ID3v1Tag() && !(strip == StripOthers && !(tags & ID3v1)))
|
||||
if((tags & ID3v2) && ID3v1Tag() && (strip != StripOthers || (tags & ID3v1)))
|
||||
Tag::duplicate(ID3v1Tag(), ID3v2Tag(true), false);
|
||||
|
||||
if((tags & ID3v1) && d->tag[ID3v2Index] && !(strip == StripOthers && !(tags & ID3v2)))
|
||||
if((tags & ID3v1) && d->tag[ID3v2Index] && (strip != StripOthers || (tags & ID3v2)))
|
||||
Tag::duplicate(ID3v2Tag(), ID3v1Tag(true), false);
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ namespace TagLib {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPEG
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace TagLib {
|
||||
class HeaderPrivate;
|
||||
HeaderPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPEG
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace TagLib {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPEG
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,9 +54,9 @@ namespace TagLib
|
||||
return (b1 == 0xFF && b2 != 0xFF && (b2 & 0xE0) == 0xE0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace MPEG
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace TagLib {
|
||||
class XingHeaderPrivate;
|
||||
XingHeaderPrivate *d;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MPEG
|
||||
} // namespace TagLib
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user