Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
mp4container.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MP4CONTAINER_H
2#define TAG_PARSER_MP4CONTAINER_H
3
4#include "./mp4atom.h"
5#include "./mp4tag.h"
6#include "./mp4track.h"
7
8#include "../genericcontainer.h"
9
10#include <cstdint>
11#include <memory>
12#include <vector>
13
14namespace TagParser {
15
16class MediaFileInfo;
17
18class TAG_PARSER_EXPORT Mp4Container final : public GenericContainer<MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom> {
19public:
20 Mp4Container(MediaFileInfo &fileInfo, std::uint64_t startOffset);
21 ~Mp4Container() override;
22
23 bool supportsTrackModifications() const override;
24 bool isFragmented() const;
25 void reset() override;
26 ElementPosition determineTagPosition(Diagnostics &diag) const override;
27 ElementPosition determineIndexPosition(Diagnostics &diag) const override;
28
29 static const CppUtilities::DateTime epoch;
30
31protected:
32 void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override;
33 void internalParseTags(Diagnostics &diag, AbortableProgressFeedback &progress) override;
34 void internalParseTracks(Diagnostics &diag, AbortableProgressFeedback &progress) override;
35 void internalMakeFile(Diagnostics &diag, AbortableProgressFeedback &progress) override;
36
37private:
38 void updateOffsets(const std::vector<std::int64_t> &oldMdatOffsets, const std::vector<std::int64_t> &newMdatOffsets, Diagnostics &diag,
40
41 bool m_fragmented;
42};
43
45{
46 return true;
47}
48
53inline bool Mp4Container::isFragmented() const
54{
55 return m_fragmented;
56}
57
58} // namespace TagParser
59
60#endif // TAG_PARSER_MP4CONTAINER_H
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
The Diagnostics class is a container for DiagMessage.
The GenericContainer class helps parsing header, track, tag and chapter information of a file.
The MediaFileInfo class allows to read and write tag information providing a container/tag format ind...
Implementation of GenericContainer<MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom>.
bool supportsTrackModifications() const override
Returns whether the implementation supports adding or removing of tracks.
static const CppUtilities::DateTime epoch
Dates within MP4 tracks are expressed as the number of seconds since this date.
bool isFragmented() const
Returns whether the file is fragmented.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:13
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
ElementPosition
Definition settings.h:13