FFmpeg
Data Structures | Macros | Functions | Variables
rtpdec_hevc.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavcodec/get_bits.h"
#include "avformat.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...
 

Macros

#define RTP_HEVC_PAYLOAD_HEADER_SIZE   2
 
#define RTP_HEVC_FU_HEADER_SIZE   1
 
#define RTP_HEVC_DONL_FIELD_SIZE   2
 
#define RTP_HEVC_DOND_FIELD_SIZE   1
 
#define RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE   2
 
#define HEVC_SPECIFIED_NAL_UNIT_TYPES   48
 

Functions

static av_cold int hevc_sdp_parse_fmtp_config (AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, const char *attr, const char *value)
 
static av_cold int hevc_parse_sdp_line (AVFormatContext *ctx, int st_index, PayloadContext *hevc_data, const char *line)
 
static int hevc_handle_packet (AVFormatContext *ctx, PayloadContext *rtp_hevc_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 [] = { 0x00, 0x00, 0x00, 0x01 }
 
const RTPDynamicProtocolHandler ff_hevc_dynamic_handler
 

Macro Definition Documentation

◆ RTP_HEVC_PAYLOAD_HEADER_SIZE

#define RTP_HEVC_PAYLOAD_HEADER_SIZE   2

Definition at line 32 of file rtpdec_hevc.c.

◆ RTP_HEVC_FU_HEADER_SIZE

#define RTP_HEVC_FU_HEADER_SIZE   1

Definition at line 33 of file rtpdec_hevc.c.

◆ RTP_HEVC_DONL_FIELD_SIZE

#define RTP_HEVC_DONL_FIELD_SIZE   2

Definition at line 34 of file rtpdec_hevc.c.

◆ RTP_HEVC_DOND_FIELD_SIZE

#define RTP_HEVC_DOND_FIELD_SIZE   1

Definition at line 35 of file rtpdec_hevc.c.

◆ RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE

#define RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE   2

Definition at line 36 of file rtpdec_hevc.c.

◆ HEVC_SPECIFIED_NAL_UNIT_TYPES

#define HEVC_SPECIFIED_NAL_UNIT_TYPES   48

Definition at line 37 of file rtpdec_hevc.c.

Function Documentation

◆ hevc_sdp_parse_fmtp_config()

static av_cold int hevc_sdp_parse_fmtp_config ( AVFormatContext s,
AVStream stream,
PayloadContext hevc_data,
const char *  attr,
const char *  value 
)
static

Definition at line 49 of file rtpdec_hevc.c.

Referenced by hevc_parse_sdp_line().

◆ hevc_parse_sdp_line()

static av_cold int hevc_parse_sdp_line ( AVFormatContext ctx,
int  st_index,
PayloadContext hevc_data,
const char *  line 
)
static

Definition at line 131 of file rtpdec_hevc.c.

◆ hevc_handle_packet()

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

Definition at line 179 of file rtpdec_hevc.c.

Variable Documentation

◆ start_sequence

const uint8_t start_sequence[] = { 0x00, 0x00, 0x00, 0x01 }
static

Definition at line 47 of file rtpdec_hevc.c.

Referenced by hevc_handle_packet().

◆ ff_hevc_dynamic_handler

const RTPDynamicProtocolHandler ff_hevc_dynamic_handler
Initial value:
= {
.enc_name = "H265",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_HEVC,
.need_parsing = AVSTREAM_PARSE_FULL,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = hevc_parse_sdp_line,
}

Definition at line 343 of file rtpdec_hevc.c.

hevc_handle_packet
static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
Definition: rtpdec_hevc.c:179
hevc_parse_sdp_line
static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index, PayloadContext *hevc_data, const char *line)
Definition: rtpdec_hevc.c:131
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:224
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:1105
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVSTREAM_PARSE_FULL
@ AVSTREAM_PARSE_FULL
full parsing and repack
Definition: avformat.h:792
PayloadContext
RTP/JPEG specific private data.
Definition: rdt.c:83