Libav
Data Structures | Macros | Functions | Variables
rtpdec_mpeg4.c File Reference

MPEG4 / RTP Code. More...

#include "rtpdec_formats.h"
#include "internal.h"
#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavcodec/get_bits.h"

Go to the source code of this file.

Data Structures

struct  PayloadContext
 RTP/JPEG specific private data. More...
 
struct  PayloadContext::AUHeaders
 mpeg 4 AU headers More...
 
struct  AttrNameMap
 

Macros

#define ATTR_NAME_TYPE_INT   0
 
#define ATTR_NAME_TYPE_STR   1
 

Functions

static PayloadContextnew_context (void)
 
static void free_context (PayloadContext *data)
 
static int parse_fmtp_config (AVCodecContext *codec, char *value)
 
static int rtp_parse_mp4_au (PayloadContext *data, const uint8_t *buf, int len)
 
static int aac_parse_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 parse_fmtp (AVFormatContext *s, AVStream *stream, PayloadContext *data, char *attr, char *value)
 
static int parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
 
static av_cold int init_video (AVFormatContext *s, int st_index, PayloadContext *data)
 

Variables

static const AttrNameMap attr_names []
 
RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
 
RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler
 

Detailed Description

MPEG4 / RTP Code.

Author
Fabrice Bellard
Romain Degez

Definition in file rtpdec_mpeg4.c.

Macro Definition Documentation

§ ATTR_NAME_TYPE_INT

#define ATTR_NAME_TYPE_INT   0

Definition at line 73 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

§ ATTR_NAME_TYPE_STR

#define ATTR_NAME_TYPE_STR   1

Definition at line 74 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

Function Documentation

§ new_context()

static PayloadContext* new_context ( void  )
static

Definition at line 91 of file rtpdec_mpeg4.c.

§ free_context()

static void free_context ( PayloadContext data)
static

Definition at line 96 of file rtpdec_mpeg4.c.

§ parse_fmtp_config()

static int parse_fmtp_config ( AVCodecContext codec,
char *  value 
)
static

Definition at line 103 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

§ rtp_parse_mp4_au()

static int rtp_parse_mp4_au ( PayloadContext data,
const uint8_t buf,
int  len 
)
static

Definition at line 116 of file rtpdec_mpeg4.c.

Referenced by aac_parse_packet().

§ aac_parse_packet()

static int aac_parse_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 166 of file rtpdec_mpeg4.c.

§ parse_fmtp()

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

Definition at line 213 of file rtpdec_mpeg4.c.

Referenced by parse_sdp_line().

§ parse_sdp_line()

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

Definition at line 243 of file rtpdec_mpeg4.c.

§ init_video()

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

Definition at line 257 of file rtpdec_mpeg4.c.

Variable Documentation

§ attr_names

const AttrNameMap attr_names[]
static
Initial value:
= {
{ "SizeLength", ATTR_NAME_TYPE_INT,
0x42 },
{ "IndexLength", ATTR_NAME_TYPE_INT,
0x42 },
{ "IndexDeltaLength", ATTR_NAME_TYPE_INT,
0x42 },
{ "profile-level-id", ATTR_NAME_TYPE_INT,
0x42 },
{ "StreamType", ATTR_NAME_TYPE_INT,
0x42 },
{ "mode", ATTR_NAME_TYPE_STR,
0x42 },
{ NULL, -1, -1 },
}
#define ATTR_NAME_TYPE_INT
Definition: rtpdec_mpeg4.c:73
NULL
Definition: eval.c:55
#define ATTR_NAME_TYPE_STR
Definition: rtpdec_mpeg4.c:74

Definition at line 75 of file rtpdec_mpeg4.c.

§ ff_mp4v_es_dynamic_handler

RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
Initial value:
= {
.enc_name = "MP4V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MPEG4,
.init = init_video,
.parse_sdp_a_line = parse_sdp_line,
}
static av_cold int init_video(AVFormatContext *s, int st_index, PayloadContext *data)
Definition: rtpdec_mpeg4.c:257
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_mpeg4.c:243

Definition at line 266 of file rtpdec_mpeg4.c.

Referenced by ff_register_rtp_dynamic_payload_handlers().

§ ff_mpeg4_generic_dynamic_handler

RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler
Initial value:
= {
.enc_name = "mpeg4-generic",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AAC,
.parse_sdp_a_line = parse_sdp_line,
.alloc = new_context,
.free = free_context,
.parse_packet = aac_parse_packet
}
static void free_context(PayloadContext *data)
Definition: rtpdec_mpeg4.c:96
static int aac_parse_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_mpeg4.c:166
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_mpeg4.c:243
static PayloadContext * new_context(void)
Definition: rtpdec_mpeg4.c:91

Definition at line 274 of file rtpdec_mpeg4.c.

Referenced by ff_register_rtp_dynamic_payload_handlers().