FFmpeg
Data Structures | Functions | Variables
rtpdec_amr.c File Reference
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "rtpdec_formats.h"
#include "libavutil/avstring.h"

Go to the source code of this file.

Data Structures

struct  PayloadContext
 RTP/JPEG specific private data. More...
 

Functions

static av_cold int amr_init (AVFormatContext *s, int st_index, PayloadContext *data)
 
static int amr_handle_packet (AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
 
static int amr_parse_fmtp (AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
 
static int amr_parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
 

Variables

static const uint8_t frame_sizes_nb [16]
 
static const uint8_t frame_sizes_wb [16]
 
const RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler
 
const RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler
 

Function Documentation

◆ amr_init()

static av_cold int amr_init ( AVFormatContext s,
int  st_index,
PayloadContext data 
)
static

Definition at line 41 of file rtpdec_amr.c.

◆ amr_handle_packet()

static int amr_handle_packet ( AVFormatContext ctx,
PayloadContext data,
AVStream st,
AVPacket pkt,
uint32_t *  timestamp,
const uint8_t *  buf,
int  len,
uint16_t  seq,
int  flags 
)
static

Definition at line 47 of file rtpdec_amr.c.

◆ amr_parse_fmtp()

static int amr_parse_fmtp ( AVFormatContext s,
AVStream stream,
PayloadContext data,
const char *  attr,
const char *  value 
)
static

Definition at line 135 of file rtpdec_amr.c.

Referenced by amr_parse_sdp_line().

◆ amr_parse_sdp_line()

static int amr_parse_sdp_line ( AVFormatContext s,
int  st_index,
PayloadContext data,
const char *  line 
)
static

Definition at line 159 of file rtpdec_amr.c.

Variable Documentation

◆ frame_sizes_nb

const uint8_t frame_sizes_nb[16]
static
Initial value:
= {
12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 27 of file rtpdec_amr.c.

Referenced by amr_handle_packet().

◆ frame_sizes_wb

const uint8_t frame_sizes_wb[16]
static
Initial value:
= {
17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 5, 0, 0, 0, 0, 0
}

Definition at line 30 of file rtpdec_amr.c.

Referenced by amr_handle_packet().

◆ ff_amr_nb_dynamic_handler

const RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler
Initial value:
= {
.enc_name = "AMR",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = amr_parse_sdp_line,
}

Definition at line 185 of file rtpdec_amr.c.

◆ ff_amr_wb_dynamic_handler

const RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler
Initial value:
= {
.enc_name = "AMR-WB",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = amr_parse_sdp_line,
}

Definition at line 195 of file rtpdec_amr.c.

AV_CODEC_ID_AMR_NB
@ AV_CODEC_ID_AMR_NB
Definition: codec_id.h:419
AV_CODEC_ID_AMR_WB
@ AV_CODEC_ID_AMR_WB
Definition: codec_id.h:420
amr_handle_packet
static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
Definition: rtpdec_amr.c:47
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
amr_init
static av_cold int amr_init(AVFormatContext *s, int st_index, PayloadContext *data)
Definition: rtpdec_amr.c:41
amr_parse_sdp_line
static int amr_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_amr.c:159
parse_packet
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
Definition: demux.c:1119
PayloadContext
RTP/JPEG specific private data.
Definition: rdt.c:83