Go to the documentation of this file.
47 uint8_t
buf[0x80][0x800];
77 const uint8_t *buf,
const uint8_t *end)
79 const uint8_t *p = buf;
82 while (end - p >= 2) {
83 unsigned int item_len = p[0], config_item = p[1];
85 if (item_len < 2 || end - p < item_len || config_item > 4)
88 switch (config_item) {
90 return p - buf + item_len;
154 const uint8_t *buf,
const uint8_t *end)
156 const uint8_t *p = buf;
169 if (end - p <
len + (
type == 0x7F) ||
id >= 0x80)
175 to_copy =
FFMIN(
len + (p - &buf[1]), 0x800 - qdm->
len[
id]);
176 memcpy(&qdm->
buf[
id][qdm->
len[
id]], buf + 1, to_copy);
177 qdm->
len[
id] += to_copy;
179 return p +
len - buf;
189 int to_copy, n, res, include_csum;
190 uint8_t *p, *csum_pos =
NULL;
194 for (n = 0; n < 0x80; n++)
206 if (qdm->
len[n] > 0xff) {
221 memcpy(p, qdm->
buf[n], to_copy);
226 unsigned int total = 0;
231 AV_WB16(csum_pos, (uint16_t) total);
241 const uint8_t *buf,
int len, uint16_t seq,
245 const uint8_t *end = buf +
len, *p = buf;
255 "Out of sequence config - dropping queue\n");
257 memset(qdm->
len, 0,
sizeof(qdm->
len));
275 while (end - p >= 4) {
285 for (n = 0; n < 0x80; n++)
293 if (--qdm->
cache == 0)
299 return (qdm->
cache > 0) ? 1 : 0;
unsigned int n_pkts
number of RTP packets received since last packet output / config
#define AV_LOG_WARNING
Something somehow does not look correct.
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
uint32_t timestamp
current frame timestamp
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 type
static int qdm2_parse_subpacket(PayloadContext *qdm, AVStream *st, const uint8_t *buf, const uint8_t *end)
Parse a single subpacket.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int qdm2_restore_block(PayloadContext *qdm, AVStream *st, AVPacket *pkt)
Add a superblock header around a set of subpackets.
int block_size
from extradata, used as pkt length
static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
return 0 on packet, no more left, 1 on packet, -1 on partial packet...
int subpkts_per_block
max. nr. of subpackets to add per output buffer
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_RB32
static int qdm2_parse_config(PayloadContext *qdm, AVStream *st, const uint8_t *buf, const uint8_t *end)
Parse configuration (basically the codec-specific extradata) from an RTP config subpacket (starts wit...
uint8_t * buf
the temporary storage buffer
int index
stream index in AVFormatContext
int block_type
values read from the config header, used as packet headers
unsigned int cache
number of data packets that we have cached right now
static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
Parse a packet, add all split parts to parse_queue.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
const RTPDynamicProtocolHandler ff_qdm2_dynamic_handler
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