35 #define FORM_TAG MKBETAG('F', 'O', 'R', 'M') 36 #define WVQA_TAG MKBETAG('W', 'V', 'Q', 'A') 37 #define VQHD_TAG MKBETAG('V', 'Q', 'H', 'D') 38 #define FINF_TAG MKBETAG('F', 'I', 'N', 'F') 39 #define SND0_TAG MKBETAG('S', 'N', 'D', '0') 40 #define SND1_TAG MKBETAG('S', 'N', 'D', '1') 41 #define SND2_TAG MKBETAG('S', 'N', 'D', '2') 42 #define VQFR_TAG MKBETAG('V', 'Q', 'F', 'R') 45 #define CINF_TAG MKBETAG('C', 'I', 'N', 'F') 46 #define CINH_TAG MKBETAG('C', 'I', 'N', 'H') 47 #define CIND_TAG MKBETAG('C', 'I', 'N', 'D') 48 #define PINF_TAG MKBETAG('P', 'I', 'N', 'F') 49 #define PINH_TAG MKBETAG('P', 'I', 'N', 'H') 50 #define PIND_TAG MKBETAG('P', 'I', 'N', 'D') 51 #define CMDS_TAG MKBETAG('C', 'M', 'D', 'S') 53 #define VQA_HEADER_SIZE 0x2A 54 #define VQA_PREAMBLE_SIZE 8 112 if (fps < 1 || fps > 30) {
121 wsvqa->
bps = header[27];
131 chunk_tag =
AV_RB32(&scratch[0]);
132 chunk_size =
AV_RB32(&scratch[4]);
170 chunk_type =
AV_RB32(&preamble[0]);
171 chunk_size =
AV_RB32(&preamble[4]);
173 skip_byte = chunk_size & 0x01;
182 switch (chunk_type) {
205 switch (chunk_type) {
207 if (wsvqa->
bps == 16)
225 switch (chunk_type) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int wsvqa_read_packet(AVFormatContext *s, AVPacket *pkt)
int ctx_flags
Flags signalling stream properties.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
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 const uint8_t header[24]
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define av_fourcc2str(fourcc)
enum AVMediaType codec_type
General type of the encoded data.
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define VQA_PREAMBLE_SIZE
#define AV_LOG_INFO
Standard information.
AVIOContext * pb
I/O context.
AVInputFormat ff_wsvqa_demuxer
This structure contains the data a format has to probe a file.
static int wsvqa_read_header(AVFormatContext *s)
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
int64_t nb_frames
number of frames in this stream if known or 0
static int wsvqa_probe(const AVProbeData *p)
void * priv_data
Format private data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
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 structure stores compressed data.