34 #define MPA_HEADER_SIZE 4
37 #define SAME_HEADER_MASK \
38 (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19))
42 const uint8_t **poutbuf,
int *poutbuf_size,
43 const uint8_t *buf,
int buf_size)
51 for(i=0; i<buf_size; ){
63 int ret, sr, channels, bit_rate, frame_size;
65 state= (state<<8) + buf[i++];
97 *poutbuf_size = buf_size;
static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
void ff_parse_close(AVCodecParserContext *s)
int bit_rate
the average bitrate
int frame_size
Samples per packet, initialized when calling 'init'.
int sample_rate
samples per second
main external API structure.
uint32_t state
contains the last few bytes in MSB order
AVCodecParser ff_mpegaudio_parser
struct MpegAudioParseContext MpegAudioParseContext
int channels
number of audio channels
preferred ID for decoding MPEG audio layer 1, 2 or 3