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]);
148 scratch[0], scratch[1],
149 scratch[2], scratch[3]);
171 chunk_type =
AV_RB32(&preamble[0]);
172 chunk_size =
AV_RB32(&preamble[4]);
174 skip_byte = chunk_size & 0x01;
183 switch (chunk_type) {
206 switch (chunk_type) {
208 if (wsvqa->
bps == 16)
226 switch (chunk_type) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
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 bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
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. ...
AVCodecContext * codec
Codec context associated with this stream.
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.
int width
picture width / height.
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.
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
static int wsvqa_probe(AVProbeData *p)
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
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.
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
int channels
number of audio channels
void * priv_data
Format private data.
This structure stores compressed data.