Go to the documentation of this file.
37 #define MPA_HEADER_SIZE 4
40 #define SAME_HEADER_MASK \
41 (0xffe00000 | (3 << 17) | (3 << 10) | (3 << 19))
45 const uint8_t **poutbuf,
int *poutbuf_size,
46 const uint8_t *buf,
int buf_size)
53 int flush = !buf_size;
55 for(
i=0;
i<buf_size; ){
83 s->frame_size =
ret-4;
85 if (
s->header_count > header_threshold) {
93 avctx->
bit_rate += (bit_rate - avctx->
bit_rate) / (
s->header_count - header_threshold);
102 "MP3ADU full parser");
134 *poutbuf_size = buf_size;
int sample_rate
samples per second
int duration
Duration of the current frame.
void ff_parse_close(AVCodecParserContext *s)
uint32_t state
contains the last few bytes in MSB order
AVChannelLayout ch_layout
Audio channel layout.
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
int64_t bit_rate
the average bitrate
void(* flush)(AVBSFContext *ctx)
static int inc(int num, int period)
AVCodecID
Identify the syntax and semantics of the bitstream.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
const AVCodecParser ff_mpegaudio_parser
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
main external API structure.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
#define APE_TAG_FOOTER_BYTES