Tag Parser 12.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
TagParser::AbstractContainer Class Reference

The AbstractContainer class provides an interface and common functionality to parse and make a certain container format. More...

#include <abstractcontainer.h>

Inheritance diagram for TagParser::AbstractContainer:
[legend]
Collaboration diagram for TagParser::AbstractContainer:
[legend]

Public Member Functions

virtual ~AbstractContainer ()
 Destroys the container.
 
std::iostream & stream ()
 Returns the related stream.
 
void setStream (std::iostream &stream)
 Sets the related stream.
 
std::uint64_t startOffset () const
 Returns the start offset in the related stream.
 
CppUtilities::BinaryReader & reader ()
 Returns the related BinaryReader.
 
CppUtilities::BinaryWriter & writer ()
 Returns the related BinaryWriter.
 
void parseHeader (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses the header if not parsed yet.
 
void parseTags (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses the tag information if not parsed yet.
 
void parseTracks (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses the tracks of the file if not parsed yet.
 
void parseChapters (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses the chapters of the file if not parsed yet.
 
void parseAttachments (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses the attachments of the file if not parsed yet.
 
void makeFile (Diagnostics &diag, AbortableProgressFeedback &progress)
 Rewrites the file to apply changed tag information.
 
bool isHeaderParsed () const
 Returns an indication whether the header has been parsed yet.
 
bool areTagsParsed () const
 Returns an indication whether the tags have been parsed yet.
 
bool areTracksParsed () const
 Returns an indication whether the tracks have been parsed yet.
 
bool areChaptersParsed () const
 Returns an indication whether the chapters have been parsed yet.
 
bool areAttachmentsParsed () const
 Returns an indication whether the attachments have been parsed yet.
 
virtual TagcreateTag (const TagTarget &target=TagTarget())
 Creates and returns a tag for the specified target.
 
virtual Tagtag (std::size_t index)
 Returns the tag with the specified index.
 
virtual std::size_t tagCount () const
 Returns the number of tags attached to the container.
 
virtual bool removeTag (Tag *tag)
 Removes the specified tag from the container.
 
virtual void removeAllTags ()
 Removes all tags attached to the container.
 
virtual ElementPosition determineTagPosition (Diagnostics &diag) const
 Determines the position of the tags inside the file.
 
virtual AbstractTracktrack (std::size_t index)
 Returns the track with the specified index.
 
virtual std::size_t trackCount () const
 Returns the number of tracks the container holds.
 
virtual bool removeTrack (AbstractTrack *track)
 Removes the specified track to the container.
 
virtual void removeAllTracks ()
 Removes all tracks from the container.
 
virtual bool supportsTrackModifications () const
 Returns whether the implementation supports adding or removing of tracks.
 
virtual ElementPosition determineIndexPosition (Diagnostics &diag) const
 Determines the position of the index.
 
virtual AbstractChapterchapter (std::size_t index)
 Returns the chapter with the specified index.
 
virtual std::size_t chapterCount () const
 Returns the number of chapters the container holds.
 
virtual AbstractAttachmentcreateAttachment ()
 Creates and returns a new attachment.
 
virtual AbstractAttachmentattachment (std::size_t index)
 Returns the attachment with the specified index.
 
virtual std::size_t attachmentCount () const
 Returns the number of attachments the container holds.
 
std::uint64_t version () const
 Returns the version if known; otherwise returns 0.
 
std::uint64_t readVersion () const
 Returns the "read version" if known; otherwise returns 0.
 
const std::string & documentType () const
 Returns a string that describes the document type if available; otherwise returns an empty string.
 
std::uint64_t doctypeVersion () const
 Returns the document type version if known; otherwise returns 0.
 
std::uint64_t doctypeReadVersion () const
 Returns the document type "read version" if known; otherwise returns 0.
 
const std::vector< std::string > & titles () const
 Returns the title(s) of the file.
 
void setTitle (std::string_view title, std::size_t segmentIndex=0)
 Sets the title for the specified segment.
 
virtual bool supportsTitle () const
 Returns whether the title property is supported.
 
const std::vector< std::string > & muxingApplications () const
 Returns the muxing applications specified as meta-data.
 
const std::vector< std::string > & writingApplications () const
 Returns the writing applications specified as meta-data.
 
virtual std::size_t segmentCount () const
 Returns the number of segments.
 
CppUtilities::TimeSpan duration () const
 Returns the duration of the file if known; otherwise returns a time span of zero ticks.
 
CppUtilities::DateTime creationTime () const
 Returns the creation time of the file if known; otherwise the returned date time is null.
 
CppUtilities::DateTime modificationTime () const
 Returns the modification time of the file if known; otherwise the returned date time is null.
 
std::uint32_t timeScale () const
 Returns the time scale of the file if known; otherwise returns 0.
 
virtual void reset ()
 Discards all parsing results.
 

Protected Member Functions

 AbstractContainer (std::iostream &stream, std::uint64_t startOffset)
 Constructs a new container for the specified file stream at the specified startOffset.
 
virtual void internalParseHeader (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to parse the header.
 
virtual void internalParseTags (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to parse the tags.
 
virtual void internalParseTracks (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to parse the tracks.
 
virtual void internalParseChapters (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to parse the chapters.
 
virtual void internalParseAttachments (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to parse the attachments.
 
virtual void internalMakeFile (Diagnostics &diag, AbortableProgressFeedback &progress)
 Internally called to make the file.
 
std::vector< std::string > & muxingApplications ()
 Returns the muxing applications specified as meta-data.
 
std::vector< std::string > & writingApplications ()
 Returns the writing applications specified as meta-data.
 

Protected Attributes

std::uint64_t m_version
 
std::uint64_t m_readVersion
 
std::string m_doctype
 
std::uint64_t m_doctypeVersion
 
std::uint64_t m_doctypeReadVersion
 
std::vector< std::string > m_titles
 
CppUtilities::TimeSpan m_duration
 
CppUtilities::DateTime m_creationTime
 
CppUtilities::DateTime m_modificationTime
 
std::uint32_t m_timeScale
 
bool m_headerParsed
 
bool m_tagsParsed
 
bool m_tracksParsed
 
bool m_tracksAltered
 
bool m_chaptersParsed
 
bool m_attachmentsParsed
 

Detailed Description

The AbstractContainer class provides an interface and common functionality to parse and make a certain container format.

Constructor & Destructor Documentation

◆ ~AbstractContainer()

TagParser::AbstractContainer::~AbstractContainer ( )
virtual

Destroys the container.

Destroys the reader, the writer and track, tag, chapter and attachment objects as well. Does NOT destroy the stream which has been specified when constructing the object.

Definition at line 47 of file abstractcontainer.cpp.

◆ AbstractContainer()

TagParser::AbstractContainer::AbstractContainer ( std::iostream & stream,
std::uint64_t startOffset )
protected

Constructs a new container for the specified file stream at the specified startOffset.

Definition at line 22 of file abstractcontainer.cpp.

Member Function Documentation

◆ areAttachmentsParsed()

bool TagParser::AbstractContainer::areAttachmentsParsed ( ) const
inline

Returns an indication whether the attachments have been parsed yet.

Definition at line 202 of file abstractcontainer.h.

◆ areChaptersParsed()

bool TagParser::AbstractContainer::areChaptersParsed ( ) const
inline

Returns an indication whether the chapters have been parsed yet.

Definition at line 194 of file abstractcontainer.h.

◆ areTagsParsed()

bool TagParser::AbstractContainer::areTagsParsed ( ) const
inline

Returns an indication whether the tags have been parsed yet.

Definition at line 186 of file abstractcontainer.h.

◆ areTracksParsed()

bool TagParser::AbstractContainer::areTracksParsed ( ) const
inline

Returns an indication whether the tracks have been parsed yet.

Definition at line 210 of file abstractcontainer.h.

◆ attachment()

AbstractAttachment * TagParser::AbstractContainer::attachment ( std::size_t index)
virtual

Returns the attachment with the specified index.

index must be less than attachmentCount().

Reimplemented in TagParser::MatroskaContainer.

Definition at line 458 of file abstractcontainer.cpp.

◆ attachmentCount()

size_t TagParser::AbstractContainer::attachmentCount ( ) const
virtual

Returns the number of attachments the container holds.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 467 of file abstractcontainer.cpp.

◆ chapter()

AbstractChapter * TagParser::AbstractContainer::chapter ( std::size_t index)
virtual

Returns the chapter with the specified index.

index must be less than chapterCount().

Reimplemented in TagParser::MatroskaContainer.

Definition at line 429 of file abstractcontainer.cpp.

◆ chapterCount()

size_t TagParser::AbstractContainer::chapterCount ( ) const
virtual

Returns the number of chapters the container holds.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 438 of file abstractcontainer.cpp.

◆ createAttachment()

AbstractAttachment * TagParser::AbstractContainer::createAttachment ( )
virtual

Creates and returns a new attachment.

Returns
Returns the created attachment.
Remarks
The container keeps the ownership over the created attachment.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 448 of file abstractcontainer.cpp.

◆ createTag()

Tag * TagParser::AbstractContainer::createTag ( const TagTarget & target = TagTarget())
virtual

Creates and returns a tag for the specified target.

Remarks
  • If there is already a tag (for the specified target) present, no new tag will be created. The present tag will be returned instead.
  • If an empty target is specified it will be ignored.
  • If targets aren't supported the specified target will be ignored.
  • If no tag could be created, nullptr is returned.
  • The container keeps the ownership over the created tag.

Reimplemented in TagParser::GenericContainer< FileInfoType, TagType, TrackType, ElementType >, TagParser::GenericContainer< MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement >, TagParser::GenericContainer< MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom >, TagParser::GenericContainer< MediaFileInfo, OggVorbisComment, OggStream, OggPage >, and TagParser::OggContainer.

Definition at line 294 of file abstractcontainer.cpp.

◆ creationTime()

CppUtilities::DateTime TagParser::AbstractContainer::creationTime ( ) const
inline

Returns the creation time of the file if known; otherwise the returned date time is null.

Definition at line 293 of file abstractcontainer.h.

◆ determineIndexPosition()

ElementPosition TagParser::AbstractContainer::determineIndexPosition ( Diagnostics & diag) const
virtual

Determines the position of the index.

Returns
Returns ElementPosition::BeforeData or ElementPosition::AfterData if the position could be determined; otherwise returns ElementPosition::Keep.
Remarks
  • It might be required to parse tracks before the index position can be determined.
  • Not be applicable for files composed of multiple segments.
See also
MediaFileInfo::indexPosition()

Reimplemented in TagParser::MatroskaContainer, and TagParser::Mp4Container.

Definition at line 188 of file abstractcontainer.cpp.

◆ determineTagPosition()

ElementPosition TagParser::AbstractContainer::determineTagPosition ( Diagnostics & diag) const
virtual

Determines the position of the tags inside the file.

Returns
Returns ElementPosition::BeforeData or ElementPosition::AfterData if the position could be determined; otherwise returns ElementPosition::Keep.
Remarks
  • It might be required to parse tags before the tag position can be determined.
  • Not be applicable for files composed of multiple segments.
See also
MediaFileInfo::tagPosition()

Reimplemented in TagParser::MatroskaContainer, and TagParser::Mp4Container.

Definition at line 362 of file abstractcontainer.cpp.

◆ doctypeReadVersion()

std::uint64_t TagParser::AbstractContainer::doctypeReadVersion ( ) const
inline

Returns the document type "read version" if known; otherwise returns 0.

This is the minimum version an interpreter has to support to read the file.

Definition at line 254 of file abstractcontainer.h.

◆ doctypeVersion()

std::uint64_t TagParser::AbstractContainer::doctypeVersion ( ) const
inline

Returns the document type version if known; otherwise returns 0.

Definition at line 244 of file abstractcontainer.h.

◆ documentType()

const std::string & TagParser::AbstractContainer::documentType ( ) const
inline

Returns a string that describes the document type if available; otherwise returns an empty string.

Definition at line 236 of file abstractcontainer.h.

◆ duration()

CppUtilities::TimeSpan TagParser::AbstractContainer::duration ( ) const
inline

Returns the duration of the file if known; otherwise returns a time span of zero ticks.

Definition at line 285 of file abstractcontainer.h.

◆ internalMakeFile()

void TagParser::AbstractContainer::internalMakeFile ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to make the file.

Must be implemented when subclassing.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer, TagParser::Mp4Container, and TagParser::OggContainer.

Definition at line 277 of file abstractcontainer.cpp.

◆ internalParseAttachments()

void TagParser::AbstractContainer::internalParseAttachments ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to parse the attachments.

Must be implemented when subclassing to provide this feature.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 262 of file abstractcontainer.cpp.

◆ internalParseChapters()

void TagParser::AbstractContainer::internalParseChapters ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to parse the chapters.

Must be implemented when subclassing to provide this feature.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 247 of file abstractcontainer.cpp.

◆ internalParseHeader()

void TagParser::AbstractContainer::internalParseHeader ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to parse the header.

Must be implemented when subclassing to provide this feature.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer, TagParser::Mp4Container, and TagParser::OggContainer.

Definition at line 202 of file abstractcontainer.cpp.

◆ internalParseTags()

void TagParser::AbstractContainer::internalParseTags ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to parse the tags.

Must be implemented when subclassing to provide this feature.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer, TagParser::Mp4Container, and TagParser::OggContainer.

Definition at line 217 of file abstractcontainer.cpp.

◆ internalParseTracks()

void TagParser::AbstractContainer::internalParseTracks ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedvirtual

Internally called to parse the tracks.

Must be implemented when subclassing to provide this feature.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Reimplemented in TagParser::MatroskaContainer, TagParser::Mp4Container, and TagParser::OggContainer.

Definition at line 232 of file abstractcontainer.cpp.

◆ isHeaderParsed()

bool TagParser::AbstractContainer::isHeaderParsed ( ) const
inline

Returns an indication whether the header has been parsed yet.

Definition at line 178 of file abstractcontainer.h.

◆ makeFile()

void TagParser::AbstractContainer::makeFile ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Rewrites the file to apply changed tag information.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsTagParser::Failure or a derived exception when a making error occurs.

Definition at line 166 of file abstractcontainer.cpp.

◆ modificationTime()

CppUtilities::DateTime TagParser::AbstractContainer::modificationTime ( ) const
inline

Returns the modification time of the file if known; otherwise the returned date time is null.

Definition at line 301 of file abstractcontainer.h.

◆ muxingApplications() [1/2]

std::vector< std::string > & TagParser::AbstractContainer::muxingApplications ( )
protected

Returns the muxing applications specified as meta-data.

Definition at line 492 of file abstractcontainer.cpp.

◆ muxingApplications() [2/2]

const std::vector< std::string > & TagParser::AbstractContainer::muxingApplications ( ) const

Returns the muxing applications specified as meta-data.

Definition at line 483 of file abstractcontainer.cpp.

◆ parseAttachments()

void TagParser::AbstractContainer::parseAttachments ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Parses the attachments of the file if not parsed yet.

The information will be read from the associated stream. The stream and the start offset have been specified when constructing the object.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsTagParser::Failure or a derived exception when a parsing error occurs.

Definition at line 150 of file abstractcontainer.cpp.

◆ parseChapters()

void TagParser::AbstractContainer::parseChapters ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Parses the chapters of the file if not parsed yet.

The information will be read from the associated stream. The stream and the start offset have been specified when constructing the object.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsTagParser::Failure or a derived exception when a parsing error occurs.

Definition at line 131 of file abstractcontainer.cpp.

◆ parseHeader()

void TagParser::AbstractContainer::parseHeader ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Parses the header if not parsed yet.

The information will be read from the associated stream. The stream and the start offset have been specified when constructing the object.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsFailure or a derived class when an parsing error occurs.

Definition at line 60 of file abstractcontainer.cpp.

◆ parseTags()

void TagParser::AbstractContainer::parseTags ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Parses the tag information if not parsed yet.

The header will be parsed before if not parsed yet.

The information will be read from the associated stream. The stream and the start offset have been specified when constructing the object.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsFailure or a derived class when an parsing error occurs.
See also
parseHeader()
parseTracks()
parseAttachments()
parseChapters()
tags()

Definition at line 87 of file abstractcontainer.cpp.

◆ parseTracks()

void TagParser::AbstractContainer::parseTracks ( Diagnostics & diag,
AbortableProgressFeedback & progress )

Parses the tracks of the file if not parsed yet.

The header will be parsed before if not parsed yet.

The information will be read from the associated stream. The stream and the start offset have been specified when constructing the object.

Exceptions
Throwsstd::ios_base::failure when an IO error occurs.
ThrowsFailure or a derived class when an parsing error occurs.
See also
parseHeader()
parseTags()
tracks()

Definition at line 111 of file abstractcontainer.cpp.

◆ reader()

CppUtilities::BinaryReader & TagParser::AbstractContainer::reader ( )
inline

Returns the related BinaryReader.

Definition at line 162 of file abstractcontainer.h.

◆ readVersion()

std::uint64_t TagParser::AbstractContainer::readVersion ( ) const
inline

Returns the "read version" if known; otherwise returns 0.

This is the minimum version a parser has to support to read the file.

Definition at line 228 of file abstractcontainer.h.

◆ removeAllTags()

void TagParser::AbstractContainer::removeAllTags ( )
virtual

Removes all tags attached to the container.

The tags need to be parsed before they can be removed.

See also
areTagsParsed()
parseTags()
Remarks
The current tag objects are destroyed. All pointers obtained by calling tag() are invalidated.

Reimplemented in TagParser::GenericContainer< FileInfoType, TagType, TrackType, ElementType >, TagParser::GenericContainer< MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement >, TagParser::GenericContainer< MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom >, TagParser::GenericContainer< MediaFileInfo, OggVorbisComment, OggStream, OggPage >, and TagParser::OggContainer.

Definition at line 349 of file abstractcontainer.cpp.

◆ removeAllTracks()

void TagParser::AbstractContainer::removeAllTracks ( )
virtual

Removes all tracks from the container.

Modifying tracks might be not supported by the implementation.

See also
supportsTrackModifications()

The tracks need to be parsed before they can be removed.

See also
areTracksParsed()
parseTracks()
Remarks
The current track objects are destroyed. All pointers obtained by calling track() are invalidated.

Reimplemented in TagParser::GenericContainer< FileInfoType, TagType, TrackType, ElementType >, TagParser::GenericContainer< MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement >, TagParser::GenericContainer< MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom >, and TagParser::GenericContainer< MediaFileInfo, OggVorbisComment, OggStream, OggPage >.

Definition at line 420 of file abstractcontainer.cpp.

◆ removeTag()

bool TagParser::AbstractContainer::removeTag ( Tag * tag)
virtual

Removes the specified tag from the container.

Does nothing if the tag is not attached to the container.

The tags need to be parsed before a removal is possible.

See also
areTagsParsed()
parseTags()
Remarks
The tag is not destroyed. The ownership is transferred to the caller.
Returns
Returns whether the tag could be removed.

Reimplemented in TagParser::GenericContainer< FileInfoType, TagType, TrackType, ElementType >, TagParser::GenericContainer< MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement >, TagParser::GenericContainer< MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom >, TagParser::GenericContainer< MediaFileInfo, OggVorbisComment, OggStream, OggPage >, and TagParser::OggContainer.

Definition at line 333 of file abstractcontainer.cpp.

◆ removeTrack()

bool TagParser::AbstractContainer::removeTrack ( AbstractTrack * track)
virtual

Removes the specified track to the container.

Removal of tracks might be not supported by the implementation.

See also
supportsTrackModifications()

The tracks need to be parsed before a removal is possible.

See also
areTracksParsed()
parseTracks()
Remarks
The track is not destroyed. The ownership is transferred to the caller.
Returns
Returns whether the track could be removed.

Reimplemented in TagParser::GenericContainer< FileInfoType, TagType, TrackType, ElementType >, TagParser::GenericContainer< MediaFileInfo, MatroskaTag, MatroskaTrack, EbmlElement >, TagParser::GenericContainer< MediaFileInfo, Mp4Tag, Mp4Track, Mp4Atom >, and TagParser::GenericContainer< MediaFileInfo, OggVorbisComment, OggStream, OggPage >.

Definition at line 401 of file abstractcontainer.cpp.

◆ reset()

◆ segmentCount()

size_t TagParser::AbstractContainer::segmentCount ( ) const
virtual

Returns the number of segments.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 517 of file abstractcontainer.cpp.

◆ setStream()

void TagParser::AbstractContainer::setStream ( std::iostream & stream)
inline

Sets the related stream.

Definition at line 144 of file abstractcontainer.h.

◆ setTitle()

void TagParser::AbstractContainer::setTitle ( std::string_view title,
std::size_t segmentIndex = 0 )
inline

Sets the title for the specified segment.

Remarks
The title is ignored if it is not supported by the concrete container format.
Exceptions
Throwsout_of_range if the segment does not exist.
See also
titles()

Definition at line 277 of file abstractcontainer.h.

◆ startOffset()

std::uint64_t TagParser::AbstractContainer::startOffset ( ) const
inline

Returns the start offset in the related stream.

Definition at line 154 of file abstractcontainer.h.

◆ stream()

std::iostream & TagParser::AbstractContainer::stream ( )
inline

Returns the related stream.

Definition at line 136 of file abstractcontainer.h.

◆ supportsTitle()

bool TagParser::AbstractContainer::supportsTitle ( ) const
virtual

Returns whether the title property is supported.

Reimplemented in TagParser::MatroskaContainer.

Definition at line 475 of file abstractcontainer.cpp.

◆ supportsTrackModifications()

bool TagParser::AbstractContainer::supportsTrackModifications ( ) const
virtual

Returns whether the implementation supports adding or removing of tracks.

Reimplemented in TagParser::Mp4Container.

Definition at line 174 of file abstractcontainer.cpp.

◆ tag()

◆ tagCount()

size_t TagParser::AbstractContainer::tagCount ( ) const
virtual

◆ timeScale()

std::uint32_t TagParser::AbstractContainer::timeScale ( ) const
inline

Returns the time scale of the file if known; otherwise returns 0.

Definition at line 309 of file abstractcontainer.h.

◆ titles()

const std::vector< std::string > & TagParser::AbstractContainer::titles ( ) const
inline

Returns the title(s) of the file.

Remarks
  • If the container does not support titles an empty vector will be returned.
  • If there are multiple segments, the title of each segment is returned.
See also
setTitle()

Definition at line 266 of file abstractcontainer.h.

◆ track()

◆ trackCount()

◆ version()

std::uint64_t TagParser::AbstractContainer::version ( ) const
inline

Returns the version if known; otherwise returns 0.

Definition at line 218 of file abstractcontainer.h.

◆ writer()

CppUtilities::BinaryWriter & TagParser::AbstractContainer::writer ( )
inline

Returns the related BinaryWriter.

Definition at line 170 of file abstractcontainer.h.

◆ writingApplications() [1/2]

std::vector< std::string > & TagParser::AbstractContainer::writingApplications ( )
protected

Returns the writing applications specified as meta-data.

Definition at line 509 of file abstractcontainer.cpp.

◆ writingApplications() [2/2]

const std::vector< std::string > & TagParser::AbstractContainer::writingApplications ( ) const

Returns the writing applications specified as meta-data.

Definition at line 500 of file abstractcontainer.cpp.

Member Data Documentation

◆ m_attachmentsParsed

bool TagParser::AbstractContainer::m_attachmentsParsed
protected

Definition at line 121 of file abstractcontainer.h.

◆ m_chaptersParsed

bool TagParser::AbstractContainer::m_chaptersParsed
protected

Definition at line 120 of file abstractcontainer.h.

◆ m_creationTime

CppUtilities::DateTime TagParser::AbstractContainer::m_creationTime
protected

Definition at line 112 of file abstractcontainer.h.

◆ m_doctype

std::string TagParser::AbstractContainer::m_doctype
protected

Definition at line 107 of file abstractcontainer.h.

◆ m_doctypeReadVersion

std::uint64_t TagParser::AbstractContainer::m_doctypeReadVersion
protected

Definition at line 109 of file abstractcontainer.h.

◆ m_doctypeVersion

std::uint64_t TagParser::AbstractContainer::m_doctypeVersion
protected

Definition at line 108 of file abstractcontainer.h.

◆ m_duration

CppUtilities::TimeSpan TagParser::AbstractContainer::m_duration
protected

Definition at line 111 of file abstractcontainer.h.

◆ m_headerParsed

bool TagParser::AbstractContainer::m_headerParsed
protected

Definition at line 116 of file abstractcontainer.h.

◆ m_modificationTime

CppUtilities::DateTime TagParser::AbstractContainer::m_modificationTime
protected

Definition at line 113 of file abstractcontainer.h.

◆ m_readVersion

std::uint64_t TagParser::AbstractContainer::m_readVersion
protected

Definition at line 106 of file abstractcontainer.h.

◆ m_tagsParsed

bool TagParser::AbstractContainer::m_tagsParsed
protected

Definition at line 117 of file abstractcontainer.h.

◆ m_timeScale

std::uint32_t TagParser::AbstractContainer::m_timeScale
protected

Definition at line 114 of file abstractcontainer.h.

◆ m_titles

std::vector<std::string> TagParser::AbstractContainer::m_titles
protected

Definition at line 110 of file abstractcontainer.h.

◆ m_tracksAltered

bool TagParser::AbstractContainer::m_tracksAltered
protected

Definition at line 119 of file abstractcontainer.h.

◆ m_tracksParsed

bool TagParser::AbstractContainer::m_tracksParsed
protected

Definition at line 118 of file abstractcontainer.h.

◆ m_version

std::uint64_t TagParser::AbstractContainer::m_version
protected

Definition at line 105 of file abstractcontainer.h.


The documentation for this class was generated from the following files: