Tag Parser  8.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
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. More...
 
void parseHeader (OggIterator &iterator)
 Parses the Opus identification header which is read using the specified iterator. More...
 
constexpr byte version () const
 Returns the version (which should be 1 currently). More...
 
constexpr byte channels () const
 Returns the number of channels for the Opus stream. More...
 
constexpr uint16 preSkip () const
 Returns "pre-skip" value for the Opus stream. More...
 
constexpr uint32 sampleRate () const
 Returns the INPUT sample rate. More...
 
constexpr uint16 outputGain () const
 Returns the output gain. More...
 
constexpr byte channelMap () const
 Returns the channel mapping family. More...
 

Detailed Description

The OpusIdentificationHeader class is an Opus identification header parser.

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

Definition at line 12 of file opusidentificationheader.h.

Constructor & Destructor Documentation

◆ OpusIdentificationHeader()

constexpr TagParser::OpusIdentificationHeader::OpusIdentificationHeader ( )

Constructs a new Opus identification header.

Definition at line 37 of file opusidentificationheader.h.

Member Function Documentation

◆ channelMap()

constexpr byte TagParser::OpusIdentificationHeader::channelMap ( ) const

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()

constexpr byte TagParser::OpusIdentificationHeader::channels ( ) const

Returns the number of channels for the Opus stream.

Definition at line 58 of file opusidentificationheader.h.

◆ outputGain()

constexpr uint16 TagParser::OpusIdentificationHeader::outputGain ( ) const

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()

constexpr uint16 TagParser::OpusIdentificationHeader::preSkip ( ) const

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()

constexpr uint32 TagParser::OpusIdentificationHeader::sampleRate ( ) const

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()

constexpr byte TagParser::OpusIdentificationHeader::version ( ) const

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: