taglib: Rename Properties to AudioProperties
This commit is contained in:
14
3rdparty/taglib/trueaudio/trueaudiofile.cpp
vendored
14
3rdparty/taglib/trueaudio/trueaudiofile.cpp
vendored
@@ -69,7 +69,7 @@ class TrueAudio::File::FilePrivate {
|
||||
|
||||
TagUnion tag;
|
||||
|
||||
Properties *properties;
|
||||
AudioProperties *properties;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -89,28 +89,28 @@ bool TrueAudio::File::isSupported(IOStream *stream) {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TrueAudio::File::File(FileName file, bool readProperties, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate()) {
|
||||
TrueAudio::File::File(FileName file, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate()) {
|
||||
|
||||
if (isOpen())
|
||||
read(readProperties);
|
||||
|
||||
}
|
||||
|
||||
TrueAudio::File::File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate(frameFactory)) {
|
||||
TrueAudio::File::File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate(frameFactory)) {
|
||||
|
||||
if (isOpen())
|
||||
read(readProperties);
|
||||
|
||||
}
|
||||
|
||||
TrueAudio::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate()) {
|
||||
TrueAudio::File::File(IOStream *stream, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate()) {
|
||||
|
||||
if (isOpen())
|
||||
read(readProperties);
|
||||
|
||||
}
|
||||
|
||||
TrueAudio::File::File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate(frameFactory)) {
|
||||
TrueAudio::File::File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate(frameFactory)) {
|
||||
|
||||
if (isOpen())
|
||||
read(readProperties);
|
||||
@@ -142,7 +142,7 @@ PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties) {
|
||||
|
||||
}
|
||||
|
||||
TrueAudio::Properties *TrueAudio::File::audioProperties() const {
|
||||
TrueAudio::AudioProperties *TrueAudio::File::audioProperties() const {
|
||||
return d->properties;
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ void TrueAudio::File::read(bool readProperties) {
|
||||
seek(0);
|
||||
}
|
||||
|
||||
d->properties = new Properties(readBlock(TrueAudio::HeaderSize), streamLength);
|
||||
d->properties = new AudioProperties(readBlock(TrueAudio::HeaderSize), streamLength);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
12
3rdparty/taglib/trueaudio/trueaudiofile.h
vendored
12
3rdparty/taglib/trueaudio/trueaudiofile.h
vendored
@@ -87,7 +87,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs a TrueAudio file from \a file.
|
||||
@@ -97,7 +97,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
*
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs a TrueAudio file from \a stream.
|
||||
@@ -107,7 +107,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
*
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs a TrueAudio file from \a stream.
|
||||
@@ -119,7 +119,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
*
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
@@ -146,10 +146,10 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
void removeUnsupportedProperties(const StringList &properties);
|
||||
|
||||
/*!
|
||||
* Returns the TrueAudio::Properties for this file.
|
||||
* Returns the TrueAudio::AudioProperties for this file.
|
||||
* If no audio properties were read then this will return a null pointer.
|
||||
*/
|
||||
virtual Properties *audioProperties() const;
|
||||
virtual AudioProperties *audioProperties() const;
|
||||
/*!
|
||||
* Saves the file.
|
||||
*/
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
using namespace Strawberry_TagLib::TagLib;
|
||||
|
||||
class TrueAudio::Properties::PropertiesPrivate {
|
||||
class TrueAudio::AudioProperties::AudioPropertiesPrivate {
|
||||
public:
|
||||
PropertiesPrivate() : version(0),
|
||||
AudioPropertiesPrivate() : version(0),
|
||||
length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
@@ -59,43 +59,43 @@ class TrueAudio::Properties::PropertiesPrivate {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TrueAudio::Properties::Properties(const ByteVector &data, long streamLength, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) {
|
||||
TrueAudio::AudioProperties::AudioProperties(const ByteVector &data, long streamLength, ReadStyle style) : Strawberry_TagLib::TagLib::AudioProperties(style), d(new AudioPropertiesPrivate()) {
|
||||
read(data, streamLength);
|
||||
}
|
||||
|
||||
TrueAudio::Properties::~Properties() {
|
||||
TrueAudio::AudioProperties::~AudioProperties() {
|
||||
delete d;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::lengthInSeconds() const {
|
||||
int TrueAudio::AudioProperties::lengthInSeconds() const {
|
||||
return d->length / 1000;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::lengthInMilliseconds() const {
|
||||
int TrueAudio::AudioProperties::lengthInMilliseconds() const {
|
||||
return d->length;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::bitrate() const {
|
||||
int TrueAudio::AudioProperties::bitrate() const {
|
||||
return d->bitrate;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::sampleRate() const {
|
||||
int TrueAudio::AudioProperties::sampleRate() const {
|
||||
return d->sampleRate;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::bitsPerSample() const {
|
||||
int TrueAudio::AudioProperties::bitsPerSample() const {
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::channels() const {
|
||||
int TrueAudio::AudioProperties::channels() const {
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
unsigned int TrueAudio::Properties::sampleFrames() const {
|
||||
unsigned int TrueAudio::AudioProperties::sampleFrames() const {
|
||||
return d->sampleFrames;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::ttaVersion() const {
|
||||
int TrueAudio::AudioProperties::ttaVersion() const {
|
||||
return d->version;
|
||||
}
|
||||
|
||||
@@ -103,15 +103,15 @@ int TrueAudio::Properties::ttaVersion() const {
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void TrueAudio::Properties::read(const ByteVector &data, long streamLength) {
|
||||
void TrueAudio::AudioProperties::read(const ByteVector &data, long streamLength) {
|
||||
|
||||
if (data.size() < 4) {
|
||||
debug("TrueAudio::Properties::read() -- data is too short.");
|
||||
debug("TrueAudio::AudioProperties::read() -- data is too short.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.startsWith("TTA")) {
|
||||
debug("TrueAudio::Properties::read() -- invalid header signature.");
|
||||
debug("TrueAudio::AudioProperties::read() -- invalid header signature.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ void TrueAudio::Properties::read(const ByteVector &data, long streamLength) {
|
||||
// TTA2 headers are in development, and have a different format
|
||||
if (1 == d->version) {
|
||||
if (data.size() < 18) {
|
||||
debug("TrueAudio::Properties::read() -- data is too short.");
|
||||
debug("TrueAudio::AudioProperties::read() -- data is too short.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
18
3rdparty/taglib/trueaudio/trueaudioproperties.h
vendored
18
3rdparty/taglib/trueaudio/trueaudioproperties.h
vendored
@@ -46,17 +46,17 @@ static const unsigned int HeaderSize = 18;
|
||||
* This reads the data from an TrueAudio stream found in the AudioProperties API.
|
||||
*/
|
||||
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioProperties {
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of TrueAudio::Properties with the data read from the ByteVector \a data.
|
||||
* Create an instance of TrueAudio::AudioProperties with the data read from the ByteVector \a data.
|
||||
*/
|
||||
Properties(const ByteVector &data, long streamLength, ReadStyle style = Average);
|
||||
AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average);
|
||||
|
||||
/*!
|
||||
* Destroys this TrueAudio::Properties instance.
|
||||
* Destroys this TrueAudio::AudioProperties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
virtual ~AudioProperties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to the nearest whole second.
|
||||
@@ -105,13 +105,13 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
int ttaVersion() const;
|
||||
|
||||
private:
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
AudioProperties(const AudioProperties &);
|
||||
AudioProperties &operator=(const AudioProperties &);
|
||||
|
||||
void read(const ByteVector &data, long streamLength);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class AudioPropertiesPrivate;
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace TrueAudio
|
||||
|
||||
Reference in New Issue
Block a user