mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Remove deprecated stuff
This commit is contained in:
parent
ca8c2e07ec
commit
a33cc0635a
11
3rdparty/utf8-cpp/checked.h
vendored
11
3rdparty/utf8-cpp/checked.h
vendored
@ -265,11 +265,16 @@ namespace utf8
|
||||
|
||||
// The iterator class
|
||||
template <typename octet_iterator>
|
||||
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
|
||||
class iterator {
|
||||
octet_iterator it;
|
||||
octet_iterator range_start;
|
||||
octet_iterator range_end;
|
||||
public:
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
using value_type = uint32_t;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = uint32_t*;
|
||||
using reference = uint32_t&;
|
||||
iterator () {}
|
||||
explicit iterator (const octet_iterator& octet_it,
|
||||
const octet_iterator& rangestart,
|
||||
@ -323,5 +328,3 @@ namespace utf8
|
||||
} // namespace utf8
|
||||
|
||||
#endif //header guard
|
||||
|
||||
|
||||
|
@ -270,7 +270,7 @@ void taglib_tag_free_strings()
|
||||
int taglib_audioproperties_length(const TagLib_AudioProperties *audioProperties)
|
||||
{
|
||||
const AudioProperties *p = reinterpret_cast<const AudioProperties *>(audioProperties);
|
||||
return p->length();
|
||||
return p->lengthInSeconds();
|
||||
}
|
||||
|
||||
int taglib_audioproperties_bitrate(const TagLib_AudioProperties *audioProperties)
|
||||
|
@ -75,8 +75,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
TagLib::AudioProperties *properties = f.audioProperties();
|
||||
|
||||
int seconds = properties->length() % 60;
|
||||
int minutes = (properties->length() - seconds) / 60;
|
||||
int seconds = properties->lengthInSeconds() % 60;
|
||||
int minutes = (properties->lengthInSeconds() - seconds) / 60;
|
||||
|
||||
cout << "-- AUDIO --" << endl;
|
||||
cout << "bitrate - " << properties->bitrate() << endl;
|
||||
|
@ -63,13 +63,6 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
APE::Properties::Properties(File *, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
debug("APE::Properties::Properties() -- This constructor is no longer used.");
|
||||
}
|
||||
|
||||
APE::Properties::Properties(File *file, offset_t streamLength, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
@ -82,11 +75,6 @@ APE::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int APE::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int APE::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -50,14 +50,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of APE::Properties with the data read from the
|
||||
* APE::File \a file.
|
||||
*
|
||||
* \deprecated Use Properties(File *, long, ReadStyle).
|
||||
*/
|
||||
TAGLIB_DEPRECATED Properties(File *file, ReadStyle style = Average);
|
||||
|
||||
/*!
|
||||
* Create an instance of APE::Properties with the data read from the
|
||||
* APE::File \a file.
|
||||
@ -69,16 +61,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -67,11 +67,6 @@ ASF::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int ASF::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int ASF::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -78,16 +78,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -23,58 +23,10 @@
|
||||
* http://www.mozilla.org/MPL/ *
|
||||
***************************************************************************/
|
||||
|
||||
#include <tbytevector.h>
|
||||
|
||||
#include "aiffproperties.h"
|
||||
#include "apeproperties.h"
|
||||
#include "asfproperties.h"
|
||||
#include "flacproperties.h"
|
||||
#include "mp4properties.h"
|
||||
#include "mpcproperties.h"
|
||||
#include "mpegproperties.h"
|
||||
#include "opusproperties.h"
|
||||
#include "speexproperties.h"
|
||||
#include "trueaudioproperties.h"
|
||||
#include "vorbisproperties.h"
|
||||
#include "wavproperties.h"
|
||||
#include "wavpackproperties.h"
|
||||
|
||||
#include "audioproperties.h"
|
||||
|
||||
using namespace TagLib;
|
||||
|
||||
// This macro is a workaround for the fact that we can't add virtual functions.
|
||||
// Should be true virtual functions in taglib2.
|
||||
|
||||
#define VIRTUAL_FUNCTION_WORKAROUND(function_name, default_value) \
|
||||
if(dynamic_cast<const APE::Properties*>(this)) \
|
||||
return dynamic_cast<const APE::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const ASF::Properties*>(this)) \
|
||||
return dynamic_cast<const ASF::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const FLAC::Properties*>(this)) \
|
||||
return dynamic_cast<const FLAC::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const MP4::Properties*>(this)) \
|
||||
return dynamic_cast<const MP4::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const MPC::Properties*>(this)) \
|
||||
return dynamic_cast<const MPC::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const MPEG::Properties*>(this)) \
|
||||
return dynamic_cast<const MPEG::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const Ogg::Opus::Properties*>(this)) \
|
||||
return dynamic_cast<const Ogg::Opus::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const Ogg::Speex::Properties*>(this)) \
|
||||
return dynamic_cast<const Ogg::Speex::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const TrueAudio::Properties*>(this)) \
|
||||
return dynamic_cast<const TrueAudio::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const RIFF::AIFF::Properties*>(this)) \
|
||||
return dynamic_cast<const RIFF::AIFF::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const RIFF::WAV::Properties*>(this)) \
|
||||
return dynamic_cast<const RIFF::WAV::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const Vorbis::Properties*>(this)) \
|
||||
return dynamic_cast<const Vorbis::Properties*>(this)->function_name(); \
|
||||
if(dynamic_cast<const WavPack::Properties*>(this)) \
|
||||
return dynamic_cast<const WavPack::Properties*>(this)->function_name(); \
|
||||
return (default_value);
|
||||
|
||||
class AudioProperties::AudioPropertiesPrivate
|
||||
{
|
||||
|
||||
@ -89,16 +41,6 @@ AudioProperties::~AudioProperties()
|
||||
|
||||
}
|
||||
|
||||
int AudioProperties::lengthInSeconds() const
|
||||
{
|
||||
VIRTUAL_FUNCTION_WORKAROUND(lengthInSeconds, 0)
|
||||
}
|
||||
|
||||
int AudioProperties::lengthInMilliseconds() const
|
||||
{
|
||||
VIRTUAL_FUNCTION_WORKAROUND(lengthInMilliseconds, 0)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// protected methods
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -64,27 +64,20 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~AudioProperties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds.
|
||||
*/
|
||||
virtual int length() const = 0;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \see lengthInMilliseconds()
|
||||
*/
|
||||
// BIC: make virtual
|
||||
int lengthInSeconds() const;
|
||||
virtual int lengthInSeconds() const = 0;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in milliseconds.
|
||||
*
|
||||
* \see lengthInSeconds()
|
||||
*/
|
||||
// BIC: make virtual
|
||||
int lengthInMilliseconds() const;
|
||||
virtual int lengthInMilliseconds() const = 0;
|
||||
|
||||
/*!
|
||||
* Returns the most appropriate bit rate for the file in kb/s. For constant
|
||||
|
@ -330,23 +330,6 @@ Ogg::XiphComment *FLAC::File::xiphComment(bool create)
|
||||
return d->tag.access<Ogg::XiphComment>(FlacXiphIndex, create);
|
||||
}
|
||||
|
||||
void FLAC::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
|
||||
{
|
||||
d->ID3v2FrameFactory = factory;
|
||||
}
|
||||
|
||||
ByteVector FLAC::File::streamInfoData()
|
||||
{
|
||||
debug("FLAC::File::streamInfoData() -- This function is obsolete. Returning an empty ByteVector.");
|
||||
return ByteVector();
|
||||
}
|
||||
|
||||
offset_t FLAC::File::streamLength()
|
||||
{
|
||||
debug("FLAC::File::streamLength() -- This function is obsolete. Returning zero.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
List<FLAC::Picture *> FLAC::File::pictureList()
|
||||
{
|
||||
List<Picture *> pictures;
|
||||
|
@ -232,32 +232,6 @@ namespace TagLib {
|
||||
*/
|
||||
Ogg::XiphComment *xiphComment(bool create = false);
|
||||
|
||||
/*!
|
||||
* Set the ID3v2::FrameFactory to something other than the default. This
|
||||
* can be used to specify the way that ID3v2 frames will be interpreted
|
||||
* when
|
||||
*
|
||||
* \see ID3v2FrameFactory
|
||||
* \deprecated This value should be passed in via the constructor.
|
||||
*/
|
||||
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
|
||||
|
||||
/*!
|
||||
* Returns the block of data used by FLAC::Properties for parsing the
|
||||
* stream properties.
|
||||
*
|
||||
* \deprecated Always returns an empty vector.
|
||||
*/
|
||||
TAGLIB_DEPRECATED ByteVector streamInfoData(); // BIC: remove
|
||||
|
||||
/*!
|
||||
* Returns the length of the audio-stream, used by FLAC::Properties for
|
||||
* calculating the bitrate.
|
||||
*
|
||||
* \deprecated Always returns zero.
|
||||
*/
|
||||
TAGLIB_DEPRECATED offset_t streamLength(); // BIC: remove
|
||||
|
||||
/*!
|
||||
* Returns a list of pictures attached to the FLAC file.
|
||||
*/
|
||||
|
@ -74,11 +74,6 @@ FLAC::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int FLAC::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int FLAC::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
@ -104,11 +99,6 @@ int FLAC::Properties::bitsPerSample() const
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
int FLAC::Properties::sampleWidth() const
|
||||
{
|
||||
return bitsPerSample();
|
||||
}
|
||||
|
||||
int FLAC::Properties::channels() const
|
||||
{
|
||||
return d->channels;
|
||||
|
@ -65,16 +65,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
@ -113,16 +103,6 @@ namespace TagLib {
|
||||
*/
|
||||
int bitsPerSample() const;
|
||||
|
||||
/*!
|
||||
* Returns the sample width as read from the FLAC identification
|
||||
* header.
|
||||
*
|
||||
* \note This method is just an alias of bitsPerSample().
|
||||
*
|
||||
* \deprecated Use bitsPerSample().
|
||||
*/
|
||||
TAGLIB_DEPRECATED int sampleWidth() const;
|
||||
|
||||
/*!
|
||||
* Return the number of sample frames.
|
||||
*/
|
||||
|
@ -101,12 +101,6 @@ MP4::Properties::sampleRate() const
|
||||
return d->sampleRate;
|
||||
}
|
||||
|
||||
int
|
||||
MP4::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int
|
||||
MP4::Properties::lengthInSeconds() const
|
||||
{
|
||||
|
@ -47,16 +47,6 @@ namespace TagLib {
|
||||
Properties(File *file, Atoms *atoms, ReadStyle style = Average);
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -872,11 +872,6 @@ bool MP4::Tag::isEmpty() const
|
||||
return d->items.isEmpty();
|
||||
}
|
||||
|
||||
MP4::ItemMap &MP4::Tag::itemListMap()
|
||||
{
|
||||
return d->items;
|
||||
}
|
||||
|
||||
const MP4::ItemMap &MP4::Tag::itemMap() const
|
||||
{
|
||||
return d->items;
|
||||
|
@ -37,10 +37,6 @@
|
||||
|
||||
namespace TagLib {
|
||||
namespace MP4 {
|
||||
/*!
|
||||
* \deprecated Use ItemMap.
|
||||
*/
|
||||
TAGLIB_DEPRECATED typedef TagLib::Map<String, Item> ItemListMap;
|
||||
typedef TagLib::Map<String, Item> ItemMap;
|
||||
|
||||
class TAGLIB_EXPORT Tag: public TagLib::Tag
|
||||
@ -69,11 +65,6 @@ namespace TagLib {
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
|
||||
/*!
|
||||
* \deprecated Use the item() and setItem() API instead.
|
||||
*/
|
||||
TAGLIB_DEPRECATED ItemMap &itemListMap();
|
||||
|
||||
/*!
|
||||
* Returns a string-keyed map of the MP4::Items for this tag.
|
||||
*/
|
||||
|
@ -255,11 +255,6 @@ void MPC::File::strip(int tags)
|
||||
}
|
||||
}
|
||||
|
||||
void MPC::File::remove(int tags)
|
||||
{
|
||||
strip(tags);
|
||||
}
|
||||
|
||||
bool MPC::File::hasID3v1Tag() const
|
||||
{
|
||||
return (d->ID3v1Location >= 0);
|
||||
|
@ -194,12 +194,6 @@ namespace TagLib {
|
||||
*/
|
||||
void strip(int tags = AllTags);
|
||||
|
||||
/*!
|
||||
* \deprecated Use strip().
|
||||
* \see strip
|
||||
*/
|
||||
TAGLIB_DEPRECATED void remove(int tags = AllTags);
|
||||
|
||||
/*!
|
||||
* Returns whether or not the file on disk actually has an ID3v1 tag.
|
||||
*
|
||||
|
@ -93,11 +93,6 @@ MPC::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int MPC::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int MPC::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -67,16 +67,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -85,20 +85,6 @@ List<RelativeVolumeFrame::ChannelType> RelativeVolumeFrame::channels() const
|
||||
return l;
|
||||
}
|
||||
|
||||
// deprecated
|
||||
|
||||
RelativeVolumeFrame::ChannelType RelativeVolumeFrame::channelType() const
|
||||
{
|
||||
return MasterVolume;
|
||||
}
|
||||
|
||||
// deprecated
|
||||
|
||||
void RelativeVolumeFrame::setChannelType(ChannelType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
short RelativeVolumeFrame::volumeAdjustmentIndex(ChannelType type) const
|
||||
{
|
||||
return d->channels.contains(type) ? d->channels[type].volumeAdjustment : 0;
|
||||
|
@ -128,16 +128,6 @@ namespace TagLib {
|
||||
*/
|
||||
List<ChannelType> channels() const;
|
||||
|
||||
/*!
|
||||
* \deprecated Always returns master volume.
|
||||
*/
|
||||
TAGLIB_DEPRECATED ChannelType channelType() const;
|
||||
|
||||
/*!
|
||||
* \deprecated This method no longer has any effect.
|
||||
*/
|
||||
TAGLIB_DEPRECATED void setChannelType(ChannelType t);
|
||||
|
||||
/*
|
||||
* There was a terrible API goof here, and while this can't be changed to
|
||||
* the way it appears below for binary compatibility reasons, let's at
|
||||
|
@ -581,12 +581,6 @@ unsigned int Frame::Header::size(unsigned int version)
|
||||
// public members (Frame::Header)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Frame::Header::Header(const ByteVector &data, bool synchSafeInts) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
setData(data, synchSafeInts);
|
||||
}
|
||||
|
||||
Frame::Header::Header(const ByteVector &data, unsigned int version) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
@ -598,11 +592,6 @@ Frame::Header::~Header()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Frame::Header::setData(const ByteVector &data, bool synchSafeInts)
|
||||
{
|
||||
setData(data, static_cast<unsigned int>(synchSafeInts ? 4 : 3));
|
||||
}
|
||||
|
||||
void Frame::Header::setData(const ByteVector &data, unsigned int version)
|
||||
{
|
||||
d->version = version;
|
||||
@ -826,8 +815,3 @@ ByteVector Frame::Header::render() const
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
bool Frame::Header::frameAlterPreservation() const
|
||||
{
|
||||
return fileAlterPreservation();
|
||||
}
|
||||
|
@ -329,16 +329,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Frame::Header
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Construct a Frame Header based on \a data. \a data must at least
|
||||
* contain a 4 byte frame ID, and optionally can contain flag data and the
|
||||
* frame size. i.e. Just the frame id -- "TALB" -- is a valid value.
|
||||
*
|
||||
* \deprecated Please use the constructor below that accepts a version
|
||||
* number.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Header(const ByteVector &data, bool synchSafeInts);
|
||||
|
||||
/*!
|
||||
* Construct a Frame Header based on \a data. \a data must at least
|
||||
* contain a 4 byte frame ID, and optionally can contain flag data and the
|
||||
@ -353,14 +343,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Header();
|
||||
|
||||
/*!
|
||||
* Sets the data for the Header.
|
||||
*
|
||||
* \deprecated Please use the version below that accepts an ID3v2 version
|
||||
* number.
|
||||
*/
|
||||
TAGLIB_DEPRECATED void setData(const ByteVector &data, bool synchSafeInts);
|
||||
|
||||
/*!
|
||||
* Sets the data for the Header. \a version should indicate the ID3v2
|
||||
* version number of the tag that this frame is contained in.
|
||||
@ -504,11 +486,6 @@ namespace TagLib {
|
||||
*/
|
||||
ByteVector render() const;
|
||||
|
||||
/*!
|
||||
* \deprecated Use fileAlterPreservation().
|
||||
*/
|
||||
TAGLIB_DEPRECATED bool frameAlterPreservation() const;
|
||||
|
||||
private:
|
||||
Header(const Header &);
|
||||
Header &operator=(const Header &);
|
||||
|
@ -115,18 +115,6 @@ FrameFactory *FrameFactory::instance()
|
||||
return &factory;
|
||||
}
|
||||
|
||||
Frame *FrameFactory::createFrame(const ByteVector &data, bool synchSafeInts) const
|
||||
{
|
||||
return createFrame(data, static_cast<unsigned int>(synchSafeInts ? 4 : 3));
|
||||
}
|
||||
|
||||
Frame *FrameFactory::createFrame(const ByteVector &data, unsigned int version) const
|
||||
{
|
||||
Header tagHeader;
|
||||
tagHeader.setMajorVersion(version);
|
||||
return createFrame(data, &tagHeader);
|
||||
}
|
||||
|
||||
Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader) const
|
||||
{
|
||||
return createFrame(origData, const_cast<const Header *>(tagHeader));
|
||||
|
@ -66,25 +66,6 @@ namespace TagLib {
|
||||
{
|
||||
public:
|
||||
static FrameFactory *instance();
|
||||
/*!
|
||||
* Create a frame based on \a data. \a synchSafeInts should only be set
|
||||
* false if we are parsing an old tag (v2.3 or older) that does not support
|
||||
* synchsafe ints.
|
||||
*
|
||||
* \deprecated Please use the method below that accepts a ID3v2::Header
|
||||
* instance in new code.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, bool synchSafeInts) const;
|
||||
|
||||
/*!
|
||||
* Create a frame based on \a data. \a version should indicate the ID3v2
|
||||
* version of the tag. As ID3v2.4 is the most current version of the
|
||||
* standard 4 is the default.
|
||||
*
|
||||
* \deprecated Please use the method below that accepts a ID3v2::Header
|
||||
* instance in new code.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, unsigned int version = 4) const;
|
||||
|
||||
/*!
|
||||
* \deprecated Use createFrame(const ByteVector &, const Header *) const.
|
||||
|
@ -340,11 +340,6 @@ ExtendedHeader *ID3v2::Tag::extendedHeader() const
|
||||
return d->extendedHeader;
|
||||
}
|
||||
|
||||
Footer *ID3v2::Tag::footer() const
|
||||
{
|
||||
return d->footer;
|
||||
}
|
||||
|
||||
const FrameListMap &ID3v2::Tag::frameListMap() const
|
||||
{
|
||||
return d->frameListMap;
|
||||
@ -624,11 +619,6 @@ void ID3v2::Tag::downgradeFrames(FrameList *frames, FrameList *newFrames) const
|
||||
}
|
||||
}
|
||||
|
||||
ByteVector ID3v2::Tag::render(int version) const
|
||||
{
|
||||
return render(version == 3 ? v3 : v4);
|
||||
}
|
||||
|
||||
ByteVector ID3v2::Tag::render(Version version) const
|
||||
{
|
||||
// We need to render the "tag data" first so that we have to correct size to
|
||||
|
@ -185,16 +185,6 @@ namespace TagLib {
|
||||
*/
|
||||
ExtendedHeader *extendedHeader() const;
|
||||
|
||||
/*!
|
||||
* Returns a pointer to the tag's footer or null if there is no footer.
|
||||
*
|
||||
* \deprecated I don't see any reason to keep this around since there's
|
||||
* nothing useful to be retrieved from the footer, but well, again, I'm
|
||||
* prone to change my mind, so this gets to stay around until near a
|
||||
* release.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Footer *footer() const;
|
||||
|
||||
/*!
|
||||
* Returns a reference to the frame list map. This is an FrameListMap of
|
||||
* all of the frames in the tag.
|
||||
@ -337,11 +327,6 @@ namespace TagLib {
|
||||
*/
|
||||
ByteVector render() const;
|
||||
|
||||
/*!
|
||||
* \deprecated Use render(Version) const.
|
||||
*/
|
||||
TAGLIB_DEPRECATED ByteVector render(int version) const;
|
||||
|
||||
/*!
|
||||
* Render the tag back to binary data, suitable to be written to disk.
|
||||
*
|
||||
|
@ -198,31 +198,6 @@ bool MPEG::File::save()
|
||||
return save(AllTags);
|
||||
}
|
||||
|
||||
bool MPEG::File::save(int tags)
|
||||
{
|
||||
return save(tags, StripOthers);
|
||||
}
|
||||
|
||||
bool MPEG::File::save(int tags, bool stripOthers)
|
||||
{
|
||||
return save(tags, stripOthers ? StripOthers : StripNone, ID3v2::v4);
|
||||
}
|
||||
|
||||
bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version)
|
||||
{
|
||||
return save(tags,
|
||||
stripOthers ? StripOthers : StripNone,
|
||||
id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4);
|
||||
}
|
||||
|
||||
bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags)
|
||||
{
|
||||
return save(tags,
|
||||
stripOthers ? StripOthers : StripNone,
|
||||
id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4,
|
||||
duplicateTags ? Duplicate : DoNotDuplicate);
|
||||
}
|
||||
|
||||
bool MPEG::File::save(int tags, StripTags strip, ID3v2::Version version, DuplicateTags duplicate)
|
||||
{
|
||||
if(readOnly()) {
|
||||
@ -401,11 +376,6 @@ bool MPEG::File::strip(int tags, bool freeMemory)
|
||||
return true;
|
||||
}
|
||||
|
||||
void MPEG::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
|
||||
{
|
||||
d->ID3v2FrameFactory = factory;
|
||||
}
|
||||
|
||||
offset_t MPEG::File::nextFrameOffset(offset_t position)
|
||||
{
|
||||
ByteVector frameSyncBytes(2, '\0');
|
||||
|
@ -181,35 +181,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual bool save();
|
||||
|
||||
/*!
|
||||
* Save the file. This will attempt to save all of the tag types that are
|
||||
* specified by OR-ing together TagTypes values. The save() method above
|
||||
* uses AllTags. This returns true if saving was successful.
|
||||
*
|
||||
* This strips all tags not included in the mask, but does not modify them
|
||||
* in memory, so later calls to save() which make use of these tags will
|
||||
* remain valid. This also strips empty tags.
|
||||
*/
|
||||
bool save(int tags);
|
||||
|
||||
/*!
|
||||
* \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags).
|
||||
*/
|
||||
// BIC: combine with the above method
|
||||
TAGLIB_DEPRECATED bool save(int tags, bool stripOthers);
|
||||
|
||||
/*!
|
||||
* \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags).
|
||||
*/
|
||||
// BIC: combine with the above method
|
||||
TAGLIB_DEPRECATED bool save(int tags, bool stripOthers, int id3v2Version);
|
||||
|
||||
/*!
|
||||
* \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags).
|
||||
*/
|
||||
// BIC: combine with the above method
|
||||
TAGLIB_DEPRECATED bool save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags);
|
||||
|
||||
/*!
|
||||
* Save the file. This will attempt to save all of the tag types that are
|
||||
* specified by OR-ing together TagTypes values.
|
||||
@ -223,7 +194,7 @@ namespace TagLib {
|
||||
* If \a duplicate is set to DuplicateTags and at least one tag -- ID3v1
|
||||
* or ID3v2 -- exists this will duplicate its content into the other tag.
|
||||
*/
|
||||
bool save(int tags, StripTags strip,
|
||||
bool save(int tags, StripTags strip = StripOthers,
|
||||
ID3v2::Version version = ID3v2::v4,
|
||||
DuplicateTags duplicate = Duplicate);
|
||||
|
||||
@ -311,14 +282,6 @@ namespace TagLib {
|
||||
// BIC: merge with the method above
|
||||
bool strip(int tags, bool freeMemory);
|
||||
|
||||
/*!
|
||||
* Set the ID3v2::FrameFactory to something other than the default.
|
||||
*
|
||||
* \see ID3v2FrameFactory
|
||||
* \deprecated This value should be passed in via the constructor.
|
||||
*/
|
||||
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
|
||||
|
||||
/*!
|
||||
* Returns the position in the file of the first MPEG frame.
|
||||
*/
|
||||
|
@ -69,12 +69,6 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MPEG::Header::Header(const ByteVector &data) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
debug("MPEG::Header::Header() - This constructor is no longer used.");
|
||||
}
|
||||
|
||||
MPEG::Header::Header(File *file, offset_t offset, bool checkLength) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
|
@ -48,13 +48,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Header
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Parses an MPEG header based on \a data.
|
||||
*
|
||||
* \deprecated Use Header(File *, long, bool).
|
||||
*/
|
||||
TAGLIB_DEPRECATED Header(const ByteVector &data);
|
||||
|
||||
/*!
|
||||
* Parses an MPEG header based on \a file and \a offset.
|
||||
*
|
||||
|
@ -84,11 +84,6 @@ MPEG::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int MPEG::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int MPEG::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -59,16 +59,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -81,12 +81,6 @@ MPEG::XingHeader::HeaderType MPEG::XingHeader::type() const
|
||||
return d->type;
|
||||
}
|
||||
|
||||
int MPEG::XingHeader::xingHeaderOffset(TagLib::MPEG::Header::Version /*v*/,
|
||||
TagLib::MPEG::Header::ChannelMode /*c*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -105,15 +105,6 @@ namespace TagLib {
|
||||
*/
|
||||
HeaderType type() const;
|
||||
|
||||
/*!
|
||||
* Returns the offset for the start of this Xing header, given the
|
||||
* version and channels of the frame
|
||||
*
|
||||
* \deprecated Always returns 0.
|
||||
*/
|
||||
TAGLIB_DEPRECATED static int xingHeaderOffset(TagLib::MPEG::Header::Version v,
|
||||
TagLib::MPEG::Header::ChannelMode c);
|
||||
|
||||
private:
|
||||
XingHeader(const XingHeader &);
|
||||
XingHeader &operator=(const XingHeader &);
|
||||
|
@ -269,12 +269,6 @@ List<Ogg::Page *> Ogg::Page::paginate(const ByteVectorList &packets,
|
||||
return l;
|
||||
}
|
||||
|
||||
Ogg::Page* Ogg::Page::getCopyWithNewPageSequenceNumber(int /*sequenceNumber*/)
|
||||
{
|
||||
debug("Ogg::Page::getCopyWithNewPageSequenceNumber() -- This function is obsolete. Returning null.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -85,16 +85,6 @@ namespace TagLib {
|
||||
*/
|
||||
void setPageSequenceNumber(int sequenceNumber);
|
||||
|
||||
/*!
|
||||
* Returns a copy of the page with \a sequenceNumber set as sequence number.
|
||||
*
|
||||
* \see header()
|
||||
* \see PageHeader::setPageSequenceNumber()
|
||||
*
|
||||
* \deprecated Always returns null.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Page *getCopyWithNewPageSequenceNumber(int sequenceNumber);
|
||||
|
||||
/*!
|
||||
* Returns the index of the first packet wholly or partially contained in
|
||||
* this page.
|
||||
|
@ -71,11 +71,6 @@ Opus::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int Opus::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int Ogg::Opus::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -61,16 +61,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -77,11 +77,6 @@ Speex::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int Speex::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int Speex::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -61,16 +61,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -80,11 +80,6 @@ Vorbis::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int Vorbis::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int Vorbis::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -67,16 +67,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -293,14 +293,6 @@ void Ogg::XiphComment::addField(const String &key, const String &value, bool rep
|
||||
d->fieldListMap[upperKey].append(value);
|
||||
}
|
||||
|
||||
void Ogg::XiphComment::removeField(const String &key, const String &value)
|
||||
{
|
||||
if(!value.isNull())
|
||||
removeFields(key, value);
|
||||
else
|
||||
removeFields(key);
|
||||
}
|
||||
|
||||
void Ogg::XiphComment::removeFields(const String &key)
|
||||
{
|
||||
d->fieldListMap.erase(key.upper());
|
||||
|
@ -184,15 +184,6 @@ namespace TagLib {
|
||||
*/
|
||||
void addField(const String &key, const String &value, bool replace = true);
|
||||
|
||||
/*!
|
||||
* Remove the field specified by \a key with the data \a value. If
|
||||
* \a value is null, all of the fields with the given key will be removed.
|
||||
*
|
||||
* \deprecated Using this method may lead to a linkage error.
|
||||
*/
|
||||
// BIC: remove and merge with below
|
||||
TAGLIB_DEPRECATED void removeField(const String &key, const String &value = String());
|
||||
|
||||
/*!
|
||||
* Remove all the fields specified by \a key.
|
||||
*
|
||||
|
@ -57,13 +57,6 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RIFF::AIFF::Properties::Properties(const ByteVector &, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
debug("RIFF::AIFF::Properties::Properties() - This constructor is no longer used.");
|
||||
}
|
||||
|
||||
RIFF::AIFF::Properties::Properties(File *file, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
@ -76,11 +69,6 @@ RIFF::AIFF::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int RIFF::AIFF::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int RIFF::AIFF::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
@ -111,11 +99,6 @@ int RIFF::AIFF::Properties::bitsPerSample() const
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
int RIFF::AIFF::Properties::sampleWidth() const
|
||||
{
|
||||
return bitsPerSample();
|
||||
}
|
||||
|
||||
unsigned int RIFF::AIFF::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
|
@ -46,14 +46,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of AIFF::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*
|
||||
* \deprecated Use Properties(File *, ReadStyle).
|
||||
*/
|
||||
TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Create an instance of AIFF::Properties with the data read from the
|
||||
* AIFF::File \a file.
|
||||
@ -65,16 +57,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
@ -112,15 +94,6 @@ namespace TagLib {
|
||||
*/
|
||||
int bitsPerSample() const;
|
||||
|
||||
/*!
|
||||
* Returns the number of bits per audio sample.
|
||||
*
|
||||
* \note This method is just an alias of bitsPerSample().
|
||||
*
|
||||
* \deprecated Use bitsPerSample().
|
||||
*/
|
||||
TAGLIB_DEPRECATED int sampleWidth() const;
|
||||
|
||||
/*!
|
||||
* Returns the number of sample frames
|
||||
*/
|
||||
|
@ -150,13 +150,6 @@ bool RIFF::WAV::File::save()
|
||||
return RIFF::WAV::File::save(AllTags);
|
||||
}
|
||||
|
||||
bool RIFF::WAV::File::save(TagTypes tags, bool stripOthers, int id3v2Version)
|
||||
{
|
||||
return save(tags,
|
||||
stripOthers ? StripOthers : StripNone,
|
||||
id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4);
|
||||
}
|
||||
|
||||
bool RIFF::WAV::File::save(TagTypes tags, StripTags strip, ID3v2::Version version)
|
||||
{
|
||||
if(readOnly()) {
|
||||
|
@ -159,11 +159,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual bool save();
|
||||
|
||||
/*!
|
||||
* \deprecated Use save(TagTypes, StripTags, ID3v2::Version).
|
||||
*/
|
||||
TAGLIB_DEPRECATED bool save(TagTypes tags, bool stripOthers, int id3v2Version = 4);
|
||||
|
||||
/*!
|
||||
* Save the file. If \a strip is specified, it is possible to choose if
|
||||
* tags not specified in \a tags should be stripped from the file or
|
||||
|
@ -65,20 +65,6 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RIFF::WAV::Properties::Properties(const ByteVector &, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
debug("RIFF::WAV::Properties::Properties() -- This constructor is no longer used.");
|
||||
}
|
||||
|
||||
RIFF::WAV::Properties::Properties(const ByteVector &, unsigned int, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
debug("RIFF::WAV::Properties::Properties() -- This constructor is no longer used.");
|
||||
}
|
||||
|
||||
TagLib::RIFF::WAV::Properties::Properties(File *file, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
@ -91,11 +77,6 @@ RIFF::WAV::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int RIFF::WAV::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int RIFF::WAV::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
@ -126,11 +107,6 @@ int RIFF::WAV::Properties::bitsPerSample() const
|
||||
return d->bitsPerSample;
|
||||
}
|
||||
|
||||
int RIFF::WAV::Properties::sampleWidth() const
|
||||
{
|
||||
return bitsPerSample();
|
||||
}
|
||||
|
||||
unsigned int RIFF::WAV::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
|
@ -49,22 +49,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*
|
||||
* \deprecated Use Properties(File *, ReadStyle).
|
||||
*/
|
||||
TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* ByteVector \a data and the length calculated using \a streamLength.
|
||||
*
|
||||
* \deprecated Use Properties(File *, ReadStyle).
|
||||
*/
|
||||
TAGLIB_DEPRECATED Properties(const ByteVector &data, unsigned int streamLength, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Create an instance of WAV::Properties with the data read from the
|
||||
* WAV::File \a file.
|
||||
@ -76,16 +60,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
@ -123,15 +97,6 @@ namespace TagLib {
|
||||
*/
|
||||
int bitsPerSample() const;
|
||||
|
||||
/*!
|
||||
* Returns the number of bits per audio sample.
|
||||
*
|
||||
* \note This method is just an alias of bitsPerSample().
|
||||
*
|
||||
* \deprecated Use bitsPerSample().
|
||||
*/
|
||||
TAGLIB_DEPRECATED int sampleWidth() const;
|
||||
|
||||
/*!
|
||||
* Returns the number of sample frames.
|
||||
*/
|
||||
|
@ -291,8 +291,6 @@ public:
|
||||
// static members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ByteVector ByteVector::null;
|
||||
|
||||
ByteVector ByteVector::fromCString(const char *s, unsigned int length)
|
||||
{
|
||||
if(length == 0xffffffff)
|
||||
@ -657,11 +655,6 @@ ByteVector::ConstReverseIterator ByteVector::rend() const
|
||||
return v.rbegin() + (v.size() - d->offset);
|
||||
}
|
||||
|
||||
bool ByteVector::isNull() const
|
||||
{
|
||||
return (d == null.d);
|
||||
}
|
||||
|
||||
bool ByteVector::isEmpty() const
|
||||
{
|
||||
return (d->length == 0);
|
||||
|
@ -270,24 +270,10 @@ namespace TagLib {
|
||||
*/
|
||||
ConstReverseIterator rend() const;
|
||||
|
||||
/*!
|
||||
* Returns true if the vector is null.
|
||||
*
|
||||
* \note A vector may be empty without being null. So do not use this
|
||||
* method to check if the vector is empty.
|
||||
*
|
||||
* \see isEmpty()
|
||||
*
|
||||
* \deprecated Use isEmpty(), do not differentiate between null and empty.
|
||||
*/
|
||||
// BIC: remove
|
||||
TAGLIB_DEPRECATED bool isNull() const;
|
||||
|
||||
/*!
|
||||
* Returns true if the ByteVector is empty.
|
||||
*
|
||||
* \see size()
|
||||
* \see isNull()
|
||||
*/
|
||||
bool isEmpty() const;
|
||||
|
||||
@ -585,18 +571,6 @@ namespace TagLib {
|
||||
*/
|
||||
void swap(ByteVector &v);
|
||||
|
||||
/*!
|
||||
* A static, empty ByteVector which is convenient and fast (since returning
|
||||
* an empty or "null" value does not require instantiating a new ByteVector).
|
||||
*
|
||||
* \warning Do not modify this variable. It will mess up the internal state
|
||||
* of TagLib.
|
||||
*
|
||||
* \deprecated Use ByteVector().
|
||||
*/
|
||||
// BIC: remove
|
||||
TAGLIB_DEPRECATED static ByteVector null;
|
||||
|
||||
/*!
|
||||
* Returns a hex-encoded copy of the byte vector.
|
||||
*/
|
||||
|
@ -451,36 +451,6 @@ offset_t File::length()
|
||||
return d->stream->length();
|
||||
}
|
||||
|
||||
bool File::isReadable(const char *file)
|
||||
{
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400) // VC++2005 or later
|
||||
|
||||
return _access_s(file, R_OK) == 0;
|
||||
|
||||
#else
|
||||
|
||||
return access(file, R_OK) == 0;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
bool File::isWritable(const char *file)
|
||||
{
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400) // VC++2005 or later
|
||||
|
||||
return _access_s(file, W_OK) == 0;
|
||||
|
||||
#else
|
||||
|
||||
return access(file, W_OK) == 0;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -257,21 +257,6 @@ namespace TagLib {
|
||||
*/
|
||||
offset_t length();
|
||||
|
||||
/*!
|
||||
* Returns true if \a file can be opened for reading. If the file does not
|
||||
* exist, this will return false.
|
||||
*
|
||||
* \deprecated Use system functions, e.g. access() (_access_s() on Windows).
|
||||
*/
|
||||
TAGLIB_DEPRECATED static bool isReadable(const char *file);
|
||||
|
||||
/*!
|
||||
* Returns true if \a file can be opened for writing.
|
||||
*
|
||||
* \deprecated Use system functions, e.g. access() (_access_s() on Windows).
|
||||
*/
|
||||
TAGLIB_DEPRECATED static bool isWritable(const char *name);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* Construct a File object and opens the \a file. \a file should be a
|
||||
|
@ -154,8 +154,6 @@ public:
|
||||
std::string cstring;
|
||||
};
|
||||
|
||||
String String::null;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -405,11 +403,6 @@ bool String::isEmpty() const
|
||||
return d->data.empty();
|
||||
}
|
||||
|
||||
bool String::isNull() const
|
||||
{
|
||||
return d == null.d;
|
||||
}
|
||||
|
||||
ByteVector String::data(Type t) const
|
||||
{
|
||||
switch(t)
|
||||
@ -703,11 +696,6 @@ void String::detach()
|
||||
String(d->data.c_str()).swap(*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const String::Type String::WCharByteOrder = wcharByteOrder();
|
||||
} // namespace TagLib
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -740,4 +728,3 @@ std::ostream &operator<<(std::ostream &s, const TagLib::String &str)
|
||||
s << str.to8Bit();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -323,25 +323,9 @@ namespace TagLib {
|
||||
|
||||
/*!
|
||||
* Returns true if the string is empty.
|
||||
*
|
||||
* \see isNull()
|
||||
*/
|
||||
bool isEmpty() const;
|
||||
|
||||
/*!
|
||||
* Returns true if this string is null -- i.e. it is a copy of the
|
||||
* String::null string.
|
||||
*
|
||||
* \note A string can be empty and not null. So do not use this method to
|
||||
* check if the string is empty.
|
||||
*
|
||||
* \see isEmpty()
|
||||
*
|
||||
* \deprecated Use isEmpty(), do not differentiate between null and empty.
|
||||
*/
|
||||
// BIC: remove
|
||||
TAGLIB_DEPRECATED bool isNull() const;
|
||||
|
||||
/*!
|
||||
* Returns a ByteVector containing the string's data. If \a t is Latin1 or
|
||||
* UTF8, this will return a vector of 8 bit characters, otherwise it will use
|
||||
@ -516,17 +500,6 @@ namespace TagLib {
|
||||
*/
|
||||
bool operator<(const String &s) const;
|
||||
|
||||
/*!
|
||||
* A null string provided for convenience.
|
||||
*
|
||||
* \warning Do not modify this variable. It will mess up the internal state
|
||||
* of TagLib.
|
||||
*
|
||||
* \deprecated Use String().
|
||||
*/
|
||||
// BIC: remove
|
||||
TAGLIB_DEPRECATED static String null;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* If this String is being shared via implicit sharing, do a deep copy of the
|
||||
@ -536,13 +509,6 @@ namespace TagLib {
|
||||
void detach();
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \deprecated This variable is no longer used, but NEVER remove this. It
|
||||
* may lead to a linkage error.
|
||||
*/
|
||||
// BIC: remove
|
||||
TAGLIB_DEPRECATED static const Type WCharByteOrder;
|
||||
|
||||
class StringPrivate;
|
||||
StringPrivate *d;
|
||||
};
|
||||
|
@ -156,11 +156,6 @@ TrueAudio::Properties *TrueAudio::File::audioProperties() const
|
||||
return d->properties;
|
||||
}
|
||||
|
||||
void TrueAudio::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
|
||||
{
|
||||
d->ID3v2FrameFactory = factory;
|
||||
}
|
||||
|
||||
bool TrueAudio::File::save()
|
||||
{
|
||||
if(readOnly()) {
|
||||
|
@ -160,14 +160,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual Properties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Set the ID3v2::FrameFactory to something other than the default.
|
||||
*
|
||||
* \see ID3v2FrameFactory
|
||||
* \deprecated This value should be passed in via the constructor.
|
||||
*/
|
||||
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
|
||||
|
||||
/*!
|
||||
* Saves the file.
|
||||
*/
|
||||
|
@ -73,11 +73,6 @@ TrueAudio::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int TrueAudio::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -60,16 +60,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -66,13 +66,6 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WavPack::Properties::Properties(const ByteVector &, offset_t, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
debug("WavPack::Properties::Properties() -- This constructor is no longer used.");
|
||||
}
|
||||
|
||||
WavPack::Properties::Properties(File *file, offset_t streamLength, ReadStyle style) :
|
||||
AudioProperties(style),
|
||||
d(new PropertiesPrivate())
|
||||
@ -85,11 +78,6 @@ WavPack::Properties::~Properties()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int WavPack::Properties::length() const
|
||||
{
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int WavPack::Properties::lengthInSeconds() const
|
||||
{
|
||||
return d->length / 1000;
|
||||
|
@ -52,16 +52,6 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT Properties : public AudioProperties
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of WavPack::Properties with the data read from the
|
||||
* ByteVector \a data.
|
||||
*
|
||||
* \deprecated This constructor will be dropped in favor of the one below
|
||||
* in a future version.
|
||||
*/
|
||||
TAGLIB_DEPRECATED Properties(const ByteVector &data, offset_t streamLength,
|
||||
ReadStyle style = Average);
|
||||
|
||||
/*!
|
||||
* Create an instance of WavPack::Properties.
|
||||
*/
|
||||
@ -72,16 +62,6 @@ namespace TagLib {
|
||||
*/
|
||||
virtual ~Properties();
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
*
|
||||
* \note This method is just an alias of lengthInSeconds().
|
||||
*
|
||||
* \deprecated Use lengthInSeconds().
|
||||
*/
|
||||
TAGLIB_DEPRECATED virtual int length() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the file in seconds. The length is rounded down to
|
||||
* the nearest whole second.
|
||||
|
@ -53,7 +53,6 @@ class TestMPEG : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testSkipInvalidFrames3);
|
||||
CPPUNIT_TEST(testVersion2DurationWithXingHeader);
|
||||
CPPUNIT_TEST(testSaveID3v24);
|
||||
CPPUNIT_TEST(testSaveID3v24WrongParam);
|
||||
CPPUNIT_TEST(testSaveID3v23);
|
||||
CPPUNIT_TEST(testDuplicateID3v2);
|
||||
CPPUNIT_TEST(testFuzzedFile);
|
||||
@ -193,26 +192,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void testSaveID3v24WrongParam()
|
||||
{
|
||||
ScopedFileCopy copy("xing", ".mp3");
|
||||
string newname = copy.fileName();
|
||||
|
||||
String xxx = ByteVector(254, 'X');
|
||||
{
|
||||
MPEG::File f(newname.c_str());
|
||||
f.tag()->setTitle(xxx);
|
||||
f.tag()->setArtist("Artist A");
|
||||
f.save(MPEG::File::AllTags, true, 8);
|
||||
}
|
||||
{
|
||||
MPEG::File f2(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)4, f2.ID3v2Tag()->header()->majorVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(String("Artist A"), f2.tag()->artist());
|
||||
CPPUNIT_ASSERT_EQUAL(xxx, f2.tag()->title());
|
||||
}
|
||||
}
|
||||
|
||||
void testSaveID3v23()
|
||||
{
|
||||
ScopedFileCopy copy("xing", ".mp3");
|
||||
|
Loading…
Reference in New Issue
Block a user