rtpdec_amr.c File Reference
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "rtpdec_formats.h"
#include "libavutil/avstring.h"
Include dependency graph for rtpdec_amr.c:

Go to the source code of this file.

Data Structures

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

Functions

static PayloadContextamr_new_context (void)
 
static void amr_free_context (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 (AVStream *stream, PayloadContext *data, char *attr, 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]
 
RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler
 
RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler
 

Function Documentation

static void amr_free_context ( PayloadContext data)
static

Definition at line 49 of file rtpdec_amr.c.

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 54 of file rtpdec_amr.c.

static PayloadContext* amr_new_context ( void  )
static

Definition at line 41 of file rtpdec_amr.c.

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

Definition at line 142 of file rtpdec_amr.c.

Referenced by amr_parse_sdp_line().

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

Definition at line 165 of file rtpdec_amr.c.

Variable Documentation

RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler
Initial value:
= {
.enc_name = "AMR",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_NB,
.parse_sdp_a_line = amr_parse_sdp_line,
.alloc = amr_new_context,
.parse_packet = amr_handle_packet,
}
static int amr_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_amr.c:165
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:54
static void amr_free_context(PayloadContext *data)
Definition: rtpdec_amr.c:49
static PayloadContext * amr_new_context(void)
Definition: rtpdec_amr.c:41

Definition at line 191 of file rtpdec_amr.c.

Referenced by av_register_rtp_dynamic_payload_handlers().

RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler
Initial value:
= {
.enc_name = "AMR-WB",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_WB,
.parse_sdp_a_line = amr_parse_sdp_line,
.alloc = amr_new_context,
.parse_packet = amr_handle_packet,
}
static int amr_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_amr.c:165
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:54
static void amr_free_context(PayloadContext *data)
Definition: rtpdec_amr.c:49
static PayloadContext * amr_new_context(void)
Definition: rtpdec_amr.c:41

Definition at line 201 of file rtpdec_amr.c.

Referenced by av_register_rtp_dynamic_payload_handlers().

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().

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().