1#ifndef TAG_PARSER_MATROSKACONTAINER_H
2#define TAG_PARSER_MATROSKACONTAINER_H
32 const std::vector<std::unique_ptr<MatroskaSeekInfo>> &
seekInfos()
const;
34 const std::vector<std::unique_ptr<MatroskaEditionEntry>> &
editionEntires()
const;
47 void reset()
override;
59 void readTrackStatisticsFromTags(
Diagnostics &diag);
61 std::uint64_t m_maxIdLength;
62 std::uint64_t m_maxSizeLength;
64 std::vector<EbmlElement *> m_tracksElements;
65 std::vector<EbmlElement *> m_segmentInfoElements;
66 std::vector<EbmlElement *> m_tagsElements;
67 std::vector<EbmlElement *> m_chaptersElements;
68 std::vector<EbmlElement *> m_attachmentsElements;
69 std::vector<std::unique_ptr<MatroskaSeekInfo>> m_seekInfos;
70 std::vector<std::unique_ptr<MatroskaEditionEntry>> m_editionEntries;
71 std::vector<std::unique_ptr<MatroskaAttachment>> m_attachments;
72 std::size_t m_segmentCount;
88 return m_maxSizeLength;
104 return m_editionEntries;
109 return m_attachments.at(index).get();
114 return m_attachments.size();
124 return m_segmentInfoElements.size();
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
std::iostream & stream()
Returns the related stream.
std::uint64_t startOffset() const
Returns the start offset in the related stream.
The Diagnostics class is a container for DiagMessage.
GenericContainer(MediaFileInfo &fileInfo, std::uint64_t startOffset)
Implementation of TagParser::AbstractAttachment for the Matroska container.
The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files.
void internalParseChapters(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the chapters.
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the header.
virtual std::size_t segmentCount() const override
Returns the number of segments.
std::size_t chapterCount() const override
Returns the number of chapters the container holds.
void internalParseTracks(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the tracks.
const std::vector< std::unique_ptr< MatroskaSeekInfo > > & seekInfos() const
Returns seek information read from "SeekHead"-elements when parsing segment info.
ElementPosition determineTagPosition(Diagnostics &diag) const override
Determines the position of the tags inside the file.
std::size_t attachmentCount() const override
Returns the number of attachments the container holds.
MatroskaAttachment * createAttachment() override
Creates and returns a new attachment.
void reset() override
Discards all parsing results.
const std::vector< std::unique_ptr< MatroskaEditionEntry > > & editionEntires() const
Returns the edition entries.
MatroskaContainer(MediaFileInfo &stream, std::uint64_t startOffset)
Constructs a new container for the specified fileInfo at the specified startOffset.
std::uint64_t maxSizeLength() const
Returns the maximal size length in bytes.
MatroskaAttachment * attachment(std::size_t index) override
Returns the attachment with the specified index.
void internalMakeFile(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to make the file.
virtual bool supportsTitle() const override
Returns whether the title property is supported.
MatroskaChapter * chapter(std::size_t index) override
Returns the chapter with the specified index.
ElementPosition determineIndexPosition(Diagnostics &diag) const override
Determines the position of the index.
void internalParseAttachments(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the attachments.
std::uint64_t maxIdLength() const
Returns the maximal ID length in bytes.
ElementPosition determineElementPosition(std::uint64_t elementId, Diagnostics &diag) const
Determines the position of the element with the specified elementId.
void validateIndex(Diagnostics &diag, AbortableProgressFeedback &progress)
Validates the file index (cue entries).
void internalParseTags(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the tags.
The MatroskaEditionEntry class provides a parser for edition entries in Matroska files.
The MatroskaSeekInfo class helps parsing and making "SeekHead"-elements.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.