FFmpeg
Data Structures | Functions | Variables
rtpdec_xiph.c File Reference

Xiph / RTP Code. More...

#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/mem.h"
#include "libavcodec/bytestream.h"
#include "avio_internal.h"
#include "internal.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"

Go to the source code of this file.

Data Structures

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

Functions

static void xiph_close_context (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 (AVFormatContext *s, const uint8_t *packed_headers, const uint8_t *packed_headers_end, AVCodecParameters *par, PayloadContext *xiph_data)
 Based off parse_packed_headers in Vorbis RTP. More...
 
static int xiph_parse_fmtp_pair (AVFormatContext *s, AVStream *stream, PayloadContext *xiph_data, const char *attr, const char *value)
 
static int xiph_parse_sdp_line (AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
 

Variables

const RTPDynamicProtocolHandler ff_theora_dynamic_handler
 
const RTPDynamicProtocolHandler ff_vorbis_dynamic_handler
 

Detailed Description

Xiph / RTP Code.

Author
Colin McQuillan m.nil.nosp@m.oc@g.nosp@m.mail..nosp@m.com
Josh Allmann joshu.nosp@m.a.al.nosp@m.lmann.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition in file rtpdec_xiph.c.

Function Documentation

◆ xiph_close_context()

static void xiph_close_context ( PayloadContext data)
static

Definition at line 54 of file rtpdec_xiph.c.

◆ xiph_handle_packet()

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 61 of file rtpdec_xiph.c.

◆ get_base128()

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 207 of file rtpdec_xiph.c.

Referenced by parse_packed_headers().

◆ parse_packed_headers()

static int parse_packed_headers ( AVFormatContext s,
const uint8_t *  packed_headers,
const uint8_t *  packed_headers_end,
AVCodecParameters par,
PayloadContext xiph_data 
)
static

Based off parse_packed_headers in Vorbis RTP.

Definition at line 225 of file rtpdec_xiph.c.

Referenced by xiph_parse_fmtp_pair().

◆ xiph_parse_fmtp_pair()

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

Definition at line 286 of file rtpdec_xiph.c.

Referenced by xiph_parse_sdp_line().

◆ xiph_parse_sdp_line()

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

Definition at line 354 of file rtpdec_xiph.c.

Variable Documentation

◆ ff_theora_dynamic_handler

const RTPDynamicProtocolHandler ff_theora_dynamic_handler
Initial value:
= {
.enc_name = "theora",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_THEORA,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
}

Definition at line 370 of file rtpdec_xiph.c.

◆ ff_vorbis_dynamic_handler

const RTPDynamicProtocolHandler ff_vorbis_dynamic_handler
Initial value:
= {
.enc_name = "vorbis",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_VORBIS,
.need_parsing = AVSTREAM_PARSE_HEADERS,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
}

Definition at line 380 of file rtpdec_xiph.c.

xiph_parse_sdp_line
static int xiph_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
Definition: rtpdec_xiph.c:354
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
xiph_close_context
static void xiph_close_context(PayloadContext *data)
Definition: rtpdec_xiph.c:54
AV_CODEC_ID_THEORA
@ AV_CODEC_ID_THEORA
Definition: codec_id.h:82
AVSTREAM_PARSE_HEADERS
@ AVSTREAM_PARSE_HEADERS
Only parse headers, do not repack.
Definition: avformat.h:594
xiph_handle_packet
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:61
parse_packet
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
Definition: demux.c:1162
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_VORBIS
@ AV_CODEC_ID_VORBIS
Definition: codec_id.h:451
PayloadContext
RTP/JPEG specific private data.
Definition: rdt.c:85