Shaka Packager SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Static Public Attributes | List of all members
shaka::media::AACAudioSpecificConfig Class Reference

#include <aac_audio_specific_config.h>

Public Types

enum  AudioObjectType {
  AOT_NULL = 0, AOT_AAC_MAIN = 1, AOT_AAC_LC = 2, AOT_AAC_SSR = 3,
  AOT_AAC_LTP = 4, AOT_SBR = 5, AOT_AAC_SCALABLE = 6, AOT_TWINVQ = 7,
  AOT_CELP = 8, AOT_HVXC = 9, AOT_TTSI = 12, AOT_MAINSYNTH = 13,
  AOT_WAVESYNTH = 14, AOT_MIDI = 15, AOT_SAFX = 16, AOT_ER_AAC_LC = 17,
  AOT_ER_AAC_LTP = 19, AOT_ER_AAC_SCALABLE = 20, AOT_ER_TWINVQ = 21, AOT_ER_BSAC = 22,
  AOT_ER_AAC_LD = 23, AOT_ER_CELP = 24, AOT_ER_HVXC = 25, AOT_ER_HILN = 26,
  AOT_ER_PARAM = 27, AOT_SSC = 28, AOT_PS = 29, AOT_SURROUND = 30,
  AOT_ESCAPE = 31, AOT_L1 = 32, AOT_L2 = 33, AOT_L3 = 34,
  AOT_DST = 35, AOT_ALS = 36, AOT_SLS = 37, AOT_SLS_NON_CORE = 38,
  AOT_ER_AAC_ELD = 39, AOT_SMR_SIMPLE = 40, AOT_SMR_MAIN = 41, AOT_USAC_NOSBR = 42,
  AOT_SAOC = 43, AOT_LD_SURROUND = 44, AOT_USAC = 45
}
 

Public Member Functions

virtual bool Parse (const std::vector< uint8_t > &data)
 
virtual bool ConvertToADTS (std::vector< uint8_t > *buffer) const
 
AudioObjectType GetAudioObjectType () const
 
uint32_t GetSamplesPerSecond () const
 
uint8_t GetNumChannels () const
 
bool sbr_present () const
 
void set_sbr_present (bool sbr_present)
 Indicate whether SBR is present in the stream.
 

Static Public Attributes

static const size_t kADTSHeaderSize = 7
 Size in bytes of the ADTS header added by ConvertEsdsToADTS().
 

Detailed Description

This class parses the AAC information from decoder specific information embedded in the esds box in an ISO BMFF file. Please refer to ISO 14496 Part 3 Table 1.13 - Syntax of AudioSpecificConfig for more details.

Definition at line 23 of file aac_audio_specific_config.h.

Member Function Documentation

bool shaka::media::AACAudioSpecificConfig::ConvertToADTS ( std::vector< uint8_t > *  buffer) const
virtual

Convert a raw AAC frame into an AAC frame with an ADTS header.

Parameters
[in,out]buffercontains the raw AAC frame on input, and the converted frame on output if successful; it is untouched on failure.
Returns
true on success, false otherwise.

Definition at line 124 of file aac_audio_specific_config.cc.

AACAudioSpecificConfig::AudioObjectType shaka::media::AACAudioSpecificConfig::GetAudioObjectType ( ) const
Returns
The audio object type for this AAC config, with possible extension considered.

Definition at line 150 of file aac_audio_specific_config.cc.

uint8_t shaka::media::AACAudioSpecificConfig::GetNumChannels ( ) const
Returns
Number of channels for the AAC stream, with possible extensions considered.

Definition at line 172 of file aac_audio_specific_config.cc.

uint32_t shaka::media::AACAudioSpecificConfig::GetSamplesPerSecond ( ) const
Returns
Sample rate for the AAC stream, with possible extensions considered.

Definition at line 158 of file aac_audio_specific_config.cc.

bool shaka::media::AACAudioSpecificConfig::Parse ( const std::vector< uint8_t > &  data)
virtual

Parse the AAC config from decoder specific information embedded in an esds box. The function will parse the data and get the ElementaryStreamDescriptor, then it will parse the ElementaryStreamDescriptor to get audio stream configurations.

Parameters
datacontains decoder specific information from an esds box.
Returns
true if successful, false otherwise.

Definition at line 32 of file aac_audio_specific_config.cc.

bool shaka::media::AACAudioSpecificConfig::sbr_present ( ) const
inline
Returns
whether Spectral Band Repliation (SBR) is present in the stream.

Definition at line 109 of file aac_audio_specific_config.h.


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