FFmpeg
Data Structures | Macros | Functions | Variables
rtpdec_vc2hq.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavcodec/dirac.h"
#include "avio_internal.h"
#include "rtpdec_formats.h"

Go to the source code of this file.

Data Structures

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

Macros

#define RTP_VC2HQ_PL_HEADER_SIZE   4
 
#define DIRAC_DATA_UNIT_HEADER_SIZE   13
 
#define DIRAC_PIC_NR_SIZE   4
 
#define DIRAC_RTP_PCODE_HQ_PIC_FRAGMENT   0xEC
 

Functions

static void fill_parse_info_header (PayloadContext *pl_ctx, uint8_t *buf, uint8_t parse_code, uint32_t data_unit_size)
 
static int vc2hq_handle_sequence_header (PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt, const uint8_t *buf, int len)
 
static int vc2hq_mark_end_of_sequence (PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt)
 
static int vc2hq_handle_frame_fragment (AVFormatContext *ctx, PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags)
 
static int vc2hq_handle_packet (AVFormatContext *ctx, PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
 

Variables

static const uint8_t start_sequence [] = { 'B', 'B', 'C', 'D' }
 
const RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler
 

Macro Definition Documentation

◆ RTP_VC2HQ_PL_HEADER_SIZE

#define RTP_VC2HQ_PL_HEADER_SIZE   4

Definition at line 28 of file rtpdec_vc2hq.c.

◆ DIRAC_DATA_UNIT_HEADER_SIZE

#define DIRAC_DATA_UNIT_HEADER_SIZE   13

Definition at line 30 of file rtpdec_vc2hq.c.

◆ DIRAC_PIC_NR_SIZE

#define DIRAC_PIC_NR_SIZE   4

Definition at line 31 of file rtpdec_vc2hq.c.

◆ DIRAC_RTP_PCODE_HQ_PIC_FRAGMENT

#define DIRAC_RTP_PCODE_HQ_PIC_FRAGMENT   0xEC

Definition at line 32 of file rtpdec_vc2hq.c.

Function Documentation

◆ fill_parse_info_header()

static void fill_parse_info_header ( PayloadContext pl_ctx,
uint8_t *  buf,
uint8_t  parse_code,
uint32_t  data_unit_size 
)
static

◆ vc2hq_handle_sequence_header()

static int vc2hq_handle_sequence_header ( PayloadContext pl_ctx,
AVStream st,
AVPacket pkt,
const uint8_t *  buf,
int  len 
)
static

Definition at line 56 of file rtpdec_vc2hq.c.

Referenced by vc2hq_handle_packet().

◆ vc2hq_mark_end_of_sequence()

static int vc2hq_mark_end_of_sequence ( PayloadContext pl_ctx,
AVStream st,
AVPacket pkt 
)
static

Definition at line 75 of file rtpdec_vc2hq.c.

Referenced by vc2hq_handle_packet().

◆ vc2hq_handle_frame_fragment()

static int vc2hq_handle_frame_fragment ( AVFormatContext ctx,
PayloadContext pl_ctx,
AVStream st,
AVPacket pkt,
uint32_t *  timestamp,
const uint8_t *  buf,
int  len,
int  flags 
)
static

Definition at line 92 of file rtpdec_vc2hq.c.

Referenced by vc2hq_handle_packet().

◆ vc2hq_handle_packet()

static int vc2hq_handle_packet ( AVFormatContext ctx,
PayloadContext pl_ctx,
AVStream st,
AVPacket pkt,
uint32_t *  timestamp,
const uint8_t *  buf,
int  len,
uint16_t  seq,
int  flags 
)
static

Definition at line 176 of file rtpdec_vc2hq.c.

Variable Documentation

◆ start_sequence

const uint8_t start_sequence[] = { 'B', 'B', 'C', 'D' }
static

Definition at line 43 of file rtpdec_vc2hq.c.

Referenced by fill_parse_info_header().

◆ ff_vc2hq_dynamic_handler

const RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler
Initial value:
= {
.enc_name = "VC2",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_DIRAC,
.priv_data_size = sizeof(PayloadContext),
}

Definition at line 219 of file rtpdec_vc2hq.c.

AV_CODEC_ID_DIRAC
@ AV_CODEC_ID_DIRAC
Definition: codec_id.h:168
vc2hq_handle_packet
static int vc2hq_handle_packet(AVFormatContext *ctx, PayloadContext *pl_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
Definition: rtpdec_vc2hq.c:176
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:1154
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
PayloadContext
RTP/JPEG specific private data.
Definition: rdt.c:84