ac3_parser.c File Reference

Go to the source code of this file.

Functions

int ff_ac3_parse_header (const uint8_t buf[7], AC3HeaderInfo *hdr)
 Parses AC-3 frame header.
int ac3_sync (const uint8_t *buf, int *channels, int *sample_rate, int *bit_rate, int *samples)
static int ac3_parse_init (AVCodecParserContext *s1)

Variables

static const uint8_t eac3_blocks [4]
AVCodecParser ac3_parser


Function Documentation

int ff_ac3_parse_header ( const uint8_t  buf[7],
AC3HeaderInfo hdr 
)

Parses AC-3 frame header.

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

Parameters:
buf[in] Array containing the first 7 bytes of the frame.
hdr[out] 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 37 of file ac3_parser.c.

Referenced by ac3_parse_header(), ac3_probe(), ac3_sync(), and encode_frame().

int ac3_sync ( const uint8_t *  buf,
int *  channels,
int *  sample_rate,
int *  bit_rate,
int *  samples 
)

Definition at line 88 of file ac3_parser.c.

Referenced by ac3_parse_init(), and encode_frame().

static int ac3_parse_init ( AVCodecParserContext s1  )  [static]

Definition at line 150 of file ac3_parser.c.


Variable Documentation

const uint8_t eac3_blocks[4] [static]

Initial value:

 {
    1, 2, 3, 6
}

Definition at line 32 of file ac3_parser.c.

Referenced by ac3_sync().

Initial value:

Definition at line 160 of file ac3_parser.c.


Generated on Sat Dec 18 05:15:50 2010 for MythTV by  doxygen 1.5.5