FFmpeg
Data Structures | Enumerations | 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
 

Enumerations

enum  AC3ParseError {
  AC3_PARSE_ERROR_SYNC = -0x1030c0a, AC3_PARSE_ERROR_BSID = -0x2030c0a, AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a, AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a,
  AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a, AC3_PARSE_ERROR_CRC = -0x6030c0a
}
 

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)
 

Enumeration Type Documentation

◆ AC3ParseError

Enumerator
AC3_PARSE_ERROR_SYNC 
AC3_PARSE_ERROR_BSID 
AC3_PARSE_ERROR_SAMPLE_RATE 
AC3_PARSE_ERROR_FRAME_SIZE 
AC3_PARSE_ERROR_FRAME_TYPE 
AC3_PARSE_ERROR_CRC 

Definition at line 67 of file ac3_parser_internal.h.

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
0 on success and AC3_PARSE_ERROR_* values otherwise.

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 
)