taglib: Rename Properties to AudioProperties
This commit is contained in:
6
3rdparty/taglib/mp4/mp4file.cpp
vendored
6
3rdparty/taglib/mp4/mp4file.cpp
vendored
@@ -63,7 +63,7 @@ class MP4::File::FilePrivate {
|
||||
|
||||
MP4::Tag *tag;
|
||||
MP4::Atoms *atoms;
|
||||
MP4::Properties *properties;
|
||||
MP4::AudioProperties *properties;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -118,7 +118,7 @@ PropertyMap MP4::File::setProperties(const PropertyMap &properties) {
|
||||
return d->tag->setProperties(properties);
|
||||
}
|
||||
|
||||
MP4::Properties *
|
||||
MP4::AudioProperties *
|
||||
MP4::File::audioProperties() const {
|
||||
return d->properties;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void MP4::File::read(bool readProperties) {
|
||||
|
||||
d->tag = new Tag(this, d->atoms);
|
||||
if (readProperties) {
|
||||
d->properties = new Properties(this, d->atoms);
|
||||
d->properties = new AudioProperties(this, d->atoms);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
6
3rdparty/taglib/mp4/mp4file.h
vendored
6
3rdparty/taglib/mp4/mp4file.h
vendored
@@ -54,7 +54,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 audioPropertiesStyle = Properties::Average);
|
||||
File(FileName file, bool readProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs an MP4 file from \a stream.
|
||||
@@ -66,7 +66,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 audioPropertiesStyle = Properties::Average);
|
||||
AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
@@ -101,7 +101,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
/*!
|
||||
* Returns the MP4 audio properties for this file.
|
||||
*/
|
||||
Properties *audioProperties() const;
|
||||
AudioProperties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Save the file.
|
||||
|
||||
30
3rdparty/taglib/mp4/mp4properties.cpp
vendored
30
3rdparty/taglib/mp4/mp4properties.cpp
vendored
@@ -31,15 +31,15 @@
|
||||
|
||||
using namespace Strawberry_TagLib::TagLib;
|
||||
|
||||
class MP4::Properties::PropertiesPrivate {
|
||||
class MP4::AudioProperties::AudioPropertiesPrivate {
|
||||
public:
|
||||
PropertiesPrivate() : length(0),
|
||||
AudioPropertiesPrivate() : length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
bitsPerSample(0),
|
||||
encrypted(false),
|
||||
codec(MP4::Properties::Unknown) {}
|
||||
codec(MP4::AudioProperties::Unknown) {}
|
||||
|
||||
int length;
|
||||
int bitrate;
|
||||
@@ -54,44 +54,44 @@ class MP4::Properties::PropertiesPrivate {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MP4::Properties::Properties(File *file, MP4::Atoms *atoms, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) {
|
||||
MP4::AudioProperties::AudioProperties(File *file, MP4::Atoms *atoms, ReadStyle style) : Strawberry_TagLib::TagLib::AudioProperties(style), d(new AudioPropertiesPrivate()) {
|
||||
read(file, atoms);
|
||||
}
|
||||
|
||||
MP4::Properties::~Properties() {
|
||||
MP4::AudioProperties::~AudioProperties() {
|
||||
delete d;
|
||||
}
|
||||
|
||||
int MP4::Properties::channels() const {
|
||||
int MP4::AudioProperties::channels() const {
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
int MP4::Properties::sampleRate() const {
|
||||
int MP4::AudioProperties::sampleRate() const {
|
||||
return d->sampleRate;
|
||||
}
|
||||
|
||||
int MP4::Properties::lengthInSeconds() const {
|
||||
int MP4::AudioProperties::lengthInSeconds() const {
|
||||
return d->length / 1000;
|
||||
}
|
||||
|
||||
int MP4::Properties::lengthInMilliseconds() const {
|
||||
int MP4::AudioProperties::lengthInMilliseconds() const {
|
||||
return d->length;
|
||||
}
|
||||
|
||||
int MP4::Properties::bitrate() const {
|
||||
int MP4::AudioProperties::bitrate() const {
|
||||
return d->bitrate;
|
||||
}
|
||||
|
||||
int MP4::Properties::bitsPerSample() const {
|
||||
int MP4::AudioProperties::bitsPerSample() const {
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
bool MP4::Properties::isEncrypted() const {
|
||||
bool MP4::AudioProperties::isEncrypted() const {
|
||||
return d->encrypted;
|
||||
}
|
||||
|
||||
MP4::Properties::Codec
|
||||
MP4::Properties::codec() const {
|
||||
MP4::AudioProperties::Codec
|
||||
MP4::AudioProperties::codec() const {
|
||||
return d->codec;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ MP4::Properties::codec() const {
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void MP4::Properties::read(File *file, Atoms *atoms) {
|
||||
void MP4::AudioProperties::read(File *file, Atoms *atoms) {
|
||||
|
||||
MP4::Atom *moov = atoms->find("moov");
|
||||
if (!moov) {
|
||||
|
||||
10
3rdparty/taglib/mp4/mp4properties.h
vendored
10
3rdparty/taglib/mp4/mp4properties.h
vendored
@@ -37,7 +37,7 @@ class Atoms;
|
||||
class File;
|
||||
|
||||
//! An implementation of MP4 audio properties
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioProperties {
|
||||
public:
|
||||
enum Codec {
|
||||
Unknown = 0,
|
||||
@@ -45,8 +45,8 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
ALAC
|
||||
};
|
||||
|
||||
Properties(File *file, Atoms *atoms, ReadStyle style = Average);
|
||||
virtual ~Properties();
|
||||
AudioProperties(File *file, Atoms *atoms, ReadStyle style = Average);
|
||||
virtual ~AudioProperties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to the nearest whole second.
|
||||
@@ -97,8 +97,8 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
private:
|
||||
void read(File *file, Atoms *atoms);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class AudioPropertiesPrivate;
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace MP4
|
||||
|
||||
Reference in New Issue
Block a user