Go to the documentation of this file.
32 #define RTP_HEVC_PAYLOAD_HEADER_SIZE 2
33 #define RTP_HEVC_FU_HEADER_SIZE 1
34 #define RTP_HEVC_DONL_FIELD_SIZE 2
35 #define RTP_HEVC_DOND_FIELD_SIZE 1
36 #define RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE 2
37 #define HEVC_SPECIFIED_NAL_UNIT_TYPES 48
52 const char *attr,
const char *
value)
56 if (!strcmp(attr,
"profile-id")) {
73 if (!strcmp(attr,
"sprop-vps") || !strcmp(attr,
"sprop-sps") ||
74 !strcmp(attr,
"sprop-pps") || !strcmp(attr,
"sprop-sei")) {
75 uint8_t **data_ptr =
NULL;
77 if (!strcmp(attr,
"sprop-vps")) {
78 data_ptr = &hevc_data->
vps;
80 }
else if (!strcmp(attr,
"sprop-sps")) {
81 data_ptr = &hevc_data->
sps;
83 }
else if (!strcmp(attr,
"sprop-pps")) {
84 data_ptr = &hevc_data->
pps;
86 }
else if (!strcmp(attr,
"sprop-sei")) {
87 data_ptr = &hevc_data->
sei;
106 if (!strcmp(attr,
"sprop-max-don-diff")) {
114 if (!strcmp(attr,
"sprop-depack-buf-nalus")) {
136 const char *sdp_line_ptr =
line;
144 if (
av_strstart(sdp_line_ptr,
"framesize:", &sdp_line_ptr)) {
146 }
else if (
av_strstart(sdp_line_ptr,
"fmtp:", &sdp_line_ptr)) {
181 const uint8_t *buf,
int len, uint16_t seq,
184 const uint8_t *rtp_pl = buf;
185 int tid, lid, nal_type;
186 int first_fragment, last_fragment, fu_type;
187 uint8_t new_nal_header[2];
210 nal_type = (buf[0] >> 1) & 0x3f;
211 lid = ((buf[0] << 5) & 0x20) | ((buf[1] >> 3) & 0x1f);
290 first_fragment = buf[0] & 0x80;
291 last_fragment = buf[0] & 0x40;
292 fu_type = buf[0] & 0x3f;
310 "Too short RTP/HEVC packet, got %d bytes of NAL unit type %d\n",
318 if (first_fragment && last_fragment) {
323 new_nal_header[0] = (rtp_pl[0] & 0x81) | (fu_type << 1);
324 new_nal_header[1] = rtp_pl[1];
327 new_nal_header,
sizeof(new_nal_header));
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
This struct describes the properties of an encoded stream.
int ff_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value))
#define RTP_HEVC_PAYLOAD_HEADER_SIZE
AVStream ** streams
A list of all streams in the file.
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)
#define RTP_HEVC_FU_HEADER_SIZE
static const uint8_t start_sequence[]
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index, PayloadContext *hevc_data, const char *line)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define RTP_HEVC_DONL_FIELD_SIZE
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
int extradata_size
Size of the extradata content in bytes.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
const RTPDynamicProtocolHandler ff_hevc_dynamic_handler
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
#define RTP_HEVC_DOND_FIELD_SIZE
static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, const char *attr, const char *value)
int index
stream index in AVFormatContext
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
RTP/JPEG specific private data.
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line