mirror of
https://github.com/taglib/taglib.git
synced 2025-11-16 22:52:57 -05:00
Changed names of derived classes of AudioProperties
This commit is contained in:
@ -47,7 +47,7 @@ public:
|
||||
metadataLibraryObject(0) {}
|
||||
unsigned long long size;
|
||||
ASF::Tag *tag;
|
||||
ASF::Properties *properties;
|
||||
ASF::AudioProperties *properties;
|
||||
List<ASF::File::BaseObject *> objects;
|
||||
ASF::File::ContentDescriptionObject *contentDescriptionObject;
|
||||
ASF::File::ExtendedContentDescriptionObject *extendedContentDescriptionObject;
|
||||
@ -365,7 +365,7 @@ ByteVector ASF::File::HeaderExtensionObject::render(ASF::File *file)
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ASF::File::File(FileName file, bool readProperties, Properties::ReadStyle propertiesStyle)
|
||||
ASF::File::File(FileName file, bool readProperties, AudioProperties::ReadStyle propertiesStyle)
|
||||
: TagLib::File(file)
|
||||
{
|
||||
d = new FilePrivate;
|
||||
@ -373,7 +373,7 @@ ASF::File::File(FileName file, bool readProperties, Properties::ReadStyle proper
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
ASF::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle propertiesStyle)
|
||||
ASF::File::File(IOStream *stream, bool readProperties, AudioProperties::ReadStyle propertiesStyle)
|
||||
: TagLib::File(stream)
|
||||
{
|
||||
d = new FilePrivate;
|
||||
@ -415,12 +415,12 @@ 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;
|
||||
}
|
||||
|
||||
void ASF::File::read(bool /*readProperties*/, Properties::ReadStyle /*propertiesStyle*/)
|
||||
void ASF::File::read(bool /*readProperties*/, AudioProperties::ReadStyle /*propertiesStyle*/)
|
||||
{
|
||||
if(!isValid())
|
||||
return;
|
||||
@ -433,7 +433,7 @@ void ASF::File::read(bool /*readProperties*/, Properties::ReadStyle /*properties
|
||||
}
|
||||
|
||||
d->tag = new ASF::Tag();
|
||||
d->properties = new ASF::Properties();
|
||||
d->properties = new ASF::AudioProperties();
|
||||
|
||||
bool ok;
|
||||
d->size = readQWORD(&ok);
|
||||
|
||||
@ -58,7 +58,7 @@ namespace TagLib {
|
||||
* \note TagLib will *not* take ownership of the stream, the caller is
|
||||
* responsible for deleting it after the File object.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Contructs an ASF file from \a file. If \a readProperties is true the
|
||||
@ -71,7 +71,7 @@ namespace TagLib {
|
||||
* \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.
|
||||
@ -109,7 +109,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Returns the ASF audio properties for this file.
|
||||
*/
|
||||
virtual Properties *audioProperties() const;
|
||||
virtual AudioProperties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Save the file.
|
||||
@ -126,7 +126,7 @@ namespace TagLib {
|
||||
long long readQWORD(bool *ok = 0);
|
||||
static ByteVector renderString(const String &str, bool includeLength = false);
|
||||
String readString(int len);
|
||||
void read(bool readProperties, Properties::ReadStyle propertiesStyle);
|
||||
void read(bool readProperties, AudioProperties::ReadStyle propertiesStyle);
|
||||
|
||||
friend class Attribute;
|
||||
friend class Picture;
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
using namespace TagLib;
|
||||
|
||||
class ASF::Properties::PropertiesPrivate
|
||||
class ASF::AudioProperties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate(): length(0), bitrate(0), sampleRate(0), channels(0), encrypted(false) {}
|
||||
@ -45,38 +45,39 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ASF::Properties::Properties() : AudioProperties(AudioProperties::Average)
|
||||
ASF::AudioProperties::AudioProperties()
|
||||
: TagLib::AudioProperties(AudioProperties::Average)
|
||||
{
|
||||
d = new PropertiesPrivate;
|
||||
}
|
||||
|
||||
ASF::Properties::~Properties()
|
||||
ASF::AudioProperties::~AudioProperties()
|
||||
{
|
||||
if(d)
|
||||
delete d;
|
||||
}
|
||||
|
||||
int ASF::Properties::length() const
|
||||
int ASF::AudioProperties::length() 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;
|
||||
}
|
||||
|
||||
bool ASF::Properties::isEncrypted() const
|
||||
bool ASF::AudioProperties::isEncrypted() const
|
||||
{
|
||||
return d->encrypted;
|
||||
}
|
||||
@ -85,27 +86,27 @@ bool ASF::Properties::isEncrypted() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ASF::Properties::setLength(int length)
|
||||
void ASF::AudioProperties::setLength(int length)
|
||||
{
|
||||
d->length = length;
|
||||
}
|
||||
|
||||
void ASF::Properties::setBitrate(int length)
|
||||
void ASF::AudioProperties::setBitrate(int length)
|
||||
{
|
||||
d->bitrate = length;
|
||||
}
|
||||
|
||||
void ASF::Properties::setSampleRate(int length)
|
||||
void ASF::AudioProperties::setSampleRate(int length)
|
||||
{
|
||||
d->sampleRate = length;
|
||||
}
|
||||
|
||||
void ASF::Properties::setChannels(int length)
|
||||
void ASF::AudioProperties::setChannels(int length)
|
||||
{
|
||||
d->channels = length;
|
||||
}
|
||||
|
||||
void ASF::Properties::setEncrypted(bool encrypted)
|
||||
void ASF::AudioProperties::setEncrypted(bool encrypted)
|
||||
{
|
||||
d->encrypted = encrypted;
|
||||
}
|
||||
|
||||
@ -35,19 +35,19 @@ namespace TagLib {
|
||||
namespace ASF {
|
||||
|
||||
//! An implementation of ASF audio properties
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
class TAGLIB_EXPORT AudioProperties : public TagLib::AudioProperties
|
||||
{
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Create an instance of ASF::Properties.
|
||||
* Create an instance of ASF::AudioProperties.
|
||||
*/
|
||||
Properties();
|
||||
AudioProperties();
|
||||
|
||||
/*!
|
||||
* Destroys this ASF::Properties instance.
|
||||
* Destroys this ASF::AudioProperties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
virtual ~AudioProperties();
|
||||
|
||||
// Reimplementations.
|
||||
virtual int length() const;
|
||||
|
||||
Reference in New Issue
Block a user