32 AbstractTrack::AbstractTrack(istream &inputStream, ostream &outputStream, uint64 startOffset)
33 : m_istream(&inputStream)
34 , m_ostream(&outputStream)
35 , m_reader(BinaryReader(&inputStream))
36 , m_writer(BinaryWriter(&outputStream))
37 , m_startOffset(startOffset)
38 , m_headerValid(false)
47 , m_samplingFrequency(0)
48 , m_extensionSamplingFrequency(0)
53 , m_extensionChannelConfig(0)
58 , m_chromaFormat(nullptr)
66 , m_usedInPresentation(true)
67 , m_usedWhenPreviewing(true)
137 ss <<
"ID: " <<
id();
139 if (!
name().empty()) {
140 ss <<
", name: \"" <<
name() <<
"\"";
143 ss <<
", language: \"" <<
language() <<
"\"";
169 const char *additionalInfo =
nullptr;
193 if (additionalInfo) {
194 return argsToString(
format,
'-', additionalInfo);
const std::string & language() const
Returns the language of the track if known; otherwise returns an empty string.
virtual ~AbstractTrack()
Destroys the track.
const char * channelConfigString() const
Returns a string with the channel configuration if available; otherwise returns nullptr.
const std::string name() const
Returns the track name if known; otherwise returns an empty string.
byte m_extensionChannelConfig
const char * abbreviation() const
Returns an abbreviation for the current instance, eg.
virtual void internalParseHeader(Diagnostics &diag)=0
This method is internally called to parse header information.
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
AbstractTrack(std::istream &inputStream, std::ostream &outputStream, uint64 startOffset)
Constructs a new track.
Contains utility classes helping to read and write streams.
TAG_PARSER_EXPORT const char * mpegChannelModeString(MpegChannelMode channelMode)
Returns the string representation for the specified channelMode.
TAG_PARSER_EXPORT const char * channelConfigString(byte config)
Returns the string representation for the specified MPEG-4 channel config.
MediaFormat format() const
Returns the format of the track if known; otherwise returns MediaFormat::Unknown. ...
std::string description() const
Returns a short description about the track.
const Size & pixelSize() const
Returns the size of the encoded video frames if known; otherwise returns a zero size.
uint64 id() const
Returns the track ID if known; otherwise returns 0.
const char * extensionChannelConfigString() const
Returns a string with the extension channel configuration if available; otherwise returns nullptr...
const char * mediaTypeName() const
Returns the string representation of the media type of the track.
byte extensionChannelConfig() const
Returns the extension channel configuration if available; otherwise returns nullptr.
The AbstractTrack class parses and stores technical information about video, audio and other kinds of...
const Size & displaySize() const
Returns the size of the video frames to display if known; otherwise returns a zero size...
void parseHeader(Diagnostics &diag)
Parses technical information about the track from the header.
The class inherits from std::exception and serves as base class for exceptions thrown by the elements...
Contains all classes and functions of the TagInfo library.
The Diagnostics class is a container for DiagMessage.
uint16 channelCount() const
Returns the number of channels if known; otherwise returns 0.
std::string label() const
Returns a label for the track.