taglib: Rename Properties to AudioProperties
This commit is contained in:
10
3rdparty/taglib/asf/asffile.cpp
vendored
10
3rdparty/taglib/asf/asffile.cpp
vendored
@@ -68,7 +68,7 @@ class ASF::File::FilePrivate {
|
||||
unsigned long long headerSize;
|
||||
|
||||
ASF::Tag *tag;
|
||||
ASF::Properties *properties;
|
||||
ASF::AudioProperties *properties;
|
||||
|
||||
List<BaseObject *> objects;
|
||||
|
||||
@@ -474,12 +474,12 @@ bool ASF::File::isSupported(IOStream *stream) {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ASF::File::File(FileName file, bool, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate()) {
|
||||
ASF::File::File(FileName file, bool, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(file), d(new FilePrivate()) {
|
||||
if (isOpen())
|
||||
read();
|
||||
}
|
||||
|
||||
ASF::File::File(IOStream *stream, bool, Properties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate()) {
|
||||
ASF::File::File(IOStream *stream, bool, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(stream), d(new FilePrivate()) {
|
||||
if (isOpen())
|
||||
read();
|
||||
}
|
||||
@@ -504,7 +504,7 @@ PropertyMap ASF::File::setProperties(const PropertyMap &properties) {
|
||||
return d->tag->setProperties(properties);
|
||||
}
|
||||
|
||||
ASF::Properties *ASF::File::audioProperties() const {
|
||||
ASF::AudioProperties *ASF::File::audioProperties() const {
|
||||
return d->properties;
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ void ASF::File::read() {
|
||||
}
|
||||
|
||||
d->tag = new ASF::Tag();
|
||||
d->properties = new ASF::Properties();
|
||||
d->properties = new ASF::AudioProperties();
|
||||
|
||||
bool ok;
|
||||
d->headerSize = readQWORD(this, &ok);
|
||||
|
||||
6
3rdparty/taglib/asf/asffile.h
vendored
6
3rdparty/taglib/asf/asffile.h
vendored
@@ -54,7 +54,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
* read.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs an ASF file from \a stream.
|
||||
@@ -66,7 +66,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
* \note TagLib will *not* take ownership of the stream, the caller is
|
||||
* responsible for deleting it after the File object.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
@@ -103,7 +103,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
/*!
|
||||
* Returns the ASF audio properties for this file.
|
||||
*/
|
||||
virtual Properties *audioProperties() const;
|
||||
virtual AudioProperties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Save the file.
|
||||
|
||||
56
3rdparty/taglib/asf/asfproperties.cpp
vendored
56
3rdparty/taglib/asf/asfproperties.cpp
vendored
@@ -29,14 +29,14 @@
|
||||
|
||||
using namespace Strawberry_TagLib::TagLib;
|
||||
|
||||
class ASF::Properties::PropertiesPrivate {
|
||||
class ASF::AudioProperties::AudioPropertiesPrivate {
|
||||
public:
|
||||
PropertiesPrivate() : length(0),
|
||||
AudioPropertiesPrivate() : length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
bitsPerSample(0),
|
||||
codec(ASF::Properties::Unknown),
|
||||
codec(ASF::AudioProperties::Unknown),
|
||||
encrypted(false) {}
|
||||
|
||||
int length;
|
||||
@@ -44,7 +44,7 @@ class ASF::Properties::PropertiesPrivate {
|
||||
int sampleRate;
|
||||
int channels;
|
||||
int bitsPerSample;
|
||||
ASF::Properties::Codec codec;
|
||||
ASF::AudioProperties::Codec codec;
|
||||
String codecName;
|
||||
String codecDescription;
|
||||
bool encrypted;
|
||||
@@ -54,51 +54,51 @@ class ASF::Properties::PropertiesPrivate {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ASF::Properties::Properties() : AudioProperties(AudioProperties::Average),
|
||||
d(new PropertiesPrivate()) {
|
||||
ASF::AudioProperties::AudioProperties() : Strawberry_TagLib::TagLib::AudioProperties(AudioProperties::Average),
|
||||
d(new AudioPropertiesPrivate()) {
|
||||
}
|
||||
|
||||
ASF::Properties::~Properties() {
|
||||
ASF::AudioProperties::~AudioProperties() {
|
||||
delete d;
|
||||
}
|
||||
|
||||
int ASF::Properties::lengthInSeconds() const {
|
||||
int ASF::AudioProperties::lengthInSeconds() const {
|
||||
return d->length / 1000;
|
||||
}
|
||||
|
||||
int ASF::Properties::lengthInMilliseconds() const {
|
||||
int ASF::AudioProperties::lengthInMilliseconds() const {
|
||||
return d->length;
|
||||
}
|
||||
|
||||
int ASF::Properties::bitrate() const {
|
||||
int ASF::AudioProperties::bitrate() const {
|
||||
return d->bitrate;
|
||||
}
|
||||
|
||||
int ASF::Properties::sampleRate() const {
|
||||
int ASF::AudioProperties::sampleRate() const {
|
||||
return d->sampleRate;
|
||||
}
|
||||
|
||||
int ASF::Properties::channels() const {
|
||||
int ASF::AudioProperties::channels() const {
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
int ASF::Properties::bitsPerSample() const {
|
||||
int ASF::AudioProperties::bitsPerSample() const {
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
ASF::Properties::Codec ASF::Properties::codec() const {
|
||||
ASF::AudioProperties::Codec ASF::AudioProperties::codec() const {
|
||||
return d->codec;
|
||||
}
|
||||
|
||||
String ASF::Properties::codecName() const {
|
||||
String ASF::AudioProperties::codecName() const {
|
||||
return d->codecName;
|
||||
}
|
||||
|
||||
String ASF::Properties::codecDescription() const {
|
||||
String ASF::AudioProperties::codecDescription() const {
|
||||
return d->codecDescription;
|
||||
}
|
||||
|
||||
bool ASF::Properties::isEncrypted() const {
|
||||
bool ASF::AudioProperties::isEncrypted() const {
|
||||
return d->encrypted;
|
||||
}
|
||||
|
||||
@@ -106,31 +106,31 @@ bool ASF::Properties::isEncrypted() const {
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ASF::Properties::setLength(int /*length*/) {
|
||||
debug("ASF::Properties::setLength() -- This method is deprecated. Do not use.");
|
||||
void ASF::AudioProperties::setLength(int /*length*/) {
|
||||
debug("ASF::AudioProperties::setLength() -- This method is deprecated. Do not use.");
|
||||
}
|
||||
|
||||
void ASF::Properties::setLengthInMilliseconds(int value) {
|
||||
void ASF::AudioProperties::setLengthInMilliseconds(int value) {
|
||||
d->length = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setBitrate(int value) {
|
||||
void ASF::AudioProperties::setBitrate(int value) {
|
||||
d->bitrate = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setSampleRate(int value) {
|
||||
void ASF::AudioProperties::setSampleRate(int value) {
|
||||
d->sampleRate = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setChannels(int value) {
|
||||
void ASF::AudioProperties::setChannels(int value) {
|
||||
d->channels = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setBitsPerSample(int value) {
|
||||
void ASF::AudioProperties::setBitsPerSample(int value) {
|
||||
d->bitsPerSample = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setCodec(int value) {
|
||||
void ASF::AudioProperties::setCodec(int value) {
|
||||
|
||||
switch (value) {
|
||||
case 0x0160:
|
||||
@@ -152,14 +152,14 @@ void ASF::Properties::setCodec(int value) {
|
||||
|
||||
}
|
||||
|
||||
void ASF::Properties::setCodecName(const String &value) {
|
||||
void ASF::AudioProperties::setCodecName(const String &value) {
|
||||
d->codecName = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setCodecDescription(const String &value) {
|
||||
void ASF::AudioProperties::setCodecDescription(const String &value) {
|
||||
d->codecDescription = value;
|
||||
}
|
||||
|
||||
void ASF::Properties::setEncrypted(bool value) {
|
||||
void ASF::AudioProperties::setEncrypted(bool value) {
|
||||
d->encrypted = value;
|
||||
}
|
||||
|
||||
12
3rdparty/taglib/asf/asfproperties.h
vendored
12
3rdparty/taglib/asf/asfproperties.h
vendored
@@ -35,7 +35,7 @@ namespace TagLib {
|
||||
namespace ASF {
|
||||
|
||||
//! An implementation of ASF audio properties
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioProperties {
|
||||
public:
|
||||
/*!
|
||||
* Audio codec types can be used in ASF file.
|
||||
@@ -70,12 +70,12 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
/*!
|
||||
* Creates an instance of ASF::Properties.
|
||||
*/
|
||||
Properties();
|
||||
AudioProperties();
|
||||
|
||||
/*!
|
||||
* Destroys this ASF::Properties instance.
|
||||
* Destroys this ASF::AudioProperties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
virtual ~AudioProperties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
@@ -160,8 +160,8 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
#endif
|
||||
|
||||
private:
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class AudioPropertiesPrivate;
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ASF
|
||||
|
||||
Reference in New Issue
Block a user