wavfile.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2008 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_WAVFILE_H
#define TAGLIB_WAVFILE_H
#include "rifffile.h"
#include "id3v2tag.h"
#include "infotag.h"
#include "wavproperties.h"
namespace TagLib {
namespace RIFF {
namespace WAV {
class TAGLIB_EXPORT File : public TagLib::RIFF::File
{
public:
enum TagTypes {
NoTags = 0x0000,
ID3v2 = 0x0001,
Info = 0x0002,
AllTags = 0xffff
};
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
~File() override;
File(const File &) = delete;
File &operator=(const File &) = delete;
TagLib::Tag *tag() const override;
ID3v2::Tag *ID3v2Tag() const;
Info::Tag *InfoTag() const;
String iXMLData() const;
void setiXMLData(const String &data);
ByteVector BEXTData() const;
void setBEXTData(const ByteVector &data);
void strip(TagTypes tags = AllTags);
PropertyMap properties() const override;
void removeUnsupportedProperties(const StringList &unsupported) override;
PropertyMap setProperties(const PropertyMap &) override;
Properties *audioProperties() const override;
bool save() override;
bool save(TagTypes tags, StripTags strip = StripOthers,
ID3v2::Version version = ID3v2::v4);
bool hasID3v2Tag() const;
bool hasInfoTag() const;
bool hasiXMLData() const;
bool hasBEXTData() const;
static bool isSupported(IOStream *stream);
private:
void read(bool readProperties);
void removeTagChunks(TagTypes tags);
friend class Properties;
class FilePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<FilePrivate> d;
};
} // namespace WAV
} // namespace RIFF
} // namespace TagLib
#endif
TagLib::AudioProperties::ReadStyle
ReadStyle
Definition audioproperties.h:56
TagLib::AudioProperties::Average
@ Average
Read more of the file and make better values guesses.
Definition audioproperties.h:60
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::File::StripTags
StripTags
Definition tfile.h:68
TagLib::File::StripOthers
@ StripOthers
Strip all tags not explicitly referenced in method call.
Definition tfile.h:70
TagLib::ID3v2::FrameFactory
A factory for creating ID3v2 frames during parsing.
Definition id3v2framefactory.h:68
TagLib::ID3v2::Tag
The main class in the ID3v2 implementation.
Definition id3v2tag.h:134
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::RIFF::File
A RIFF file class with some useful methods specific to RIFF.
Definition rifffile.h:47
TagLib::RIFF::Info::Tag
The main class in the INFO tag implementation.
Definition infotag.h:96
TagLib::RIFF::WAV::File::Properties
friend class Properties
Definition wavfile.h:257
TagLib::RIFF::WAV::File::audioProperties
Properties * audioProperties() const override
TagLib::RIFF::WAV::File::hasID3v2Tag
bool hasID3v2Tag() const
TagLib::RIFF::WAV::File::operator=
File & operator=(const File &)=delete
TagLib::RIFF::WAV::File::setBEXTData
void setBEXTData(const ByteVector &data)
TagLib::RIFF::WAV::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average, ID3v2::FrameFactory *frameFactory=nullptr)
TagLib::RIFF::WAV::File::properties
PropertyMap properties() const override
TagLib::RIFF::WAV::File::hasInfoTag
bool hasInfoTag() const
TagLib::RIFF::WAV::File::strip
void strip(TagTypes tags=AllTags)
TagLib::RIFF::WAV::File::iXMLData
String iXMLData() const
TagLib::RIFF::WAV::File::setiXMLData
void setiXMLData(const String &data)
TagLib::RIFF::WAV::File::InfoTag
Info::Tag * InfoTag() const
TagLib::RIFF::WAV::File::BEXTData
ByteVector BEXTData() const
TagLib::RIFF::WAV::File::tag
TagLib::Tag * tag() const override
TagLib::RIFF::WAV::File::save
bool save() override
TagLib::RIFF::WAV::File::hasBEXTData
bool hasBEXTData() const
TagLib::RIFF::WAV::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::RIFF::WAV::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &unsupported) override
TagLib::RIFF::WAV::File::File
File(const File &)=delete
TagLib::RIFF::WAV::File::ID3v2Tag
ID3v2::Tag * ID3v2Tag() const
TagLib::RIFF::WAV::File::~File
~File() override
TagLib::RIFF::WAV::File::TagTypes
TagTypes
Definition wavfile.h:61
TagLib::RIFF::WAV::File::Info
@ Info
Matches INFO tags.
Definition wavfile.h:67
TagLib::RIFF::WAV::File::ID3v2
@ ID3v2
Matches ID3v2 tags.
Definition wavfile.h:65
TagLib::RIFF::WAV::File::NoTags
@ NoTags
Empty set. Matches no tag types.
Definition wavfile.h:63
TagLib::RIFF::WAV::File::AllTags
@ AllTags
Matches all tag types.
Definition wavfile.h:69
TagLib::RIFF::WAV::File::hasiXMLData
bool hasiXMLData() const
TagLib::RIFF::WAV::File::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::RIFF::WAV::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average, ID3v2::FrameFactory *frameFactory=nullptr)
TagLib::RIFF::WAV::File::save
bool save(TagTypes tags, StripTags strip=StripOthers, ID3v2::Version version=ID3v2::v4)
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::Tag
A simple, generic interface to common audio metadata fields.
Definition tag.h:49
id3v2tag.h
infotag.h
TagLib::ID3v2::Version
Version
Definition id3v2.h:27
TagLib::ID3v2::v4
@ v4
ID3v2.4.
Definition id3v2.h:29
TagLib::RIFF::WAV
An implementation of WAV metadata.
Definition wavfile.h:47
TagLib::RIFF
An implementation of TagLib::File with RIFF specific methods.
Definition aifffile.h:35
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::FileName
const char * FileName
Definition tiostream.h:59
rifffile.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
wavproperties.h