FFmpeg
Data Structures | Functions
adts_header.h File Reference
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  AACADTSHeaderInfo
 

Functions

int ff_adts_header_parse (GetBitContext *gbc, AACADTSHeaderInfo *hdr)
 Parse the ADTS frame header to the end of the variable header, which is the first 54 bits. More...
 
int avpriv_adts_header_parse (AACADTSHeaderInfo **phdr, const uint8_t *buf, size_t size)
 Parse the ADTS frame header contained in the buffer, which is the first 54 bits. More...
 

Function Documentation

◆ ff_adts_header_parse()

int ff_adts_header_parse ( GetBitContext gbc,
AACADTSHeaderInfo hdr 
)

Parse the ADTS frame header to the end of the variable header, which is the first 54 bits.

Parameters
[in]gbcBitContext containing the first 54 bits of the frame.
[out]hdrPointer to struct where header info is written.
Returns
Returns 0 on success, -1 if there is a sync word mismatch, -2 if the version element is invalid, -3 if the sample rate element is invalid, or -4 if the bit rate element is invalid.

Definition at line 30 of file adts_header.c.

Referenced by aac_adtstoasc_filter(), aac_sync(), av_adts_header_parse(), avpriv_adts_header_parse(), and parse_adts_frame_header().

◆ avpriv_adts_header_parse()

int avpriv_adts_header_parse ( AACADTSHeaderInfo **  phdr,
const uint8_t *  buf,
size_t  size 
)

Parse the ADTS frame header contained in the buffer, which is the first 54 bits.

Parameters
[in]bufPointer to buffer containing the first 54 bits of the frame.
[in]sizeSize of buffer containing the first 54 bits of the frame.
[out]phdrPointer to pointer to struct AACADTSHeaderInfo for which memory is allocated and header info is written into it. After using the header information, the allocated memory must be freed by using av_free.
Returns
Returns 0 on success, -1 if there is a sync word mismatch, -2 if the version element is invalid, -3 if the sample rate element is invalid, or -4 if the bit rate element is invalid.

Definition at line 46 of file adts_parser.c.

Referenced by get_next_adts_frame().