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::OpusIdentificationHeader Class Reference

The OpusIdentificationHeader class is an Opus identification header parser. More...

#include <opusidentificationheader.h>

Public Member Functions

constexpr OpusIdentificationHeader ()
 Constructs a new Opus identification header.
 
void parseHeader (OggIterator &iterator)
 Parses the Opus identification header which is read using the specified iterator.
 
constexpr std::uint8_t version () const
 Returns the version (which should be 1 currently).
 
constexpr std::uint8_t channels () const
 Returns the number of channels for the Opus stream.
 
constexpr std::uint16_t preSkip () const
 Returns "pre-skip" value for the Opus stream.
 
constexpr std::uint32_t sampleRate () const
 Returns the INPUT sample rate.
 
constexpr std::uint16_t outputGain () const
 Returns the output gain.
 
constexpr std::uint8_t channelMap () const
 Returns the channel mapping family.
 

Detailed Description

The OpusIdentificationHeader class is an Opus identification header parser.

See also
https://wiki.xiph.org/OggOpus

Constructor & Destructor Documentation

◆ OpusIdentificationHeader()

TagParser::OpusIdentificationHeader::OpusIdentificationHeader ( )
constexpr

Constructs a new Opus identification header.

Definition at line 37 of file opusidentificationheader.h.

Member Function Documentation

◆ channelMap()

std::uint8_t TagParser::OpusIdentificationHeader::channelMap ( ) const
constexpr

Returns the channel mapping family.

The channel mapping family indicates the order and semantic meaning of the various channels encoded in each Opus packet.

See also
https://wiki.xiph.org/OggOpus

Definition at line 103 of file opusidentificationheader.h.

◆ channels()

std::uint8_t TagParser::OpusIdentificationHeader::channels ( ) const
constexpr

Returns the number of channels for the Opus stream.

Definition at line 58 of file opusidentificationheader.h.

◆ outputGain()

std::uint16_t TagParser::OpusIdentificationHeader::outputGain ( ) const
constexpr

Returns the output gain.

This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default.

Definition at line 91 of file opusidentificationheader.h.

◆ parseHeader()

void TagParser::OpusIdentificationHeader::parseHeader ( OggIterator & iterator)

Parses the Opus identification header which is read using the specified iterator.

Remarks
The header is assumed to start at the current position of iterator.

Definition at line 24 of file opusidentificationheader.cpp.

◆ preSkip()

std::uint16_t TagParser::OpusIdentificationHeader::preSkip ( ) const
constexpr

Returns "pre-skip" value for the Opus stream.

This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.

Definition at line 70 of file opusidentificationheader.h.

◆ sampleRate()

std::uint32_t TagParser::OpusIdentificationHeader::sampleRate ( ) const
constexpr

Returns the INPUT sample rate.

Remarks
This is not the sample rate to use for playback of the encoded data.
See also
https://wiki.xiph.org/OggOpus

Definition at line 80 of file opusidentificationheader.h.

◆ version()

std::uint8_t TagParser::OpusIdentificationHeader::version ( ) const
constexpr

Returns the version (which should be 1 currently).

Definition at line 50 of file opusidentificationheader.h.


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