libavformat/rtpdec_mpeg4.c File Reference

Common code for the RTP depacketization of MPEG-4 formats. More...

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

Go to the source code of this file.

Data Structures

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

Defines

#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)
static int aac_parse_packet (AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags)
static int parse_fmtp (AVStream *stream, PayloadContext *data, char *attr, char *value)
static int parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)

Variables

static const AttrNameMap attr_names []
RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler
RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler


Detailed Description

Common code for the RTP depacketization of MPEG-4 formats.

Copyright (c) 2010 Fabrice Bellard Romain Degez

This file is part of FFmpeg.

FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

MPEG4 / RTP Code

Author:
Fabrice Bellard

Romain Degez

Definition in file rtpdec_mpeg4.c.


Define Documentation

#define ATTR_NAME_TYPE_INT   0

Definition at line 70 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().

#define ATTR_NAME_TYPE_STR   1

Definition at line 71 of file rtpdec_mpeg4.c.

Referenced by parse_fmtp().


Function Documentation

static int aac_parse_packet ( AVFormatContext ctx,
PayloadContext data,
AVStream st,
AVPacket pkt,
uint32_t *  timestamp,
const uint8_t *  buf,
int  len,
int  flags 
) [static]

Definition at line 170 of file rtpdec_mpeg4.c.

static void free_context ( PayloadContext data  )  [static]

Definition at line 94 of file rtpdec_mpeg4.c.

static PayloadContext* new_context ( void   )  [static]

Definition at line 89 of file rtpdec_mpeg4.c.

static int parse_fmtp ( AVStream stream,
PayloadContext data,
char *  attr,
char *  value 
) [static]

Definition at line 192 of file rtpdec_mpeg4.c.

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

Definition at line 109 of file rtpdec_mpeg4.c.

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

Definition at line 221 of file rtpdec_mpeg4.c.

static int rtp_parse_mp4_au ( PayloadContext data,
const uint8_t *  buf 
) [static]

Definition at line 122 of file rtpdec_mpeg4.c.

Referenced by aac_parse_packet().


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 },
}

Definition at line 72 of file rtpdec_mpeg4.c.

Initial value:

 {
    .enc_name           = "MP4V-ES",
    .codec_type         = AVMEDIA_TYPE_VIDEO,
    .codec_id           = CODEC_ID_MPEG4,
    .parse_sdp_a_line   = parse_sdp_line,
}

Definition at line 232 of file rtpdec_mpeg4.c.

Referenced by av_register_rtp_dynamic_payload_handlers().

Initial value:

 {
    .enc_name           = "mpeg4-generic",
    .codec_type         = AVMEDIA_TYPE_AUDIO,
    .codec_id           = CODEC_ID_AAC,
    .parse_sdp_a_line   = parse_sdp_line,
    .alloc              = new_context,
    .free               = free_context,
    .parse_packet       = aac_parse_packet
}

Definition at line 239 of file rtpdec_mpeg4.c.

Referenced by av_register_rtp_dynamic_payload_handlers().


Generated on Fri Oct 26 02:46:13 2012 for FFmpeg by  doxygen 1.5.8