Remove taglib-1.11 bundle, and prefer binaries on Windows.

This commit is contained in:
casey langen 2022-12-22 02:37:11 -08:00
parent e67f09ae9e
commit 1a39eecb57
403 changed files with 223 additions and 49724 deletions

View File

@ -6,6 +6,8 @@
* fixed issues when searching for metadata with accented characters
* fixed issue with FfmpegDecoder that was preventing .wma files (and possibly
other formats) from playing properly.
* updated to taglib 1.13. vendor the library by default on unix platforms,
and use pre-compiled version on windows. (also: remove source bundle)
* fixed OpenBSD compile
--------------------------------------------------------------------------------

2
src/3rdparty/bin vendored

@ -1 +1 @@
Subproject commit 8b6a9f577c49864fbfe3c01e6151099bd25c4c4d
Subproject commit 6b7541d98b232ea9d2a01b8da5d723eb894bb38d

View File

@ -50,7 +50,7 @@ namespace TagLib {
* Create an instance of AIFF::Properties with the data read from the
* ByteVector \a data.
*
* \deprecated
* \deprecated Use Properties(File *, ReadStyle).
*/
TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style);
@ -71,7 +71,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@ -117,7 +117,7 @@ namespace TagLib {
*
* \note This method is just an alias of bitsPerSample().
*
* \deprecated
* \deprecated Use bitsPerSample().
*/
TAGLIB_DEPRECATED int sampleWidth() const;

View File

@ -53,7 +53,7 @@ namespace TagLib {
* Create an instance of APE::Properties with the data read from the
* APE::File \a file.
*
* \deprecated
* \deprecated Use Properties(File *, long, ReadStyle).
*/
TAGLIB_DEPRECATED Properties(File *file, ReadStyle style = Average);
@ -74,7 +74,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -86,7 +86,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -152,7 +152,8 @@ namespace TagLib {
virtual bool isEmpty() const;
/*!
* \deprecated
* \deprecated Use attributeListMap() const, contains(), removeItem(),
* attribute(), setAttribute(), addAttribute().
*/
AttributeListMap &attributeListMap();

View File

@ -57,7 +57,7 @@ namespace TagLib {
* \a startTime, end time \a endTime, start offset \a startOffset,
* end offset \a endOffset and optionally a list of embedded frames,
* whose ownership will then be taken over by this Frame, in
* \a embeededFrames;
* \a embeddedFrames;
*
* All times are in milliseconds.
*/

View File

@ -108,6 +108,16 @@ namespace TagLib {
audioPropertiesStyle = AudioProperties::Average) const = 0;
};
class TAGLIB_EXPORT StreamTypeResolver : public FileTypeResolver
{
TAGLIB_IGNORE_MISSING_DESTRUCTOR
public:
virtual File *createFileFromStream(IOStream *stream,
bool readAudioProperties = true,
AudioProperties::ReadStyle
audioPropertiesStyle = AudioProperties::Average) const = 0;
};
/*!
* Creates a null FileRef.
*/
@ -166,8 +176,8 @@ namespace TagLib {
* \warning This pointer will become invalid when this FileRef and all
* copies pass out of scope.
*
* \warning Do not cast it to any subclasses of \class Tag.
* Use tag returning methods of appropriate subclasses of \class File instead.
* \warning Do not cast it to any subclasses of Tag.
* Use tag returning methods of appropriate subclasses of File instead.
*
* \see File::tag()
*/
@ -268,7 +278,7 @@ namespace TagLib {
* \note You generally shouldn't use this method, but instead the constructor
* directly.
*
* \deprecated
* \deprecated Use FileRef(FileName, bool, AudioProperties::ReadStyle).
*/
static File *create(FileName fileName,
bool readAudioProperties = true,

View File

@ -238,7 +238,7 @@ namespace TagLib {
* when
*
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
* \deprecated This value should be passed in via the constructor.
*/
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);

View File

@ -70,7 +70,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;
@ -118,7 +118,7 @@ namespace TagLib {
*
* \note This method is just an alias of bitsPerSample().
*
* \deprecated
* \deprecated Use bitsPerSample().
*/
TAGLIB_DEPRECATED int sampleWidth() const;

View File

@ -47,7 +47,7 @@ namespace TagLib {
* split between a collection of frames (which are in turn split into fields
* (Structure, <a href="id3v2-structure.html#4">4</a>)
* (<a href="id3v2-frames.html">Frames</a>). This class provides an API for
* gathering information about and modifying ID3v2 frames. Funtionallity
* gathering information about and modifying ID3v2 frames. Functionality
* specific to a given frame type is handed in one of the many subclasses.
*/
@ -55,6 +55,8 @@ namespace TagLib {
{
friend class Tag;
friend class FrameFactory;
friend class TableOfContentsFrame;
friend class ChapterFrame;
public:
@ -503,7 +505,7 @@ namespace TagLib {
ByteVector render() const;
/*!
* \deprecated
* \deprecated Use fileAlterPreservation().
*/
TAGLIB_DEPRECATED bool frameAlterPreservation() const;

View File

@ -46,7 +46,7 @@ namespace TagLib {
*
* Reimplementing this factory is the key to adding support for frame types
* not directly supported by TagLib to your application. To do so you would
* subclass this factory reimplement createFrame(). Then by setting your
* subclass this factory and reimplement createFrame(). Then by setting your
* factory to be the default factory in ID3v2::Tag constructor you can
* implement behavior that will allow for new ID3v2::Frame subclasses (also
* provided by you) to be used.
@ -87,7 +87,7 @@ namespace TagLib {
TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, unsigned int version = 4) const;
/*!
* \deprecated
* \deprecated Use createFrame(const ByteVector &, const Header *) const.
*/
// BIC: remove
Frame *createFrame(const ByteVector &data, Header *tagHeader) const;

View File

@ -338,7 +338,7 @@ namespace TagLib {
ByteVector render() const;
/*!
* \deprecated
* \deprecated Use render(Version) const.
*/
TAGLIB_DEPRECATED ByteVector render(int version) const;
@ -393,7 +393,7 @@ namespace TagLib {
void setTextFrame(const ByteVector &id, const String &value);
/*!
* Dowgrade frames from ID3v2.4 (used internally and by default) to ID3v2.3
* Downgrade frames from ID3v2.4 (used internally and by default) to ID3v2.3.
*/
void downgradeFrames(FrameList *existingFrames, FrameList *newFrames) const;

View File

@ -74,7 +74,7 @@ namespace TagLib {
typedef TagLib::List<AtomData> AtomDataList;
class Atom
class TAGLIB_EXPORT Atom
{
public:
Atom(File *file);
@ -88,11 +88,11 @@ namespace TagLib {
AtomList children;
private:
static const int numContainers = 11;
static const char *containers[11];
static const char *const containers[11];
};
//! Root-level atoms
class Atoms
class TAGLIB_EXPORT Atoms
{
public:
Atoms(File *file);

View File

@ -48,6 +48,19 @@ namespace TagLib {
class TAGLIB_EXPORT File : public TagLib::File
{
public:
/*!
* This set of flags is used for strip() and is suitable for
* being OR-ed together.
*/
enum TagTypes {
//! Empty set. Matches no tag types.
NoTags = 0x0000,
//! Matches MP4 tags.
MP4 = 0x0001,
//! Matches all tag types.
AllTags = 0xffff
};
/*!
* Constructs an MP4 file from \a file. If \a readProperties is true the
* file's audio properties will also be read.
@ -114,6 +127,15 @@ namespace TagLib {
*/
bool save();
/*!
* This will strip the tags that match the OR-ed together TagTypes from the
* file. By default it strips all tags. It returns true if the tags are
* successfully stripped.
*
* \note This will update the file immediately.
*/
bool strip(int tags = AllTags);
/*!
* Returns whether or not the file on disk actually has an MP4 tag, or the
* file has a Metadata Item List (ilst) atom.

View File

@ -55,7 +55,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -40,7 +40,7 @@ namespace TagLib {
namespace MP4 {
/*!
* \deprecated
* \deprecated Use ItemMap.
*/
TAGLIB_DEPRECATED typedef TagLib::Map<String, Item> ItemListMap;
typedef TagLib::Map<String, Item> ItemMap;
@ -72,7 +72,7 @@ namespace TagLib {
virtual bool isEmpty() const;
/*!
* \deprecated Use the item() and setItem() API instead
* \deprecated Use the item() and setItem() API instead.
*/
TAGLIB_DEPRECATED ItemMap &itemListMap();
@ -102,10 +102,22 @@ namespace TagLib {
*/
bool contains(const String &key) const;
/*!
* Saves the associated file with the tag stripped.
*/
bool strip();
PropertyMap properties() const;
void removeUnsupportedProperties(const StringList& properties);
PropertyMap setProperties(const PropertyMap &properties);
protected:
/*!
* Sets the value of \a key to \a value, overwriting any previous value.
* If \a value is empty, the item is removed.
*/
void setTextItem(const String &key, const String &value);
private:
AtomDataList parseData2(const Atom *atom, int expectedFlags = -1,
bool freeForm = false);

View File

@ -195,7 +195,7 @@ namespace TagLib {
void strip(int tags = AllTags);
/*!
* \deprecated
* \deprecated Use strip().
* \see strip
*/
TAGLIB_DEPRECATED void remove(int tags = AllTags);

View File

@ -72,7 +72,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -193,19 +193,19 @@ namespace TagLib {
bool save(int tags);
/*!
* \deprecated
* \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags).
*/
// BIC: combine with the above method
TAGLIB_DEPRECATED bool save(int tags, bool stripOthers);
/*!
* \deprecated
* \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
* \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);
@ -315,7 +315,7 @@ namespace TagLib {
* Set the ID3v2::FrameFactory to something other than the default.
*
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
* \deprecated This value should be passed in via the constructor.
*/
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);

View File

@ -50,7 +50,7 @@ namespace TagLib {
/*!
* Parses an MPEG header based on \a data.
*
* \deprecated
* \deprecated Use Header(File *, long, bool).
*/
TAGLIB_DEPRECATED Header(const ByteVector &data);

View File

@ -65,7 +65,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -67,7 +67,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -57,6 +57,8 @@ namespace TagLib {
*/
virtual String toString() const;
PropertyMap asProperties() const;
protected:
// Reimplementations.

View File

@ -155,7 +155,7 @@ namespace TagLib {
* available and returns 0 if the specified channel does not exist.
*
* \see setVolumeAdjustmentIndex()
* \see volumeAjustment()
* \see volumeAdjustment()
*/
short volumeAdjustmentIndex(ChannelType type = MasterVolume) const;
@ -167,7 +167,7 @@ namespace TagLib {
* By default this sets the value for the master volume.
*
* \see volumeAdjustmentIndex()
* \see setVolumeAjustment()
* \see setVolumeAdjustment()
*/
void setVolumeAdjustmentIndex(short index, ChannelType type = MasterVolume);

View File

@ -67,7 +67,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -26,13 +26,11 @@
#ifndef TAGLIB_H
#define TAGLIB_H
#ifndef WIN32
#include "taglib_config.h"
#endif
#define TAGLIB_MAJOR_VERSION 1
#define TAGLIB_MINOR_VERSION 11
#define TAGLIB_PATCH_VERSION 1
#define TAGLIB_MINOR_VERSION 13
#define TAGLIB_PATCH_VERSION 0
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)) || defined(__clang__)
#define TAGLIB_IGNORE_MISSING_DESTRUCTOR _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"")

View File

@ -278,7 +278,7 @@ namespace TagLib {
*
* \see isEmpty()
*
* \deprecated
* \deprecated Use isEmpty(), do not differentiate between null and empty.
*/
// BIC: remove
TAGLIB_DEPRECATED bool isNull() const;
@ -592,7 +592,7 @@ namespace TagLib {
* \warning Do not modify this variable. It will mess up the internal state
* of TagLib.
*
* \deprecated
* \deprecated Use ByteVector().
*/
// BIC: remove
TAGLIB_DEPRECATED static ByteVector null;

View File

@ -72,11 +72,11 @@ namespace TagLib {
/*!
* Used to specify if when saving files, if values between different tag
* types should be syncronized.
* types should be synchronized.
*/
enum DuplicateTags {
Duplicate, //<! Syncronize values between different tag types
DoNotDuplicate //<! Do not syncronize values between different tag types
Duplicate, //<! Synchronize values between different tag types
DoNotDuplicate //<! Do not synchronize values between different tag types
};
/*!
@ -261,14 +261,14 @@ namespace TagLib {
* Returns true if \a file can be opened for reading. If the file does not
* exist, this will return false.
*
* \deprecated
* \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
* \deprecated Use system functions, e.g. access() (_access_s() on Windows).
*/
TAGLIB_DEPRECATED static bool isWritable(const char *name);

View File

@ -153,6 +153,14 @@ namespace TagLib {
*/
Map<Key, T> &erase(const Key &key);
/*!
* Returns the value associated with \a key.
*
* If the map does not contain \a key, it returns defaultValue.
* If no defaultValue is specified, it returns a default-constructed value.
*/
const T value(const Key &key, const T &defaultValue = T()) const;
/*!
* Returns a reference to the value associated with \a key.
*

View File

@ -155,6 +155,13 @@ unsigned int Map<Key, T>::size() const
return static_cast<unsigned int>(d->map.size());
}
template <class Key, class T>
const T Map<Key, T>::value(const Key &key, const T &defaultValue) const
{
ConstIterator it = d->map.find(key);
return it != d->map.end() ? it->second : defaultValue;
}
template <class Key, class T>
const T &Map<Key, T>::operator[](const Key &key) const
{

View File

@ -29,6 +29,11 @@
#include "tmap.h"
#include "tstringlist.h"
#ifdef _MSC_VER
// Explained at end of tpropertymap.cpp
extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
#endif
namespace TagLib {
typedef Map<String,StringList> SimplePropertyMap;
@ -68,6 +73,7 @@ namespace TagLib {
* - ALBUMSORT
* - ARTISTSORT
* - ALBUMARTISTSORT
* - COMPOSERSORT
*
* Credits:
*
@ -75,7 +81,7 @@ namespace TagLib {
* - LYRICIST
* - CONDUCTOR
* - REMIXER
* - PERFORMER:<XXXX>
* - PERFORMER:\<XXXX>
*
* Other tags:
*
@ -90,12 +96,16 @@ namespace TagLib {
* - LABEL
* - CATALOGNUMBER
* - BARCODE
* - RELEASECOUNTRY
* - RELEASESTATUS
* - RELEASETYPE
*
* MusicBrainz identifiers:
*
* - MUSICBRAINZ_TRACKID
* - MUSICBRAINZ_ALBUMID
* - MUSICBRAINZ_RELEASEGROUPID
* - MUSICBRAINZ_RELEASETRACKID
* - MUSICBRAINZ_WORKID
* - MUSICBRAINZ_ARTISTID
* - MUSICBRAINZ_ALBUMARTISTID
@ -181,6 +191,15 @@ namespace TagLib {
*/
PropertyMap &merge(const PropertyMap &other);
/*!
* Returns the value associated with \a key.
*
* If the map does not contain \a key, it returns defaultValue.
* If no defaultValue is specified, it returns an empty string list.
*/
const StringList value(const String &key,
const StringList &defaultValue = StringList()) const;
/*!
* Returns a reference to the value associated with \a key.
*
@ -199,12 +218,12 @@ namespace TagLib {
StringList &operator[](const String &key);
/*!
* Returns true if and only if \other has the same contents as this map.
* Returns true if and only if \a other has the same contents as this map.
*/
bool operator==(const PropertyMap &other) const;
/*!
* Returns false if and only \other has the same contents as this map.
* Returns false if and only \a other has the same contents as this map.
*/
bool operator!=(const PropertyMap &other) const;

View File

@ -164,7 +164,7 @@ namespace TagLib {
* Set the ID3v2::FrameFactory to something other than the default.
*
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
* \deprecated This value should be passed in via the constructor.
*/
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);

View File

@ -67,7 +67,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

View File

@ -337,7 +337,7 @@ namespace TagLib {
*
* \see isEmpty()
*
* \deprecated
* \deprecated Use isEmpty(), do not differentiate between null and empty.
*/
// BIC: remove
TAGLIB_DEPRECATED bool isNull() const;
@ -522,7 +522,7 @@ namespace TagLib {
* \warning Do not modify this variable. It will mess up the internal state
* of TagLib.
*
* \deprecated
* \deprecated Use String().
*/
// BIC: remove
TAGLIB_DEPRECATED static String null;

View File

@ -110,6 +110,6 @@ namespace TagLib {
* \related TagLib::StringList
* Send the StringList to an output stream.
*/
std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);
std::ostream TAGLIB_EXPORT &operator<<(std::ostream &s, const TagLib::StringList &l);
#endif

View File

@ -73,7 +73,7 @@ namespace TagLib {
*
* \note This method is just an alias of lengthInSeconds().
*
* \deprecated
* \deprecated Use lengthInSeconds().
*/
TAGLIB_DEPRECATED virtual int length() const;

Some files were not shown because too many files have changed in this diff Show More