FFmpeg
Data Structures | Functions
ac3_parser_internal.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "ac3defs.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  AC3HeaderInfo
 

Functions

int ff_ac3_parse_header (GetBitContext *gbc, AC3HeaderInfo *hdr)
 Parse AC-3 frame header. More...
 
int avpriv_ac3_parse_header (AC3HeaderInfo **hdr, const uint8_t *buf, size_t size)
 
int ff_ac3_find_syncword (const uint8_t *buf, int buf_size)
 

Function Documentation

◆ ff_ac3_parse_header()

int ff_ac3_parse_header ( GetBitContext gbc,
AC3HeaderInfo hdr 
)

Parse AC-3 frame header.

Parse the header up to the lfeon element, which is the first 52 or 54 bits depending on the audio coding mode.

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 bsid (version) element is invalid, -3 if the fscod (sample rate) element is invalid, or -4 if the frmsizecod (bit rate) element is invalid.

Referenced by ac3_decode_frame(), eac3_core_filter(), ffat_create_decoder(), and parse_frame_header().

◆ avpriv_ac3_parse_header()

int avpriv_ac3_parse_header ( AC3HeaderInfo **  hdr,
const uint8_t *  buf,
size_t  size 
)

◆ ff_ac3_find_syncword()

int ff_ac3_find_syncword ( const uint8_t *  buf,
int  buf_size 
)