Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
TagParser::AbstractTrack Class Referenceabstract

The AbstractTrack class parses and stores technical information about video, audio and other kinds of media tracks. More...

#include <abstracttrack.h>

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

Public Member Functions

virtual ~AbstractTrack ()
 Destroys the track.
 
virtual TrackType type () const
 Returns the type of the track if known; otherwise returns TrackType::Unspecified.
 
std::istream & inputStream ()
 Returns the associated input stream.
 
void setInputStream (std::istream &stream)
 Assigns another input stream.
 
std::ostream & outputStream ()
 Returns the associated output stream.
 
void setOutputStream (std::ostream &stream)
 Assigns another output stream.
 
CppUtilities::BinaryReader & reader ()
 Returns a binary reader for the associated stream.
 
CppUtilities::BinaryWriter & writer ()
 Returns a binary writer for the associated stream.
 
std::uint64_t startOffset () const
 Returns the start offset of the track in the associated stream.
 
TrackFlags flags () const
 Returns flags (various boolean properties) of this track.
 
MediaFormat format () const
 Returns the format of the track if known; otherwise returns MediaFormat::Unknown.
 
double version () const
 Returns the version/level of the track if known; otherwise returns 0.
 
std::string_view formatName () const
 Returns the format of the track as C-style string if known; otherwise returns the format abbreviation or an empty string.
 
std::string_view formatAbbreviation () const
 Returns the a more or less common abbreviation for the format of the track if known; otherwise returns an empty string.
 
const std::string & formatId () const
 Returns the format/codec ID.
 
MediaType mediaType () const
 Returns the media type if known; otherwise returns MediaType::Other.
 
std::string_view mediaTypeName () const
 Returns the string representation of the media type of the track.
 
std::uint64_t size () const
 Returns the size in bytes if known; otherwise returns 0.
 
void setSize (std::uint64_t size)
 Sets the size in bytes.
 
std::uint32_t trackNumber () const
 Returns the track number if known; otherwise returns 0.
 
void setTrackNumber (std::uint32_t trackNumber)
 Sets the track number.
 
std::uint64_t id () const
 Returns the track ID if known; otherwise returns 0.
 
void setId (std::uint64_t id)
 Sets the track ID.
 
const std::string name () const
 Returns the track name if known; otherwise returns an empty string.
 
void setName (std::string_view name)
 Sets the name.
 
const CppUtilities::TimeSpan & duration () const
 Returns the duration if known; otherwise returns a TimeSpan of zero ticks.
 
double bitrate () const
 Returns the average bitrate in kbit/s if known; otherwise returns zero.
 
double maxBitrate () const
 Returns the maximum bitrate in kbit/s if known; otherwise returns zero.
 
const CppUtilities::DateTime & creationTime () const
 Returns the creation time if known; otherwise returns a DateTime of zero ticks.
 
const CppUtilities::DateTime & modificationTime () const
 Returns the time of the last modification if known; otherwise returns a DateTime of zero ticks.
 
const Localelocale () const
 Returns the locale of the track if known; otherwise returns an empty locale.
 
void setLocale (const Locale &locale)
 Sets the locale of the track.
 
std::uint32_t samplingFrequency () const
 Returns the number of samples per second if known; otherwise returns 0.
 
std::uint32_t extensionSamplingFrequency () const
 Returns the number of samples per second if known; otherwise returns 0.
 
std::uint16_t bitsPerSample () const
 Returns the number of bits per sample; otherwise returns 0.
 
std::uint16_t channelCount () const
 Returns the number of channels if known; otherwise returns 0.
 
std::uint8_t channelConfig () const
 Returns the channel configuration.
 
std::string_view channelConfigString () const
 Returns a string with the channel configuration if available; otherwise returns nullptr.
 
std::uint8_t extensionChannelConfig () const
 Returns the extension channel configuration if available; otherwise returns nullptr.
 
std::string_view extensionChannelConfigString () const
 Returns a string with the extension channel configuration if available; otherwise returns nullptr.
 
std::uint64_t sampleCount () const
 Returns the number of samples/frames if known; otherwise returns 0.
 
int quality () const
 Returns the quality if known; otherwise returns 0.
 
const SizepixelSize () const
 Returns the size of the encoded video frames if known; otherwise returns a zero size.
 
const SizedisplaySize () const
 Returns the size of the video frames to display if known; otherwise returns a zero size.
 
const Sizeresolution () const
 Returns the resolution if known; otherwise returns a zero size.
 
const std::string & compressorName () const
 Returns the compressor name if known; otherwise returns an empty string.
 
void setCompressorName (std::string_view compressorName)
 Returns the compressor name if known; otherwise returns an empty string.
 
std::uint16_t depth () const
 Returns the bit depth if known; otherwise returns 0.
 
std::uint32_t fps () const
 Returns the number of frames per second if known; otherwise returns 0.
 
std::string_view chromaFormat () const
 Returns the chroma subsampling format if known; otherwise returns nullptr.
 
const AspectRatiopixelAspectRatio () const
 Returns the pixel aspect ratio (PAR).
 
bool isInterlaced () const
 Returns true if the video is interlaced; otherwise returns false.
 
std::uint32_t timeScale () const
 Returns the time scale if known; otherwise returns 0.
 
bool isEnabled () const
 Returns true if the track is marked as enabled; otherwise returns false.
 
void setEnabled (bool enabled)
 Sets whether the track is enabled.
 
bool isDefault () const
 Returns true if the track is marked as default; otherwise returns false.
 
void setDefault (bool isDefault)
 Sets whether the track is a default track.
 
bool isForced () const
 Returns true if the track is marked as forced; otherwise returns false.
 
void setForced (bool forced)
 Sets whether the track is forced.
 
bool hasLacing () const
 Returns true if the track has lacing; otherwise returns false.
 
bool isEncrypted () const
 Returns true if the track is marked as encrypted; otherwise returns false.
 
std::uint32_t colorSpace () const
 Returns the color space if known; otherwise returns 0.
 
const Margincropping () const
 Returns the cropping if known; otherwise returns zero margins.
 
std::string label () const
 Returns a label for the track.
 
std::string description () const
 Returns a description about the track.
 
std::string shortDescription () const
 Returns a short description about the track.
 
void parseHeader (Diagnostics &diag, AbortableProgressFeedback &progress)
 Parses technical information about the track from the header.
 
bool isHeaderValid () const
 Returns an indication whether the track header is valid.
 

Protected Member Functions

 AbstractTrack (std::istream &inputStream, std::ostream &outputStream, std::uint64_t startOffset)
 Constructs a new track.
 
 AbstractTrack (std::iostream &stream, std::uint64_t startOffset)
 Constructs a new track.
 
virtual void internalParseHeader (Diagnostics &diag, AbortableProgressFeedback &progress)=0
 This method is internally called to parse header information.
 

Protected Attributes

std::istream * m_istream
 
std::ostream * m_ostream
 
CppUtilities::BinaryReader m_reader
 
CppUtilities::BinaryWriter m_writer
 
std::uint64_t m_startOffset
 
TrackFlags m_flags
 
MediaFormat m_format
 
std::string m_formatId
 
std::string m_formatName
 
MediaType m_mediaType
 
double m_version
 
std::uint64_t m_size
 
std::uint32_t m_trackNumber
 
std::uint64_t m_id
 
std::string m_name
 
CppUtilities::TimeSpan m_duration
 
double m_bitrate
 
double m_maxBitrate
 
CppUtilities::DateTime m_creationTime
 
CppUtilities::DateTime m_modificationTime
 
Locale m_locale
 
std::uint32_t m_samplingFrequency
 
std::uint32_t m_extensionSamplingFrequency
 
std::uint16_t m_bitsPerSample
 
std::uint32_t m_bytesPerSecond
 
std::uint16_t m_channelCount
 
std::uint8_t m_channelConfig
 
std::uint8_t m_extensionChannelConfig
 
std::uint16_t m_chunkSize
 
std::uint64_t m_sampleCount
 
int m_quality
 
Size m_pixelSize
 
Size m_displaySize
 
Size m_resolution
 
std::string m_compressorName
 
std::uint16_t m_depth
 
std::uint32_t m_fps
 
std::string_view m_chromaFormat
 
AspectRatio m_pixelAspectRatio
 
std::uint32_t m_timeScale
 
std::uint32_t m_colorSpace
 
Margin m_cropping
 
FieldOrder m_fieldOrder
 
StereoMode m_stereoMode
 
AlphaMode m_alphaMode
 
DisplayUnit m_displayUnit
 
AspectRatioType m_aspectRatioType
 
std::unique_ptr< AbstractTrackPrivatem_p
 

Friends

class MpegAudioFrameStream
 
class WaveAudioStream
 
class Mp4Track
 

Detailed Description

The AbstractTrack class parses and stores technical information about video, audio and other kinds of media tracks.

The tag class only provides the interface and common functionality. It is meant to be subclassed.

Definition at line 110 of file abstracttrack.h.

Constructor & Destructor Documentation

◆ ~AbstractTrack()

TagParser::AbstractTrack::~AbstractTrack ( )
virtual

Destroys the track.

Definition at line 84 of file abstracttrack.cpp.

◆ AbstractTrack() [1/2]

TagParser::AbstractTrack::AbstractTrack ( std::istream &  inputStream,
std::ostream &  outputStream,
std::uint64_t  startOffset 
)
protected

Constructs a new track.

Parameters
inputStreamSpecifies the stream the track will read from to perform particular operations such as reading header information.
outputStreamSpecifies the stream the track will write to to perform particular operations such as updating or making header information.
startOffsetThe start offset of the track in the specified stream.

Definition at line 33 of file abstracttrack.cpp.

◆ AbstractTrack() [2/2]

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

Constructs a new track.

Parameters
streamSpecifies the stream the track will read from or write to to perform particular operations such as reading header information.
startOffsetThe start offset of the track in the specified stream.

Definition at line 76 of file abstracttrack.cpp.

Member Function Documentation

◆ bitrate()

double TagParser::AbstractTrack::bitrate ( ) const
inline

Returns the average bitrate in kbit/s if known; otherwise returns zero.

Definition at line 475 of file abstracttrack.h.

◆ bitsPerSample()

std::uint16_t TagParser::AbstractTrack::bitsPerSample ( ) const
inline

Returns the number of bits per sample; otherwise returns 0.

Definition at line 543 of file abstracttrack.h.

◆ channelConfig()

std::uint8_t TagParser::AbstractTrack::channelConfig ( ) const
inline

Returns the channel configuration.

This is the MPEG-4 channel config for MPEG-4 audio.

See also
Mpeg4ChannelConfigs::channelConfigString()

Definition at line 564 of file abstracttrack.h.

◆ channelConfigString()

std::string_view TagParser::AbstractTrack::channelConfigString ( ) const

Returns a string with the channel configuration if available; otherwise returns nullptr.

Definition at line 91 of file abstracttrack.cpp.

◆ channelCount()

std::uint16_t TagParser::AbstractTrack::channelCount ( ) const
inline

Returns the number of channels if known; otherwise returns 0.

This value only makes sense for audio tracks.

Definition at line 553 of file abstracttrack.h.

◆ chromaFormat()

std::string_view TagParser::AbstractTrack::chromaFormat ( ) const
inline

Returns the chroma subsampling format if known; otherwise returns nullptr.

This value only makes sense for video tracks.

Definition at line 657 of file abstracttrack.h.

◆ colorSpace()

std::uint32_t TagParser::AbstractTrack::colorSpace ( ) const
inline

Returns the color space if known; otherwise returns 0.

Definition at line 760 of file abstracttrack.h.

◆ compressorName()

const std::string & TagParser::AbstractTrack::compressorName ( ) const
inline

Returns the compressor name if known; otherwise returns an empty string.

Definition at line 620 of file abstracttrack.h.

◆ creationTime()

const CppUtilities::DateTime & TagParser::AbstractTrack::creationTime ( ) const
inline

Returns the creation time if known; otherwise returns a DateTime of zero ticks.

Definition at line 491 of file abstracttrack.h.

◆ cropping()

const Margin & TagParser::AbstractTrack::cropping ( ) const
inline

Returns the cropping if known; otherwise returns zero margins.

Definition at line 768 of file abstracttrack.h.

◆ depth()

std::uint16_t TagParser::AbstractTrack::depth ( ) const
inline

Returns the bit depth if known; otherwise returns 0.

Definition at line 637 of file abstracttrack.h.

◆ description()

string TagParser::AbstractTrack::description ( ) const

Returns a description about the track.

The description contains the abbreviated format and further information depending on the media type (eg. display size in case of video, language in case of audio/text). It is intended to be joined with descriptions of other tracks to get a short technical description about the file.

Examples (exact format might change in the future!):

Definition at line 212 of file abstracttrack.cpp.

◆ displaySize()

const Size & TagParser::AbstractTrack::displaySize ( ) const
inline

Returns the size of the video frames to display if known; otherwise returns a zero size.

This value only makes sense for video tracks.

Definition at line 602 of file abstracttrack.h.

◆ duration()

const CppUtilities::TimeSpan & TagParser::AbstractTrack::duration ( ) const
inline

Returns the duration if known; otherwise returns a TimeSpan of zero ticks.

Definition at line 467 of file abstracttrack.h.

◆ extensionChannelConfig()

std::uint8_t TagParser::AbstractTrack::extensionChannelConfig ( ) const

Returns the extension channel configuration if available; otherwise returns nullptr.

Definition at line 107 of file abstracttrack.cpp.

◆ extensionChannelConfigString()

std::string_view TagParser::AbstractTrack::extensionChannelConfigString ( ) const

Returns a string with the extension channel configuration if available; otherwise returns nullptr.

Definition at line 115 of file abstracttrack.cpp.

◆ extensionSamplingFrequency()

std::uint32_t TagParser::AbstractTrack::extensionSamplingFrequency ( ) const
inline

Returns the number of samples per second if known; otherwise returns 0.

Remarks
This sample rate value takes extensions like SBR into account.

Definition at line 535 of file abstracttrack.h.

◆ flags()

TrackFlags TagParser::AbstractTrack::flags ( ) const
inline

Returns flags (various boolean properties) of this track.

See also
TrackFlags

Definition at line 325 of file abstracttrack.h.

◆ format()

MediaFormat TagParser::AbstractTrack::format ( ) const
inline

Returns the format of the track if known; otherwise returns MediaFormat::Unknown.

Definition at line 333 of file abstracttrack.h.

◆ formatAbbreviation()

std::string_view TagParser::AbstractTrack::formatAbbreviation ( ) const
inline

Returns the a more or less common abbreviation for the format of the track if known; otherwise returns an empty string.

Definition at line 361 of file abstracttrack.h.

◆ formatId()

const std::string & TagParser::AbstractTrack::formatId ( ) const
inline

Returns the format/codec ID.

This is usually the raw format identifier extracted from the container) if known; otherwise returns an empty string.

Definition at line 371 of file abstracttrack.h.

◆ formatName()

std::string_view TagParser::AbstractTrack::formatName ( ) const
inline

Returns the format of the track as C-style string if known; otherwise returns the format abbreviation or an empty string.

Remarks
  • The string might get invalidated when the track is (re)parsed.

Definition at line 352 of file abstracttrack.h.

◆ fps()

std::uint32_t TagParser::AbstractTrack::fps ( ) const
inline

Returns the number of frames per second if known; otherwise returns 0.

This value only makes sense for video tracks.

Definition at line 647 of file abstracttrack.h.

◆ hasLacing()

bool TagParser::AbstractTrack::hasLacing ( ) const
inline

Returns true if the track has lacing; otherwise returns false.

Definition at line 744 of file abstracttrack.h.

◆ id()

std::uint64_t TagParser::AbstractTrack::id ( ) const
inline

Returns the track ID if known; otherwise returns 0.

Definition at line 433 of file abstracttrack.h.

◆ inputStream()

std::istream & TagParser::AbstractTrack::inputStream ( )
inline

Returns the associated input stream.

Definition at line 248 of file abstracttrack.h.

◆ internalParseHeader()

TagParser::AbstractTrack::internalParseHeader ( Diagnostics diag,
AbortableProgressFeedback progress 
)
protectedpure virtual

This method is internally called to parse header information.

It needs to be implemented when subclassing this class.

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

Implemented in TagParser::AdtsStream, TagParser::FlacStream, TagParser::IvfStream, TagParser::MatroskaTrack, TagParser::Mp4Track, TagParser::MpegAudioFrameStream, TagParser::OggStream, and TagParser::WaveAudioStream.

◆ isDefault()

bool TagParser::AbstractTrack::isDefault ( ) const
inline

Returns true if the track is marked as default; otherwise returns false.

Definition at line 710 of file abstracttrack.h.

◆ isEnabled()

bool TagParser::AbstractTrack::isEnabled ( ) const
inline

Returns true if the track is marked as enabled; otherwise returns false.

Definition at line 693 of file abstracttrack.h.

◆ isEncrypted()

bool TagParser::AbstractTrack::isEncrypted ( ) const
inline

Returns true if the track is marked as encrypted; otherwise returns false.

Definition at line 752 of file abstracttrack.h.

◆ isForced()

bool TagParser::AbstractTrack::isForced ( ) const
inline

Returns true if the track is marked as forced; otherwise returns false.

Definition at line 727 of file abstracttrack.h.

◆ isHeaderValid()

bool TagParser::AbstractTrack::isHeaderValid ( ) const
inline

Returns an indication whether the track header is valid.

Definition at line 776 of file abstracttrack.h.

◆ isInterlaced()

bool TagParser::AbstractTrack::isInterlaced ( ) const
inline

Returns true if the video is interlaced; otherwise returns false.

This value only makes sense for video tracks.

Definition at line 675 of file abstracttrack.h.

◆ label()

string TagParser::AbstractTrack::label ( ) const

Returns a label for the track.

The label contains the ID, type, name and language of the track. It is intended to be used in a menu for selecting a track from the file.

Definition at line 131 of file abstracttrack.cpp.

◆ locale()

const Locale & TagParser::AbstractTrack::locale ( ) const
inline

Returns the locale of the track if known; otherwise returns an empty locale.

The format of the locale depends on the particular format/implementation.

Definition at line 509 of file abstracttrack.h.

◆ maxBitrate()

double TagParser::AbstractTrack::maxBitrate ( ) const
inline

Returns the maximum bitrate in kbit/s if known; otherwise returns zero.

Definition at line 483 of file abstracttrack.h.

◆ mediaType()

MediaType TagParser::AbstractTrack::mediaType ( ) const
inline

Returns the media type if known; otherwise returns MediaType::Other.

Definition at line 379 of file abstracttrack.h.

◆ mediaTypeName()

std::string_view TagParser::AbstractTrack::mediaTypeName ( ) const
inline

Returns the string representation of the media type of the track.

Definition at line 387 of file abstracttrack.h.

◆ modificationTime()

const CppUtilities::DateTime & TagParser::AbstractTrack::modificationTime ( ) const
inline

Returns the time of the last modification if known; otherwise returns a DateTime of zero ticks.

Definition at line 499 of file abstracttrack.h.

◆ name()

const std::string TagParser::AbstractTrack::name ( ) const
inline

Returns the track name if known; otherwise returns an empty string.

Definition at line 450 of file abstracttrack.h.

◆ outputStream()

std::ostream & TagParser::AbstractTrack::outputStream ( )
inline

Returns the associated output stream.

Definition at line 267 of file abstracttrack.h.

◆ parseHeader()

void TagParser::AbstractTrack::parseHeader ( Diagnostics diag,
AbortableProgressFeedback progress 
)

Parses technical information about the track from the header.

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

The parsed information can be accessed using the corresponding methods.

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

Definition at line 243 of file abstracttrack.cpp.

◆ pixelAspectRatio()

const AspectRatio & TagParser::AbstractTrack::pixelAspectRatio ( ) const
inline

Returns the pixel aspect ratio (PAR).

Definition at line 665 of file abstracttrack.h.

◆ pixelSize()

const Size & TagParser::AbstractTrack::pixelSize ( ) const
inline

Returns the size of the encoded video frames if known; otherwise returns a zero size.

This value only makes sense for video tracks.

Definition at line 592 of file abstracttrack.h.

◆ quality()

int TagParser::AbstractTrack::quality ( ) const
inline

Returns the quality if known; otherwise returns 0.

The scale depends on the format.

Definition at line 582 of file abstracttrack.h.

◆ reader()

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

Returns a binary reader for the associated stream.

Remarks
The returned reader is internally used when reading binary data from the associated stream. Do not change its byte order.

Definition at line 289 of file abstracttrack.h.

◆ resolution()

const Size & TagParser::AbstractTrack::resolution ( ) const
inline

Returns the resolution if known; otherwise returns a zero size.

This value only makes sense for video tracks.

Definition at line 612 of file abstracttrack.h.

◆ sampleCount()

std::uint64_t TagParser::AbstractTrack::sampleCount ( ) const
inline

Returns the number of samples/frames if known; otherwise returns 0.

Definition at line 572 of file abstracttrack.h.

◆ samplingFrequency()

std::uint32_t TagParser::AbstractTrack::samplingFrequency ( ) const
inline

Returns the number of samples per second if known; otherwise returns 0.

Definition at line 526 of file abstracttrack.h.

◆ setCompressorName()

void TagParser::AbstractTrack::setCompressorName ( std::string_view  compressorName)
inline

Returns the compressor name if known; otherwise returns an empty string.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 629 of file abstracttrack.h.

◆ setDefault()

void TagParser::AbstractTrack::setDefault ( bool  isDefault)
inline

Sets whether the track is a default track.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 719 of file abstracttrack.h.

◆ setEnabled()

void TagParser::AbstractTrack::setEnabled ( bool  enabled)
inline

Sets whether the track is enabled.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 702 of file abstracttrack.h.

◆ setForced()

void TagParser::AbstractTrack::setForced ( bool  forced)
inline

Sets whether the track is forced.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 736 of file abstracttrack.h.

◆ setId()

void TagParser::AbstractTrack::setId ( std::uint64_t  id)
inline

Sets the track ID.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 442 of file abstracttrack.h.

◆ setInputStream()

void TagParser::AbstractTrack::setInputStream ( std::istream &  stream)
inline

Assigns another input stream.

The track will read from the stream to perform particular operations such as reading header information.

Definition at line 259 of file abstracttrack.h.

◆ setLocale()

void TagParser::AbstractTrack::setLocale ( const Locale locale)
inline

Sets the locale of the track.

Remarks
Whether the new value is applied when saving changes depends on the format/implementation.

Definition at line 518 of file abstracttrack.h.

◆ setName()

void TagParser::AbstractTrack::setName ( std::string_view  name)
inline

Sets the name.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 459 of file abstracttrack.h.

◆ setOutputStream()

void TagParser::AbstractTrack::setOutputStream ( std::ostream &  stream)
inline

Assigns another output stream.

The track will write to the stream to perform particular operations such as updating or making header information.

Definition at line 278 of file abstracttrack.h.

◆ setSize()

void TagParser::AbstractTrack::setSize ( std::uint64_t  size)
inline

Sets the size in bytes.

Remarks
This is used by MediaFileInfo to set the track size for certain types of tracks before invoking the parsing. If you use this a class derived from AbstractTrack directly you may want to do the same if not the entire input stream is supposed to be considered part of the track and the parser would otherwise assume that (like the parser of MpegAudioFrameStream might do).

Definition at line 408 of file abstracttrack.h.

◆ setTrackNumber()

void TagParser::AbstractTrack::setTrackNumber ( std::uint32_t  trackNumber)
inline

Sets the track number.

Remarks
Whether the new value is applied when saving changes depends on the implementation.

Definition at line 425 of file abstracttrack.h.

◆ shortDescription()

string TagParser::AbstractTrack::shortDescription ( ) const

Returns a short description about the track.

See description() for details.

Examples (exact format might change in the future!):

  • H.264-720p
  • HE-AAC-6ch-eng

Definition at line 226 of file abstracttrack.cpp.

◆ size()

std::uint64_t TagParser::AbstractTrack::size ( ) const
inline

Returns the size in bytes if known; otherwise returns 0.

Definition at line 395 of file abstracttrack.h.

◆ startOffset()

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

Returns the start offset of the track in the associated stream.

Definition at line 316 of file abstracttrack.h.

◆ timeScale()

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

Returns the time scale if known; otherwise returns 0.

The time scale depends on the format.

Definition at line 685 of file abstracttrack.h.

◆ trackNumber()

std::uint32_t TagParser::AbstractTrack::trackNumber ( ) const
inline

Returns the track number if known; otherwise returns 0.

Definition at line 416 of file abstracttrack.h.

◆ type()

TrackType TagParser::AbstractTrack::type ( ) const
inlinevirtual

◆ version()

double TagParser::AbstractTrack::version ( ) const
inline

Returns the version/level of the track if known; otherwise returns 0.

Definition at line 341 of file abstracttrack.h.

◆ writer()

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

Returns a binary writer for the associated stream.

Remarks
The returned writer is internally used when writing binary data to the associated stream. Do not change its byte order.

Definition at line 300 of file abstracttrack.h.

Friends And Related Symbol Documentation

◆ Mp4Track

friend class Mp4Track
friend

Definition at line 113 of file abstracttrack.h.

◆ MpegAudioFrameStream

friend class MpegAudioFrameStream
friend

Definition at line 111 of file abstracttrack.h.

◆ WaveAudioStream

friend class WaveAudioStream
friend

Definition at line 112 of file abstracttrack.h.

Member Data Documentation

◆ m_alphaMode

AlphaMode TagParser::AbstractTrack::m_alphaMode
protected

Definition at line 236 of file abstracttrack.h.

◆ m_aspectRatioType

AspectRatioType TagParser::AbstractTrack::m_aspectRatioType
protected

Definition at line 238 of file abstracttrack.h.

◆ m_bitrate

double TagParser::AbstractTrack::m_bitrate
protected

Definition at line 208 of file abstracttrack.h.

◆ m_bitsPerSample

std::uint16_t TagParser::AbstractTrack::m_bitsPerSample
protected

Definition at line 215 of file abstracttrack.h.

◆ m_bytesPerSecond

std::uint32_t TagParser::AbstractTrack::m_bytesPerSecond
protected

Definition at line 216 of file abstracttrack.h.

◆ m_channelConfig

std::uint8_t TagParser::AbstractTrack::m_channelConfig
protected

Definition at line 218 of file abstracttrack.h.

◆ m_channelCount

std::uint16_t TagParser::AbstractTrack::m_channelCount
protected

Definition at line 217 of file abstracttrack.h.

◆ m_chromaFormat

std::string_view TagParser::AbstractTrack::m_chromaFormat
protected

Definition at line 229 of file abstracttrack.h.

◆ m_chunkSize

std::uint16_t TagParser::AbstractTrack::m_chunkSize
protected

Definition at line 220 of file abstracttrack.h.

◆ m_colorSpace

std::uint32_t TagParser::AbstractTrack::m_colorSpace
protected

Definition at line 232 of file abstracttrack.h.

◆ m_compressorName

std::string TagParser::AbstractTrack::m_compressorName
protected

Definition at line 226 of file abstracttrack.h.

◆ m_creationTime

CppUtilities::DateTime TagParser::AbstractTrack::m_creationTime
protected

Definition at line 210 of file abstracttrack.h.

◆ m_cropping

Margin TagParser::AbstractTrack::m_cropping
protected

Definition at line 233 of file abstracttrack.h.

◆ m_depth

std::uint16_t TagParser::AbstractTrack::m_depth
protected

Definition at line 227 of file abstracttrack.h.

◆ m_displaySize

Size TagParser::AbstractTrack::m_displaySize
protected

Definition at line 224 of file abstracttrack.h.

◆ m_displayUnit

DisplayUnit TagParser::AbstractTrack::m_displayUnit
protected

Definition at line 237 of file abstracttrack.h.

◆ m_duration

CppUtilities::TimeSpan TagParser::AbstractTrack::m_duration
protected

Definition at line 207 of file abstracttrack.h.

◆ m_extensionChannelConfig

std::uint8_t TagParser::AbstractTrack::m_extensionChannelConfig
protected

Definition at line 219 of file abstracttrack.h.

◆ m_extensionSamplingFrequency

std::uint32_t TagParser::AbstractTrack::m_extensionSamplingFrequency
protected

Definition at line 214 of file abstracttrack.h.

◆ m_fieldOrder

FieldOrder TagParser::AbstractTrack::m_fieldOrder
protected

Definition at line 234 of file abstracttrack.h.

◆ m_flags

TrackFlags TagParser::AbstractTrack::m_flags
protected

Definition at line 197 of file abstracttrack.h.

◆ m_format

MediaFormat TagParser::AbstractTrack::m_format
protected

Definition at line 198 of file abstracttrack.h.

◆ m_formatId

std::string TagParser::AbstractTrack::m_formatId
protected

Definition at line 199 of file abstracttrack.h.

◆ m_formatName

std::string TagParser::AbstractTrack::m_formatName
protected

Definition at line 200 of file abstracttrack.h.

◆ m_fps

std::uint32_t TagParser::AbstractTrack::m_fps
protected

Definition at line 228 of file abstracttrack.h.

◆ m_id

std::uint64_t TagParser::AbstractTrack::m_id
protected

Definition at line 205 of file abstracttrack.h.

◆ m_istream

std::istream* TagParser::AbstractTrack::m_istream
protected

Definition at line 192 of file abstracttrack.h.

◆ m_locale

Locale TagParser::AbstractTrack::m_locale
protected

Definition at line 212 of file abstracttrack.h.

◆ m_maxBitrate

double TagParser::AbstractTrack::m_maxBitrate
protected

Definition at line 209 of file abstracttrack.h.

◆ m_mediaType

MediaType TagParser::AbstractTrack::m_mediaType
protected

Definition at line 201 of file abstracttrack.h.

◆ m_modificationTime

CppUtilities::DateTime TagParser::AbstractTrack::m_modificationTime
protected

Definition at line 211 of file abstracttrack.h.

◆ m_name

std::string TagParser::AbstractTrack::m_name
protected

Definition at line 206 of file abstracttrack.h.

◆ m_ostream

std::ostream* TagParser::AbstractTrack::m_ostream
protected

Definition at line 193 of file abstracttrack.h.

◆ m_p

std::unique_ptr<AbstractTrackPrivate> TagParser::AbstractTrack::m_p
protected

Definition at line 239 of file abstracttrack.h.

◆ m_pixelAspectRatio

AspectRatio TagParser::AbstractTrack::m_pixelAspectRatio
protected

Definition at line 230 of file abstracttrack.h.

◆ m_pixelSize

Size TagParser::AbstractTrack::m_pixelSize
protected

Definition at line 223 of file abstracttrack.h.

◆ m_quality

int TagParser::AbstractTrack::m_quality
protected

Definition at line 222 of file abstracttrack.h.

◆ m_reader

CppUtilities::BinaryReader TagParser::AbstractTrack::m_reader
protected

Definition at line 194 of file abstracttrack.h.

◆ m_resolution

Size TagParser::AbstractTrack::m_resolution
protected

Definition at line 225 of file abstracttrack.h.

◆ m_sampleCount

std::uint64_t TagParser::AbstractTrack::m_sampleCount
protected

Definition at line 221 of file abstracttrack.h.

◆ m_samplingFrequency

std::uint32_t TagParser::AbstractTrack::m_samplingFrequency
protected

Definition at line 213 of file abstracttrack.h.

◆ m_size

std::uint64_t TagParser::AbstractTrack::m_size
protected

Definition at line 203 of file abstracttrack.h.

◆ m_startOffset

std::uint64_t TagParser::AbstractTrack::m_startOffset
protected

Definition at line 196 of file abstracttrack.h.

◆ m_stereoMode

StereoMode TagParser::AbstractTrack::m_stereoMode
protected

Definition at line 235 of file abstracttrack.h.

◆ m_timeScale

std::uint32_t TagParser::AbstractTrack::m_timeScale
protected

Definition at line 231 of file abstracttrack.h.

◆ m_trackNumber

std::uint32_t TagParser::AbstractTrack::m_trackNumber
protected

Definition at line 204 of file abstracttrack.h.

◆ m_version

double TagParser::AbstractTrack::m_version
protected

Definition at line 202 of file abstracttrack.h.

◆ m_writer

CppUtilities::BinaryWriter TagParser::AbstractTrack::m_writer
protected

Definition at line 195 of file abstracttrack.h.


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