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

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

#include <opusidentificationheader.h>

Public Member Functions

 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...
 
byte version () const
 Returns the version (which should be 1 currently). More...
 
byte channels () const
 Returns the number of channels for the Opus stream. More...
 
uint16 preSkip () const
 Returns "pre-skip" value for the Opus stream. More...
 
uint32 sampleRate () const
 Returns the INPUT sample rate. More...
 
uint16 outputGain () const
 Returns the output gain. More...
 
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()

Media::OpusIdentificationHeader::OpusIdentificationHeader ( )
inline

Constructs a new Opus identification header.

Definition at line 38 of file opusidentificationheader.h.

Member Function Documentation

◆ channelMap()

byte Media::OpusIdentificationHeader::channelMap ( ) const
inline

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 102 of file opusidentificationheader.h.

◆ channels()

byte Media::OpusIdentificationHeader::channels ( ) const
inline

Returns the number of channels for the Opus stream.

Definition at line 57 of file opusidentificationheader.h.

◆ outputGain()

uint16 Media::OpusIdentificationHeader::outputGain ( ) const
inline

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 90 of file opusidentificationheader.h.

◆ parseHeader()

void Media::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()

uint16 Media::OpusIdentificationHeader::preSkip ( ) const
inline

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 69 of file opusidentificationheader.h.

◆ sampleRate()

uint32 Media::OpusIdentificationHeader::sampleRate ( ) const
inline

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 79 of file opusidentificationheader.h.

◆ version()

byte Media::OpusIdentificationHeader::version ( ) const
inline

Returns the version (which should be 1 currently).

Definition at line 49 of file opusidentificationheader.h.


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