FFmpeg
Data Structures | Functions | Variables
amr_parser.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  AMRParseContext
 

Functions

static av_cold int amr_parse_init (AVCodecParserContext *s1)
 
static int amr_parse (AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

static const uint8_t amrnb_packed_size [16]
 
static const uint8_t amrwb_packed_size [16]
 
const AVCodecParser ff_amr_parser
 

Detailed Description

AMR audio parser

Splits packets into individual blocks.

Definition in file amr_parser.c.

Function Documentation

◆ amr_parse_init()

static av_cold int amr_parse_init ( AVCodecParserContext s1)
static

Definition at line 47 of file amr_parser.c.

◆ amr_parse()

static int amr_parse ( AVCodecParserContext s1,
AVCodecContext avctx,
const uint8_t **  poutbuf,
int poutbuf_size,
const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 54 of file amr_parser.c.

Variable Documentation

◆ amrnb_packed_size

const uint8_t amrnb_packed_size[16]
static
Initial value:
= {
13, 14, 16, 18, 20, 21, 27, 32, 6, 1, 1, 1, 1, 1, 1, 1
}

Definition at line 32 of file amr_parser.c.

Referenced by amr_parse().

◆ amrwb_packed_size

const uint8_t amrwb_packed_size[16]
static
Initial value:
= {
18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 1, 1, 1, 1, 1, 1
}

Definition at line 35 of file amr_parser.c.

Referenced by amr_parse().

◆ ff_amr_parser

const AVCodecParser ff_amr_parser
Initial value:
= {
.priv_data_size = sizeof(AMRParseContext),
.parser_init = amr_parse_init,
.parser_parse = amr_parse,
.parser_close = ff_parse_close,
}

Definition at line 125 of file amr_parser.c.

ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:284
amr_parse_init
static av_cold int amr_parse_init(AVCodecParserContext *s1)
Definition: amr_parser.c:47
AV_CODEC_ID_AMR_NB
@ AV_CODEC_ID_AMR_NB
Definition: codec_id.h:410
AV_CODEC_ID_AMR_WB
@ AV_CODEC_ID_AMR_WB
Definition: codec_id.h:411
AMRParseContext
Definition: amr_parser.c:39
amr_parse
static int amr_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: amr_parser.c:54