Go to the documentation of this file.
27 #define RTP_VP9_DESC_REQUIRED_SIZE 1
38 "RTP/VP9 support is still experimental\n");
45 const uint8_t *buf,
int len, uint16_t seq,
48 int has_pic_id, has_layer_idc, has_ref_idc, has_ss_data;
49 av_unused int pic_id = 0, non_key_frame = 0, inter_picture_layer_frame;
50 av_unused int layer_temporal = -1, layer_spatial = -1, layer_quality = -1;
51 int ref_fields = 0, has_ref_field_ext_pic_id = 0;
52 int first_fragment, last_fragment;
57 if (rtp_vp9_ctx->
buf && rtp_vp9_ctx->
timestamp != *timestamp)
82 has_pic_id = !!(buf[0] & 0x80);
83 inter_picture_layer_frame = !!(buf[0] & 0x40);
84 has_layer_idc = !!(buf[0] & 0x20);
85 has_ref_idc = !!(buf[0] & 0x10);
86 first_fragment = !!(buf[0] & 0x08);
87 last_fragment = !!(buf[0] & 0x04);
88 has_ss_data = !!(buf[0] & 0x02);
93 if (last_fragment != rtp_m) {
94 av_log(
ctx,
AV_LOG_ERROR,
"Invalid combination of B and M marker (%d != %d)\n", last_fragment, rtp_m);
122 pic_id =
AV_RB16(buf) & 0x7fff;
126 pic_id = buf[0] & 0x7f;
149 layer_temporal = buf[0] & 0xC0;
150 layer_spatial = buf[0] & 0x30;
151 layer_quality = buf[0] & 0x0C;
153 ref_fields = buf[0] & 0x03;
182 has_ref_field_ext_pic_id = buf[0] & 0x10;
185 if (has_ref_field_ext_pic_id) {
231 y = !!(buf[0] & 0x10);
232 g = !!(buf[0] & 0x08);
240 if (
len < 4 * (n_s + 1)) {
244 for (
i = 0;
i < n_s + 1;
i++) {
261 for (
i = 0;
i < n_g;
i++) {
268 u = !!(buf[0] & 0x10);
269 r = (buf[0] >> 2) & 0x03;
276 for (j = 0; j <
r; j++) {
299 if (!rtp_vp9_ctx->
buf) {
301 if (first_fragment) {
#define AV_LOG_WARNING
Something somehow does not look correct.
static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
static av_cold int vp9_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
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
#define u(width, name, range_min, range_max)
static void vp9_close_context(PayloadContext *vp9)
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx)
Close the dynamic buffer and make a packet from it.
uint32_t timestamp
current frame timestamp
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
int(* init)(AVBSFContext *ctx)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
#define i(width, name, range_min, range_max)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
#define RTP_VP9_DESC_REQUIRED_SIZE
uint8_t * buf
the temporary storage buffer
int index
stream index in AVFormatContext
const RTPDynamicProtocolHandler ff_vp9_dynamic_handler
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.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16