34 13, 14, 16, 18, 20, 21, 27, 32, 6, 1, 1, 1, 1, 1, 1, 1
37 18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 1, 1, 1, 1, 1, 1
57 const uint8_t **poutbuf,
int *poutbuf_size,
58 const uint8_t *buf,
int buf_size)
77 for (ch =
s->current_channel; ch < avctx->ch_layout.nb_channels; ch++) {
78 if (
s->remaining >= 0) {
92 s->remaining =
offset - buf_size;
101 if (
s->remaining < 0)
105 if (
s->cumulated_size < UINT64_MAX - next) {
106 s->cumulated_size += next;
108 avctx->
bit_rate =
s->cumulated_size / ++
s->block_count * 8 * 50;
122 *poutbuf_size = buf_size;
static int amr_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
const FFCodecParser ff_amr_parser
static av_cold int amr_parse_init(AVCodecParserContext *s1)
static const uint8_t amrnb_packed_size[16]
static const uint8_t amrwb_packed_size[16]
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static av_cold void close(AVCodecParserContext *s)
#define PARSER_FLAG_COMPLETE_FRAMES
Public libavutil channel layout APIs header.
int(* init)(AVBSFContext *ctx)
#define AV_CHANNEL_LAYOUT_MONO
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
av_cold void ff_parse_close(AVCodecParserContext *s)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define PARSER_CODEC_LIST(...)
An AVChannelLayout holds information about the channel layout of audio data.
int nb_channels
Number of channels in this layout.
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
int64_t bit_rate
the average bitrate
int duration
Duration of the current frame.