1#ifndef TAG_PARSER_OGGCONTAINER_H
2#define TAG_PARSER_OGGCONTAINER_H
13#include <unordered_map>
17template <std::
size_t bufferSize>
class CopyHelper;
76 static constexpr std::string_view
tagName =
"Ogg Vorbis comment";
78 std::string_view
typeName()
const override;
143 void reset()
override;
147 std::size_t
tagCount()
const override;
158 void announceComment(
160 void makeVorbisCommentSegment(std::stringstream &buffer, CppUtilities::CopyHelper<65307> ©Helper, std::vector<std::uint32_t> &newSegmentSizes,
163 std::unordered_map<std::uint32_t, std::vector<std::unique_ptr<OggStream>>::size_type> m_streamsBySerialNo;
166 bool m_validateChecksums;
179 return m_validateChecksums;
188 m_validateChecksums = enabled;
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
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)
MediaFileInfo & fileInfo() const
Implementation of TagParser::AbstractContainer for Ogg files.
void internalParseTags(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the tags.
void setChecksumValidationEnabled(bool enabled)
Sets whether checksum validation is enabled.
OggVorbisComment * tag(std::size_t index) override
Returns the tag with the specified index.
std::size_t tagCount() const override
Returns the number of tags attached to the container.
bool isChecksumValidationEnabled() const
Returns whether checksum validation is enabled.
void internalParseTracks(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the tracks.
OggContainer(MediaFileInfo &fileInfo, std::uint64_t startOffset)
Constructs a new container for the specified stream at the specified startOffset.
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to parse the header.
void removeAllTags() override
Actually just flags all tags as removed and clears all assigned fields.
OggVorbisComment * createTag(const TagTarget &target) override
Creates a new tag.
void reset() override
Discards all parsing results.
void internalMakeFile(Diagnostics &diag, AbortableProgressFeedback &progress) override
Internally called to make the file.
bool removeTag(Tag *tag) override
Actually just flags the specified tag as removed and clears all assigned fields.
The OggIterator class helps iterating through all segments of an Ogg bitstream.
The TagTarget class specifies the target of a tag.
The Tag class is used to store, read and write tag information.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
TagType
Specifies the tag type.
GeneralMediaFormat
The GeneralMediaFormat enum specifies the general format of media data (PCM, MPEG-4,...
The OggParameter struct holds the Ogg parameter for a VorbisComment.
GeneralMediaFormat streamFormat
std::size_t lastPageIndex
std::size_t lastSegmentIndex
constexpr OggParameter()
Creates new parameters.
std::size_t firstSegmentIndex
void set(std::size_t pageIndex, std::size_t segmentIndex, bool lastMetaDataBlock, GeneralMediaFormat streamFormat=GeneralMediaFormat::Vorbis)
Sets the firstPageIndex/lastPageIndex, the firstSegmentIndex/lastSegmentIndex, whether the associated...
std::size_t firstPageIndex