mp4file.h
Go to the documentation of this file.
/**************************************************************************
copyright : (C) 2007 by Lukáš Lalinský
email : lalinsky@gmail.com
**************************************************************************/
/***************************************************************************
* 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_MP4FILE_H
#define TAGLIB_MP4FILE_H
#include "tfile.h"
#include "taglib_export.h"
#include "mp4tag.h"
#include "tag.h"
#include "mp4properties.h"
namespace TagLib {
namespace MP4 {
class Atoms;
class ItemFactory;
class TAGLIB_EXPORT File : public TagLib::File
{
public:
enum TagTypes {
NoTags = 0x0000,
MP4 = 0x0001,
AllTags = 0xffff
};
File(FileName file, bool readProperties = true,
Properties::ReadStyle audioPropertiesStyle = Properties::Average,
ItemFactory *itemFactory = nullptr);
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle audioPropertiesStyle = Properties::Average,
ItemFactory *itemFactory = nullptr);
~File() override;
File(const File &) = delete;
File &operator=(const File &) = delete;
Tag *tag() const override;
PropertyMap properties() const override;
void removeUnsupportedProperties(const StringList &properties) override;
PropertyMap setProperties(const PropertyMap &) override;
Properties *audioProperties() const override;
bool save() override;
bool strip(int tags = AllTags);
bool hasMP4Tag() const;
static bool isSupported(IOStream *stream);
private:
void read(bool readProperties);
class FilePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<FilePrivate> d;
};
} // namespace MP4
} // 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::File
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
TagLib::MP4::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle audioPropertiesStyle=Properties::Average, ItemFactory *itemFactory=nullptr)
TagLib::MP4::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle audioPropertiesStyle=Properties::Average, ItemFactory *itemFactory=nullptr)
TagLib::MP4::File::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::MP4::File::properties
PropertyMap properties() const override
TagLib::MP4::File::~File
~File() override
TagLib::MP4::File::audioProperties
Properties * audioProperties() const override
TagLib::MP4::File::save
bool save() override
TagLib::MP4::File::File
File(const File &)=delete
TagLib::MP4::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::MP4::File::operator=
File & operator=(const File &)=delete
TagLib::MP4::File::TagTypes
TagTypes
Definition mp4file.h:56
TagLib::MP4::File::MP4
@ MP4
Matches MP4 tags.
Definition mp4file.h:60
TagLib::MP4::File::AllTags
@ AllTags
Matches all tag types.
Definition mp4file.h:62
TagLib::MP4::File::NoTags
@ NoTags
Empty set. Matches no tag types.
Definition mp4file.h:58
TagLib::MP4::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties) override
TagLib::MP4::File::strip
bool strip(int tags=AllTags)
TagLib::MP4::File::tag
Tag * tag() const override
TagLib::MP4::File::hasMP4Tag
bool hasMP4Tag() const
TagLib::MP4::ItemFactory
A factory for creating MP4 items during parsing.
Definition mp4itemfactory.h:70
TagLib::MP4::Properties
An implementation of MP4 audio properties.
Definition mp4properties.h:39
TagLib::MP4::Tag
An MP4 tag implementation.
Definition mp4tag.h:44
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
mp4properties.h
mp4tag.h
TagLib::MP4
An implementation of MP4 (AAC, ALAC, ...) metadata.
Definition mp4atom.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
tag.h
taglib_export.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
tfile.h