Go to the documentation of this file.
67 const uint8_t *buf,
int len, uint16_t seq,
70 int start_partition, end_packet;
71 int extended_bits, part_id;
72 int pictureid_present = 0, tl0picidx_present = 0, tid_present = 0,
74 int pictureid = -1, pictureid_mask = 0;
75 int returned_old_frame = 0;
76 uint32_t old_timestamp = 0;
94 extended_bits = buf[0] & 0x80;
95 start_partition = buf[0] & 0x10;
96 part_id = buf[0] & 0x0f;
103 pictureid_present = buf[0] & 0x80;
104 tl0picidx_present = buf[0] & 0x40;
105 tid_present = buf[0] & 0x20;
106 keyidx_present = buf[0] & 0x10;
110 if (pictureid_present) {
116 pictureid =
AV_RB16(buf) & 0x7fff;
117 pictureid_mask = 0x7fff;
121 pictureid = buf[0] & 0x7f;
122 pictureid_mask = 0x7f;
127 if (tl0picidx_present) {
132 if (tid_present || keyidx_present) {
140 if (start_partition && part_id == 0 &&
len >= 3) {
142 int non_key = buf[0] & 0x01;
156 if (pictureid >= 0) {
159 "Missed a picture, sequence broken\n");
161 if (vp8->
data && !can_continue)
163 "Missed a picture, sequence broken\n");
166 uint16_t expected_seq = vp8->
prev_seq + 1;
167 int16_t
diff = seq - expected_seq;
176 if ((
diff == 0 ||
diff == 1) && can_continue) {
180 "Missed too much, sequence broken\n");
185 "Missed unknown data, sequence broken\n");
195 returned_old_frame = 1;
211 uint16_t expected_seq = vp8->
prev_seq + 1;
219 "Received no start marker; dropping frame\n");
222 if (seq != expected_seq) {
225 "Missed part of a keyframe, sequence broken\n");
231 "Missed part of the first partition, sequence broken\n");
243 if (returned_old_frame) {
244 *timestamp = old_timestamp;
245 return end_packet ? 1 : 0;
#define AV_LOG_WARNING
Something somehow does not look correct.
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
static void vp8_close_context(PayloadContext *vp8)
#define RTP_FLAG_MARKER
RTP marker bit was set for this packet.
const RTPDynamicProtocolHandler ff_vp8_dynamic_handler
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
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
static int vp8_need_keyframe(PayloadContext *vp8)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
static int vp8_broken_sequence(AVFormatContext *ctx, PayloadContext *vp8, const char *msg)
int(* init)(AVBSFContext *ctx)
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int flags
A combination of AV_PKT_FLAG values.
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
int index
stream index in AVFormatContext
static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
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.
static av_cold int vp8_init(AVFormatContext *s, int st_index, PayloadContext *vp8)
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