rtpdec_xiph.c File Reference

Xiph / RTP Code. More...

#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavcodec/bytestream.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
Include dependency graph for rtpdec_xiph.c:

Go to the source code of this file.

Data Structures

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

Functions

static PayloadContextxiph_new_context (void)
 
static void free_fragment_if_needed (PayloadContext *data)
 
static void xiph_free_context (PayloadContext *data)
 
static int xiph_vorbis_init (AVFormatContext *ctx, int st_index, PayloadContext *data)
 
static int xiph_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 get_base128 (const uint8_t **buf, const uint8_t *buf_end)
 Length encoding described in RFC5215 section 3.1.1. More...
 
static int parse_packed_headers (const uint8_t *packed_headers, const uint8_t *packed_headers_end, AVCodecContext *codec, PayloadContext *xiph_data)
 Based off parse_packed_headers in Vorbis RTP. More...
 
static int xiph_parse_fmtp_pair (AVStream *stream, PayloadContext *xiph_data, char *attr, char *value)
 
static int xiph_parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
 

Variables

RTPDynamicProtocolHandler ff_theora_dynamic_handler
 
RTPDynamicProtocolHandler ff_vorbis_dynamic_handler
 

Detailed Description

Function Documentation

static void free_fragment_if_needed ( PayloadContext data)
inlinestatic

Definition at line 55 of file rtpdec_xiph.c.

Referenced by xiph_free_context(), and xiph_handle_packet().

static int get_base128 ( const uint8_t **  buf,
const uint8_t buf_end 
)
static

Length encoding described in RFC5215 section 3.1.1.

Definition at line 229 of file rtpdec_xiph.c.

Referenced by parse_packed_headers().

static int parse_packed_headers ( const uint8_t packed_headers,
const uint8_t packed_headers_end,
AVCodecContext codec,
PayloadContext xiph_data 
)
static

Based off parse_packed_headers in Vorbis RTP.

Definition at line 247 of file rtpdec_xiph.c.

Referenced by xiph_parse_fmtp_pair().

static void xiph_free_context ( PayloadContext data)
static

Definition at line 65 of file rtpdec_xiph.c.

static int xiph_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 82 of file rtpdec_xiph.c.

static PayloadContext* xiph_new_context ( void  )
static

Definition at line 50 of file rtpdec_xiph.c.

static int xiph_parse_fmtp_pair ( AVStream stream,
PayloadContext xiph_data,
char *  attr,
char *  value 
)
static

Definition at line 307 of file rtpdec_xiph.c.

Referenced by xiph_parse_sdp_line().

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

Definition at line 374 of file rtpdec_xiph.c.

static int xiph_vorbis_init ( AVFormatContext ctx,
int  st_index,
PayloadContext data 
)
static

Definition at line 72 of file rtpdec_xiph.c.

Variable Documentation

RTPDynamicProtocolHandler ff_theora_dynamic_handler
Initial value:
= {
.enc_name = "theora",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_THEORA,
.parse_sdp_a_line = xiph_parse_sdp_line,
.alloc = xiph_new_context,
.parse_packet = xiph_handle_packet
}
static PayloadContext * xiph_new_context(void)
Definition: rtpdec_xiph.c:50
static int xiph_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_xiph.c:374
static void xiph_free_context(PayloadContext *data)
Definition: rtpdec_xiph.c:65
static int xiph_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_xiph.c:82

Definition at line 390 of file rtpdec_xiph.c.

Referenced by av_register_rtp_dynamic_payload_handlers().

RTPDynamicProtocolHandler ff_vorbis_dynamic_handler
Initial value:
= {
.enc_name = "vorbis",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_VORBIS,
.parse_sdp_a_line = xiph_parse_sdp_line,
.alloc = xiph_new_context,
.parse_packet = xiph_handle_packet
}
static PayloadContext * xiph_new_context(void)
Definition: rtpdec_xiph.c:50
static int xiph_vorbis_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
Definition: rtpdec_xiph.c:72
static int xiph_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_xiph.c:374
static void xiph_free_context(PayloadContext *data)
Definition: rtpdec_xiph.c:65
static int xiph_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_xiph.c:82

Definition at line 400 of file rtpdec_xiph.c.

Referenced by av_register_rtp_dynamic_payload_handlers().