FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
rtpdec_mpeg4.c File Reference

MPEG-4 / 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 MAX_AAC_HBR_FRAME_SIZE   8191
 
#define ATTR_NAME_TYPE_INT   0
 
#define ATTR_NAME_TYPE_STR   1
 

Functions

static void close_context (PayloadContext *data)
 
static int parse_fmtp_config (AVCodecParameters *par, const 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, const char *attr, const char *value)
 
static int parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
 

Variables

static const AttrNameMap attr_names []
 
const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
 
const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler
 

Detailed Description

MPEG-4 / RTP Code.

Author
Fabrice Bellard
Romain Degez

Definition in file rtpdec_mpeg4.c.

Macro Definition Documentation

#define MAX_AAC_HBR_FRAME_SIZE   8191

Definition at line 36 of file rtpdec_mpeg4.c.

Referenced by aac_parse_packet().

#define ATTR_NAME_TYPE_INT   0

Definition at line 76 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

#define ATTR_NAME_TYPE_STR   1

Definition at line 77 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

Function Documentation

static void close_context ( PayloadContext data)
static

Definition at line 94 of file rtpdec_mpeg4.c.

static int parse_fmtp_config ( AVCodecParameters par,
const char *  value 
)
static

Definition at line 100 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

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

Definition at line 111 of file rtpdec_mpeg4.c.

Referenced by 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 161 of file rtpdec_mpeg4.c.

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

Definition at line 273 of file rtpdec_mpeg4.c.

Referenced by parse_sdp_line().

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

Definition at line 314 of file rtpdec_mpeg4.c.

Variable Documentation

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 NULL
Definition: coverity.c:32
#define ATTR_NAME_TYPE_INT
Definition: rtpdec_mpeg4.c:76
#define ATTR_NAME_TYPE_STR
Definition: rtpdec_mpeg4.c:77

Definition at line 78 of file rtpdec_mpeg4.c.

const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
Initial value:
= {
.enc_name = "MP4V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MPEG4,
.need_parsing = AVSTREAM_PARSE_FULL,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = parse_sdp_line,
}
RTP/JPEG specific private data.
Definition: rdt.c:83
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_mpeg4.c:314
full parsing and repack
Definition: avformat.h:793

Definition at line 328 of file rtpdec_mpeg4.c.

const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler
Initial value:
= {
.enc_name = "mpeg4-generic",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = parse_sdp_line,
.close = close_context,
}
RTP/JPEG specific private data.
Definition: rdt.c:83
static void close_context(PayloadContext *data)
Definition: rtpdec_mpeg4.c:94
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:161
static int parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_mpeg4.c:314
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
Parse a packet, add all split parts to parse_queue.
Definition: utils.c:1437

Definition at line 337 of file rtpdec_mpeg4.c.