Shaka Packager SDK
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 (const uint8_t *data, size_t data_size, std::vector< uint8_t > *audio_frame) 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

◆ ConvertToADTS()

bool shaka::media::AACAudioSpecificConfig::ConvertToADTS ( const uint8_t *  data,
size_t  data_size,
std::vector< uint8_t > *  audio_frame 
) const
virtual

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

Parameters
datapoints to the raw AAC frame to be converted.
data_sizethe size of a raw AAC frame.
[out]audio_framecontains the converted frame if successful; it is untouched on failure.
Returns
true on success, false otherwise.

Definition at line 140 of file aac_audio_specific_config.cc.

◆ GetAudioObjectType()

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

Definition at line 172 of file aac_audio_specific_config.cc.

◆ GetNumChannels()

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

Definition at line 194 of file aac_audio_specific_config.cc.

◆ GetSamplesPerSecond()

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

Definition at line 180 of file aac_audio_specific_config.cc.

◆ Parse()

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 48 of file aac_audio_specific_config.cc.

◆ sbr_present()

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

Definition at line 112 of file aac_audio_specific_config.h.


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