FFmpeg
Loading...
Searching...
No Matches
rtpdec_hevc.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/mem.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/AV1 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 31 of file rtpdec_hevc.c.

Referenced by hevc_handle_packet().

◆ RTP_HEVC_FU_HEADER_SIZE

#define RTP_HEVC_FU_HEADER_SIZE   1

Definition at line 32 of file rtpdec_hevc.c.

Referenced by hevc_handle_packet().

◆ RTP_HEVC_DONL_FIELD_SIZE

#define RTP_HEVC_DONL_FIELD_SIZE   2

Definition at line 33 of file rtpdec_hevc.c.

Referenced by hevc_handle_packet().

◆ RTP_HEVC_DOND_FIELD_SIZE

#define RTP_HEVC_DOND_FIELD_SIZE   1

Definition at line 34 of file rtpdec_hevc.c.

Referenced by hevc_handle_packet().

◆ RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE

#define RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE   2

Definition at line 35 of file rtpdec_hevc.c.

◆ HEVC_SPECIFIED_NAL_UNIT_TYPES

#define HEVC_SPECIFIED_NAL_UNIT_TYPES   48

Definition at line 36 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 48 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 130 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 178 of file rtpdec_hevc.c.

Variable Documentation

◆ start_sequence

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

Definition at line 46 of file rtpdec_hevc.c.

◆ 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,
}
@ AVSTREAM_PARSE_FULL
full parsing and repack
Definition avformat.h:611
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:1178
@ AV_CODEC_ID_HEVC
Definition codec_id.h:223
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
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 av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index, PayloadContext *hevc_data, const char *line)
RTP/AV1 specific private data.
Definition rdt.c:85

Definition at line 342 of file rtpdec_hevc.c.