Update taglib
This commit is contained in:
13
3rdparty/taglib/dsdiff/dsdifffile.cpp
vendored
13
3rdparty/taglib/dsdiff/dsdifffile.cpp
vendored
@@ -28,6 +28,7 @@
|
|||||||
#include <id3v2tag.h>
|
#include <id3v2tag.h>
|
||||||
#include <tstringlist.h>
|
#include <tstringlist.h>
|
||||||
#include <tpropertymap.h>
|
#include <tpropertymap.h>
|
||||||
|
#include <tagutils.h>
|
||||||
|
|
||||||
#include "tagunion.h"
|
#include "tagunion.h"
|
||||||
#include "dsdifffile.h"
|
#include "dsdifffile.h"
|
||||||
@@ -97,6 +98,18 @@ public:
|
|||||||
bool hasDiin;
|
bool hasDiin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// static members
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool DSDIFF::File::isSupported(IOStream *stream)
|
||||||
|
{
|
||||||
|
// A DSDIFF file has to start with "FRM8????????DSD ".
|
||||||
|
|
||||||
|
const ByteVector id = Utils::readHeader(stream, 16, false);
|
||||||
|
return (id.startsWith("FRM8") && id.containsAt("DSD ", 12));
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// public members
|
// public members
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
9
3rdparty/taglib/dsdiff/dsdifffile.h
vendored
9
3rdparty/taglib/dsdiff/dsdifffile.h
vendored
@@ -185,6 +185,15 @@ namespace TagLib {
|
|||||||
*/
|
*/
|
||||||
bool hasDIINTag() const;
|
bool hasDIINTag() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Returns whether or not the given \a stream can be opened as a DSDIFF
|
||||||
|
* file.
|
||||||
|
*
|
||||||
|
* \note This method is designed to do a quick check. The result may
|
||||||
|
* not necessarily be correct.
|
||||||
|
*/
|
||||||
|
static bool isSupported(IOStream *stream);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum Endianness { BigEndian, LittleEndian };
|
enum Endianness { BigEndian, LittleEndian };
|
||||||
|
|
||||||
|
|||||||
14
3rdparty/taglib/dsf/dsffile.cpp
vendored
14
3rdparty/taglib/dsf/dsffile.cpp
vendored
@@ -1,5 +1,5 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
copyright : (C) 2013 by Stephen F. Booth
|
copyright : (C) 2013 - 2018 by Stephen F. Booth
|
||||||
email : me@sbooth.org
|
email : me@sbooth.org
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <id3v2tag.h>
|
#include <id3v2tag.h>
|
||||||
#include <tstringlist.h>
|
#include <tstringlist.h>
|
||||||
#include <tpropertymap.h>
|
#include <tpropertymap.h>
|
||||||
|
#include <tagutils.h>
|
||||||
|
|
||||||
#include "dsffile.h"
|
#include "dsffile.h"
|
||||||
|
|
||||||
@@ -56,6 +57,17 @@ public:
|
|||||||
ID3v2::Tag *tag;
|
ID3v2::Tag *tag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// static members
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool DSF::File::isSupported(IOStream *stream)
|
||||||
|
{
|
||||||
|
// A DSF file has to start with "DSD "
|
||||||
|
const ByteVector id = Utils::readHeader(stream, 4, false);
|
||||||
|
return id.startsWith("DSD ");
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// public members
|
// public members
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
11
3rdparty/taglib/dsf/dsffile.h
vendored
11
3rdparty/taglib/dsf/dsffile.h
vendored
@@ -1,5 +1,5 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
copyright : (C) 2013 by Stephen F. Booth
|
copyright : (C) 2013 - 2018 by Stephen F. Booth
|
||||||
email : me@sbooth.org
|
email : me@sbooth.org
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@@ -103,6 +103,15 @@ namespace TagLib {
|
|||||||
*/
|
*/
|
||||||
virtual bool save();
|
virtual bool save();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Returns whether or not the given \a stream can be opened as a DSF
|
||||||
|
* file.
|
||||||
|
*
|
||||||
|
* \note This method is designed to do a quick check. The result may
|
||||||
|
* not necessarily be correct.
|
||||||
|
*/
|
||||||
|
static bool isSupported(IOStream *stream);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
File(const File &);
|
File(const File &);
|
||||||
File &operator=(const File &);
|
File &operator=(const File &);
|
||||||
|
|||||||
8
3rdparty/taglib/fileref.cpp
vendored
8
3rdparty/taglib/fileref.cpp
vendored
@@ -180,10 +180,10 @@ namespace
|
|||||||
file = new RIFF::WAV::File(stream, readAudioProperties, audioPropertiesStyle);
|
file = new RIFF::WAV::File(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
else if(APE::File::isSupported(stream))
|
else if(APE::File::isSupported(stream))
|
||||||
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
|
file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
//else if(DSF::File::isSupported(stream))
|
else if(DSDIFF::File::isSupported(stream))
|
||||||
//return new DSDIFF::File(stream, readAudioProperties, audioPropertiesStyle);
|
file = new DSDIFF::File(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
//else if(DSDIFF::File::isSupported(stream))
|
else if(DSF::File::isSupported(stream))
|
||||||
//return new DSF::File(stream, readAudioProperties, audioPropertiesStyle);
|
file = new DSF::File(stream, readAudioProperties, audioPropertiesStyle);
|
||||||
|
|
||||||
// isSupported() only does a quick check, so double check the file here.
|
// isSupported() only does a quick check, so double check the file here.
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,23 @@ void TableOfContentsFrame::removeEmbeddedFrames(const ByteVector &id)
|
|||||||
|
|
||||||
String TableOfContentsFrame::toString() const
|
String TableOfContentsFrame::toString() const
|
||||||
{
|
{
|
||||||
return String();
|
String s = String(d->elementID) +
|
||||||
|
": top level: " + (d->isTopLevel ? "true" : "false") +
|
||||||
|
", ordered: " + (d->isOrdered ? "true" : "false");
|
||||||
|
|
||||||
|
if(!d->childElements.isEmpty()) {
|
||||||
|
s+= ", chapters: [ " + String(d->childElements.toByteVector(", ")) + " ]";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!d->embeddedFrameList.isEmpty()) {
|
||||||
|
StringList frameIDs;
|
||||||
|
for(FrameList::ConstIterator it = d->embeddedFrameList.begin();
|
||||||
|
it != d->embeddedFrameList.end(); ++it)
|
||||||
|
frameIDs.append((*it)->frameID());
|
||||||
|
s += ", sub-frames: [ " + frameIDs.toString(", ") + " ]";
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyMap TableOfContentsFrame::asProperties() const
|
PropertyMap TableOfContentsFrame::asProperties() const
|
||||||
|
|||||||
Reference in New Issue
Block a user