Tag Parser  10.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | Public Attributes | List of all members
TagParser::MediaFormat Class Reference

The MediaFormat class specifies the format of media data. More...

#include <mediaformat.h>

Public Member Functions

constexpr MediaFormat (GeneralMediaFormat general=GeneralMediaFormat::Unknown, unsigned char sub=0, unsigned char extension=0)
 Constructs a new media format. More...
 
std::string_view name () const
 Returns the name of the media format as C-style string. More...
 
std::string_view abbreviation () const
 Returns the abbreviation of the media format as C-style string. More...
 
std::string_view shortAbbreviation () const
 Returns a short abbreviation of the media format as C-style string. More...
 
std::string_view extensionName () const
 Returns the abbreviation of the media format as C-style string. More...
 
constexpr operator bool () const
 Returns whether the media format is known. More...
 
constexpr MediaFormatoperator+= (const MediaFormat &other)
 "Adds" information from another instance to the object. More...
 
constexpr bool operator== (GeneralMediaFormat general) const
 Returns whether the media format is the specified general media format. More...
 
constexpr bool operator!= (GeneralMediaFormat general) const
 Returns whether the media format is not the specified general media format. More...
 

Public Attributes

GeneralMediaFormat general
 
unsigned char sub
 
unsigned char extension
 

Detailed Description

The MediaFormat class specifies the format of media data.

Definition at line 246 of file mediaformat.h.

Constructor & Destructor Documentation

◆ MediaFormat()

constexpr TagParser::MediaFormat::MediaFormat ( GeneralMediaFormat  general = GeneralMediaFormat::Unknown,
unsigned char  sub = 0,
unsigned char  extension = 0 
)
constexpr

Constructs a new media format.

Definition at line 267 of file mediaformat.h.

Member Function Documentation

◆ abbreviation()

std::string_view TagParser::MediaFormat::abbreviation ( ) const

Returns the abbreviation of the media format as C-style string.

Returns an empty string if no abbreviation is available.

Definition at line 446 of file mediaformat.cpp.

◆ extensionName()

std::string_view TagParser::MediaFormat::extensionName ( ) const

Returns the abbreviation of the media format as C-style string.

Returns an empty string if no abbreviation is available.

Definition at line 1036 of file mediaformat.cpp.

◆ name()

std::string_view TagParser::MediaFormat::name ( ) const

Returns the name of the media format as C-style string.

Returns an empty string if no name is available.

Definition at line 17 of file mediaformat.cpp.

◆ operator bool()

constexpr TagParser::MediaFormat::operator bool ( ) const
constexpr

Returns whether the media format is known.

Definition at line 310 of file mediaformat.h.

◆ operator!=()

constexpr bool TagParser::MediaFormat::operator!= ( GeneralMediaFormat  general) const
constexpr

Returns whether the media format is not the specified general media format.

Definition at line 302 of file mediaformat.h.

◆ operator+=()

constexpr MediaFormat & TagParser::MediaFormat::operator+= ( const MediaFormat other)
constexpr

"Adds" information from another instance to the object.

Definition at line 277 of file mediaformat.h.

◆ operator==()

constexpr bool TagParser::MediaFormat::operator== ( GeneralMediaFormat  general) const
constexpr

Returns whether the media format is the specified general media format.

Definition at line 294 of file mediaformat.h.

◆ shortAbbreviation()

std::string_view TagParser::MediaFormat::shortAbbreviation ( ) const

Returns a short abbreviation of the media format as C-style string.

Returns an empty string if no abbreviation is available.

Definition at line 761 of file mediaformat.cpp.

Member Data Documentation

◆ extension

unsigned char TagParser::MediaFormat::extension

Definition at line 261 of file mediaformat.h.

◆ general

GeneralMediaFormat TagParser::MediaFormat::general

Definition at line 259 of file mediaformat.h.

◆ sub

unsigned char TagParser::MediaFormat::sub

Definition at line 260 of file mediaformat.h.


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