libavcodec/ac3_parser.c File Reference

#include "parser.h"
#include "ac3_parser.h"
#include "aac_ac3_parser.h"
#include "get_bits.h"
#include "libavutil/audioconvert.h"

Go to the source code of this file.

Defines

#define AC3_HEADER_SIZE   7

Functions

int ff_ac3_parse_header (GetBitContext *gbc, AC3HeaderInfo *hdr)
 Parse AC-3 frame header.
static int ac3_sync (uint64_t state, AACAC3ParseContext *hdr_info, int *need_next_header, int *new_frame_start)
static av_cold int ac3_parse_init (AVCodecParserContext *s1)

Variables

static const uint8_t eac3_blocks [4]
AVCodecParser ff_ac3_parser


Define Documentation

#define AC3_HEADER_SIZE   7

Definition at line 30 of file ac3_parser.c.

Referenced by ac3_parse_init(), ac3_sync(), and ff_ac3_parse_header().


Function Documentation

static av_cold int ac3_parse_init ( AVCodecParserContext s1  )  [static]

Definition at line 167 of file ac3_parser.c.

static int ac3_sync ( uint64_t  state,
AACAC3ParseContext hdr_info,
int *  need_next_header,
int *  new_frame_start 
) [static]

Definition at line 132 of file ac3_parser.c.

Referenced by ac3_parse_init().

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] gbc BitContext containing the first 54 bits of the frame.
[out] hdr Pointer 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.

Definition at line 38 of file ac3_parser.c.

Referenced by ac3_eac3_probe(), ac3_sync(), and parse_frame_header().


Variable Documentation

const uint8_t eac3_blocks[4] [static]

Initial value:

 {
    1, 2, 3, 6
}

Definition at line 33 of file ac3_parser.c.

Referenced by ff_ac3_parse_header().

Initial value:

Definition at line 176 of file ac3_parser.c.


Generated on Fri Oct 26 02:38:14 2012 for FFmpeg by  doxygen 1.5.8