36 #define MPA_HEADER_SIZE 4
39 #define SAME_HEADER_MASK \
40 (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19))
44 const uint8_t **poutbuf,
int *poutbuf_size,
52 int flush = !buf_size;
54 for(i=0; i<buf_size; ){
70 state= (state<<8) + buf[i++];
100 "MP3ADU full parser");
117 if (flush && buf_size >=
ID3v1_TAG_SIZE && memcmp(buf,
"TAG", 3) == 0) {
124 *poutbuf_size = buf_size;
static void flush(AVCodecContext *avctx)
int64_t bit_rate
the average bitrate
int duration
Duration of the current frame.
static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
AVCodecID
Identify the syntax and semantics of the bitstream.
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
preferred ID for decoding MPEG audio layer 1, 2 or 3
void ff_parse_close(AVCodecParserContext *s)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
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
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
common internal and external API header
#define PARSER_FLAG_COMPLETE_FRAMES
int channels
number of audio channels