DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Attributes | List of all members
shaka::media::AACAudioSpecificConfig Class Reference

#include <aac_audio_specific_config.h>

Public Member Functions

virtual bool Parse (const std::vector< uint8_t > &data)
 
virtual bool ConvertToADTS (std::vector< uint8_t > *buffer) const
 
uint32_t GetOutputSamplesPerSecond (bool sbr_in_mimetype) const
 
uint8_t GetNumChannels (bool sbr_in_mimetype) const
 
uint8_t audio_object_type () const
 
uint32_t frequency () const
 
uint8_t num_channels () const
 

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

uint8_t shaka::media::AACAudioSpecificConfig::audio_object_type ( ) const
inline
Returns
The audio object type for this AAC config.

Definition at line 54 of file aac_audio_specific_config.h.

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

uint32_t shaka::media::AACAudioSpecificConfig::frequency ( ) const
inline
Returns
The sampling frequency for this AAC config.

Definition at line 57 of file aac_audio_specific_config.h.

uint8_t shaka::media::AACAudioSpecificConfig::GetNumChannels ( bool  sbr_in_mimetype) const
Parameters
sbr_in_mimetypeindicates whether SBR mode is specified in the mimetype, i.e. codecs parameter contains mp4a.40.5.
Returns
Number of channels for the AAC stream.

Definition at line 168 of file aac_audio_specific_config.cc.

uint32_t shaka::media::AACAudioSpecificConfig::GetOutputSamplesPerSecond ( bool  sbr_in_mimetype) const
Parameters
sbr_in_mimetypeindicates whether SBR mode is specified in the mimetype, i.e. codecs parameter contains mp4a.40.5.
Returns
Output sample rate for the AAC stream.

Definition at line 153 of file aac_audio_specific_config.cc.

uint8_t shaka::media::AACAudioSpecificConfig::num_channels ( ) const
inline
Returns
Number of channels for this AAC config.

Definition at line 60 of file aac_audio_specific_config.h.

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


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