TagLib API Documentation
mp4file.h
Go to the documentation of this file.
1/**************************************************************************
2 copyright : (C) 2007 by Lukáš Lalinský
3 email : lalinsky@gmail.com
4 **************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_MP4FILE_H
27#define TAGLIB_MP4FILE_H
28
29#include "tfile.h"
30#include "taglib_export.h"
31#include "mp4tag.h"
32#include "tag.h"
33#include "mp4properties.h"
34#include "mp4chapter.h"
35
36namespace TagLib {
38 namespace MP4 {
39 class Atoms;
40 class ItemFactory;
41
43
51 {
52 public:
57 enum TagTypes {
59 NoTags = 0x0000,
61 MP4 = 0x0001,
63 AllTags = 0xffff
64 };
65
74 File(FileName file, bool readProperties = true,
75 Properties::ReadStyle audioPropertiesStyle = Properties::Average,
76 ItemFactory *itemFactory = nullptr);
77
89 File(IOStream *stream, bool readProperties = true,
90 Properties::ReadStyle audioPropertiesStyle = Properties::Average,
91 ItemFactory *itemFactory = nullptr);
92
96 ~File() override;
97
98 File(const File &) = delete;
99 File &operator=(const File &) = delete;
100
111 Tag *tag() const override;
112
116 PropertyMap properties() const override;
117
122 void removeUnsupportedProperties(const StringList &properties) override;
123
128
132 Properties *audioProperties() const override;
133
138
142 void setNeroChapters(const ChapterList &chapters);
143
148
152 void setQtChapters(const ChapterList &chapters);
153
159 bool save() override;
160
168 bool strip(int tags = AllTags);
169
174 bool hasMP4Tag() const;
175
183 static bool isSupported(IOStream *stream);
184
185 private:
186 void read(bool readProperties);
187
188 class FilePrivate;
190 std::unique_ptr<FilePrivate> d;
191 };
192 } // namespace MP4
193} // namespace TagLib
194#endif
ReadStyle
Definition audioproperties.h:56
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
A generic, implicitly shared list.
Definition tlist.h:54
An implementation of TagLib::File with MP4 specific methods.
Definition mp4file.h:51
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle audioPropertiesStyle=Properties::Average, ItemFactory *itemFactory=nullptr)
File(FileName file, bool readProperties=true, Properties::ReadStyle audioPropertiesStyle=Properties::Average, ItemFactory *itemFactory=nullptr)
PropertyMap setProperties(const PropertyMap &) override
ChapterList neroChapters()
PropertyMap properties() const override
~File() override
Properties * audioProperties() const override
ChapterList qtChapters()
bool save() override
File(const File &)=delete
static bool isSupported(IOStream *stream)
File & operator=(const File &)=delete
TagTypes
Definition mp4file.h:57
void removeUnsupportedProperties(const StringList &properties) override
void setQtChapters(const ChapterList &chapters)
bool strip(int tags=AllTags)
void setNeroChapters(const ChapterList &chapters)
Tag * tag() const override
bool hasMP4Tag() const
A factory for creating MP4 items during parsing.
Definition mp4itemfactory.h:70
An implementation of MP4 audio properties.
Definition mp4properties.h:39
An MP4 tag implementation.
Definition mp4tag.h:44
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
A list of strings.
Definition tstringlist.h:44
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
#define TAGLIB_EXPORT
Definition taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55