rtpdec_h264.c File Reference

H.264 / RTP Code (RFC3984) More...

#include "libavutil/base64.h"
#include "libavutil/avstring.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
#include "network.h"
#include <assert.h>
#include "rtpdec.h"
#include "rtpdec_formats.h"
Include dependency graph for rtpdec_h264.c:

Go to the source code of this file.

Data Structures

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

Macros

#define COUNT_NAL_TYPE(data, nal)   do { } while (0)
 

Functions

static int sdp_parse_fmtp_config_h264 (AVStream *stream, PayloadContext *h264_data, char *attr, char *value)
 
static int h264_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 PayloadContexth264_new_context (void)
 
static void h264_free_context (PayloadContext *data)
 
static int h264_init (AVFormatContext *s, int st_index, PayloadContext *data)
 
static int parse_h264_sdp_line (AVFormatContext *s, int st_index, PayloadContext *h264_data, const char *line)
 

Variables

static const uint8_t start_sequence [] = { 0, 0, 0, 1 }
 
RTPDynamicProtocolHandler ff_h264_dynamic_handler
 

Detailed Description

H.264 / RTP Code (RFC3984)

Author
Ryan Martell rdm4@.nosp@m.mart.nosp@m.ellve.nosp@m.ntur.nosp@m.es.co.nosp@m.m
Note
Notes: Notes: This currently supports packetization mode: Single Nal Unit Mode (0), or Non-Interleaved Mode (1). It currently does not support Interleaved Mode (2). (This requires implementing STAP-B, MTAP16, MTAP24, FU-B packet types)

Definition in file rtpdec_h264.c.

Macro Definition Documentation

#define COUNT_NAL_TYPE (   data,
  nal 
)    do { } while (0)

Definition at line 61 of file rtpdec_h264.c.

Referenced by h264_handle_packet().

Function Documentation

static void h264_free_context ( PayloadContext data)
static

Definition at line 326 of file rtpdec_h264.c.

static int h264_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 166 of file rtpdec_h264.c.

static int h264_init ( AVFormatContext s,
int  st_index,
PayloadContext data 
)
static

Definition at line 341 of file rtpdec_h264.c.

static PayloadContext* h264_new_context ( void  )
static

Definition at line 321 of file rtpdec_h264.c.

static int parse_h264_sdp_line ( AVFormatContext s,
int  st_index,
PayloadContext h264_data,
const char *  line 
)
static

Definition at line 349 of file rtpdec_h264.c.

static int sdp_parse_fmtp_config_h264 ( AVStream stream,
PayloadContext h264_data,
char *  attr,
char *  value 
)
static

Definition at line 66 of file rtpdec_h264.c.

Referenced by parse_h264_sdp_line().

Variable Documentation

RTPDynamicProtocolHandler ff_h264_dynamic_handler
Initial value:
= {
.enc_name = "H264",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H264,
.init = h264_init,
.parse_sdp_a_line = parse_h264_sdp_line,
.alloc = h264_new_context,
.parse_packet = h264_handle_packet
}
static void h264_free_context(PayloadContext *data)
Definition: rtpdec_h264.c:326
static PayloadContext * h264_new_context(void)
Definition: rtpdec_h264.c:321
static int parse_h264_sdp_line(AVFormatContext *s, int st_index, PayloadContext *h264_data, const char *line)
Definition: rtpdec_h264.c:349
static int h264_init(AVFormatContext *s, int st_index, PayloadContext *data)
Definition: rtpdec_h264.c:341
static int h264_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_h264.c:166

Definition at line 390 of file rtpdec_h264.c.

Referenced by av_register_rtp_dynamic_payload_handlers().

const uint8_t start_sequence[] = { 0, 0, 0, 1 }
static

Definition at line 64 of file rtpdec_h264.c.

Referenced by h264_handle_packet(), and sdp_parse_fmtp_config_h264().