Shaka Packager SDK
|
#include <mpeg1_header.h>
Public Member Functions | |
AudioHeader implementation overrides. | |
bool | IsSyncWord (const uint8_t *buf) const override |
size_t | GetMinFrameSize () const override |
size_t | GetSamplesPerFrame () const override |
bool | Parse (const uint8_t *mpeg1_frame, size_t mpeg1_frame_size) override |
size_t | GetHeaderSize () const override |
size_t | GetFrameSize () const override |
size_t | GetFrameSizeWithoutParsing (const uint8_t *data, size_t num_bytes) const override |
void | GetAudioSpecificConfig (std::vector< uint8_t > *buffer) const override |
uint8_t | GetObjectType () const override |
uint32_t | GetSamplingFrequency () const override |
uint8_t | GetNumChannels () const override |
Class which parses Mpeg1 audio frame (header / metadata) and synthesizes AudioSpecificConfig from audio frame content.
See https://www.datavoyage.com/mpgscript/mpeghdr.htm
Definition at line 16 of file mpeg1_header.h.
|
overridevirtual |
Synthesize an AudioSpecificConfig record from the fields within the audio header. Should only be called after a successful Parse.
[out] | buffer | is a pointer to a vector to contain the AudioSpecificConfig. |
Implements shaka::media::mp2t::AudioHeader.
Definition at line 190 of file mpeg1_header.cc.
|
overridevirtual |
Should only be called after a successful Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 168 of file mpeg1_header.cc.
|
overridevirtual |
Obtain the size of the frame from the header data without doing a full Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 172 of file mpeg1_header.cc.
|
overridevirtual |
Should only be called after a successful Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 162 of file mpeg1_header.cc.
|
overridevirtual |
Implements shaka::media::mp2t::AudioHeader.
Definition at line 111 of file mpeg1_header.cc.
|
overridevirtual |
Should only be called after a successful Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 243 of file mpeg1_header.cc.
|
overridevirtual |
Should only be called after a successful Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 226 of file mpeg1_header.cc.
|
overridevirtual |
Implements shaka::media::mp2t::AudioHeader.
Definition at line 115 of file mpeg1_header.cc.
|
overridevirtual |
Should only be called after a successful Parse.
Implements shaka::media::mp2t::AudioHeader.
Definition at line 239 of file mpeg1_header.cc.
|
overridevirtual |
Check if the leading word (2 bytes) is sync signal.
buf | points to the buffer to be checked. Must be at least 2 bytes. |
Implements shaka::media::mp2t::AudioHeader.
Definition at line 102 of file mpeg1_header.cc.
|
overridevirtual |
Parse a partial audio frame, extracting the fields within. Only audio frame header / metadata is parsed. The audio_frame_size must contain the full header / metadata.
audio_frame | is an input parameter pointing to an audio frame. |
audio_frame_size | is the size, in bytes of the input data. It can be smaller than the actual frame size, but it should not be smaller than the header size. |
Implements shaka::media::mp2t::AudioHeader.
Definition at line 121 of file mpeg1_header.cc.