Go to the documentation of this file.
31 #define RTP_HEVC_PAYLOAD_HEADER_SIZE 2
32 #define RTP_HEVC_FU_HEADER_SIZE 1
33 #define RTP_HEVC_DONL_FIELD_SIZE 2
34 #define RTP_HEVC_DOND_FIELD_SIZE 1
35 #define RTP_HEVC_AP_NALU_LENGTH_FIELD_SIZE 2
36 #define HEVC_SPECIFIED_NAL_UNIT_TYPES 48
51 const char *attr,
const char *
value)
55 if (!strcmp(attr,
"profile-id")) {
72 if (!strcmp(attr,
"sprop-vps") || !strcmp(attr,
"sprop-sps") ||
73 !strcmp(attr,
"sprop-pps") || !strcmp(attr,
"sprop-sei")) {
74 uint8_t **data_ptr =
NULL;
76 if (!strcmp(attr,
"sprop-vps")) {
77 data_ptr = &hevc_data->
vps;
79 }
else if (!strcmp(attr,
"sprop-sps")) {
80 data_ptr = &hevc_data->
sps;
82 }
else if (!strcmp(attr,
"sprop-pps")) {
83 data_ptr = &hevc_data->
pps;
85 }
else if (!strcmp(attr,
"sprop-sei")) {
86 data_ptr = &hevc_data->
sei;
105 if (!strcmp(attr,
"sprop-max-don-diff")) {
113 if (!strcmp(attr,
"sprop-depack-buf-nalus")) {
135 const char *sdp_line_ptr =
line;
143 if (
av_strstart(sdp_line_ptr,
"framesize:", &sdp_line_ptr)) {
145 }
else if (
av_strstart(sdp_line_ptr,
"fmtp:", &sdp_line_ptr)) {
180 const uint8_t *buf,
int len, uint16_t seq,
183 const uint8_t *rtp_pl = buf;
184 int tid, lid, nal_type;
185 int first_fragment, last_fragment, fu_type;
186 uint8_t new_nal_header[2];
209 nal_type = (buf[0] >> 1) & 0x3f;
210 lid = ((buf[0] << 5) & 0x20) | ((buf[1] >> 3) & 0x1f);
289 first_fragment = buf[0] & 0x80;
290 last_fragment = buf[0] & 0x40;
291 fu_type = buf[0] & 0x3f;
309 "Too short RTP/HEVC packet, got %d bytes of NAL unit type %d\n",
317 if (first_fragment && last_fragment) {
322 new_nal_header[0] = (rtp_pl[0] & 0x81) | (fu_type << 1);
323 new_nal_header[1] = rtp_pl[1];
326 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