100 return std::string_view();
121 return std::string_view();
134 ss <<
"ID: " <<
id();
136 if (!
name().empty()) {
137 ss <<
", name: \"" <<
name() <<
"\"";
139 if (
const auto &language =
locale().fullOrSomeAbbreviatedName(); !language.empty()) {
140 ss <<
", language: " << language <<
"";
146string AbstractTrack::makeDescription(
bool verbose)
const
157 auto additionalInfoRef = std::string_view();
158 auto level = std::string();
172 level =
"@L" + numberToString(
version());
182 if (
const auto &localeName =
locale().someAbbreviatedName(); !localeName.empty()) {
187 }
else if (
const auto &localeName =
locale().someAbbreviatedName(); !localeName.empty()) {
188 additionalInfoRef = localeName;
194 if (!additionalInfoRef.empty()) {
195 return argsToString(
formatName, level,
'-', additionalInfoRef);
214 return makeDescription(
true);
228 return makeDescription(
false);
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
std::uint64_t id() const
Returns the track ID if known; otherwise returns 0.
std::uint32_t m_colorSpace
std::string label() const
Returns a label for the track.
virtual void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress)=0
This method is internally called to parse header information.
std::uint8_t m_extensionChannelConfig
std::uint64_t m_sampleCount
std::uint64_t startOffset() const
Returns the start offset of the track in the associated stream.
const Locale & locale() const
Returns the locale of the track if known; otherwise returns an empty locale.
std::uint32_t m_bytesPerSecond
std::string_view extensionChannelConfigString() const
Returns a string with the extension channel configuration if available; otherwise returns nullptr.
AspectRatioType m_aspectRatioType
std::string_view formatName() const
Returns the format of the track as C-style string if known; otherwise returns the format abbreviation...
const Size & displaySize() const
Returns the size of the video frames to display if known; otherwise returns a zero size.
double version() const
Returns the version/level of the track if known; otherwise returns 0.
const Size & pixelSize() const
Returns the size of the encoded video frames if known; otherwise returns a zero size.
std::uint16_t m_bitsPerSample
std::uint8_t extensionChannelConfig() const
Returns the extension channel configuration if available; otherwise returns nullptr.
std::uint32_t m_trackNumber
std::istream & inputStream()
Returns the associated input stream.
AbstractTrack(std::istream &inputStream, std::ostream &outputStream, std::uint64_t startOffset)
Constructs a new track.
std::uint16_t m_channelCount
std::uint8_t m_channelConfig
CppUtilities::BinaryReader m_reader
std::string shortDescription() const
Returns a short description about the track.
std::string_view mediaTypeName() const
Returns the string representation of the media type of the track.
std::uint64_t m_startOffset
void parseHeader(Diagnostics &diag, AbortableProgressFeedback &progress)
Parses technical information about the track from the header.
std::uint32_t m_timeScale
CppUtilities::BinaryWriter m_writer
std::uint16_t channelCount() const
Returns the number of channels if known; otherwise returns 0.
std::ostream & outputStream()
Returns the associated output stream.
std::uint32_t m_extensionSamplingFrequency
std::string_view 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.
std::uint32_t m_samplingFrequency
std::string description() const
Returns a description about the track.
DisplayUnit m_displayUnit
MediaFormat format() const
Returns the format of the track if known; otherwise returns MediaFormat::Unknown.
virtual ~AbstractTrack()
Destroys the track.
The Diagnostics class is a container for DiagMessage.
The class inherits from std::exception and serves as base class for exceptions thrown by the elements...
std::string_view abbreviation() const
Returns an abbreviation for the current instance, eg.
TAG_PARSER_EXPORT std::string_view channelConfigString(std::uint8_t config)
Returns the string representation for the specified MPEG-4 channel config.
Contains all classes and functions of the TagInfo library.
AspectRatioType
The AspectRatioType enum specifies the possible modifications to the aspect ratio.
TAG_PARSER_EXPORT std::string_view mpegChannelModeString(MpegChannelMode channelMode)
Returns the string representation for the specified channelMode.
StereoMode
The StereoMode enum specifies the Stereo-3D video mode.
DisplayUnit
The DisplayUnit enum specifies how display width and heigh are interpreted.
AlphaMode
The AlphaMode enum specifies the alpha video mode.
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
FieldOrder
The FieldOrder enum declares the field ordering of the video.
MpegChannelMode
Specifies the channel mode.
TrackFlags
The TrackFlags enum specifies miscellaneous boolean properties of a track.
The AbstractTrackPrivate struct contains private fields of the AbstractTrack class.