31 #include "libavutil/intreadwrite.h"
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
116 if (fps < 1 || fps > 30) {
125 wsvqa->
bps = header[27];
135 chunk_tag =
AV_RB32(&scratch[0]);
136 chunk_size =
AV_RB32(&scratch[4]);
152 scratch[0], scratch[1],
153 scratch[2], scratch[3]);
175 chunk_type =
AV_RB32(&preamble[0]);
176 chunk_size =
AV_RB32(&preamble[4]);
178 skip_byte = chunk_size & 0x01;
187 switch (chunk_type) {
210 switch (chunk_type) {
212 if (wsvqa->
bps == 16)
230 switch (chunk_type) {
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
static int wsvqa_read_packet(AVFormatContext *s, AVPacket *pkt)
int ctx_flags
Format-specific flags, see AVFMTCTX_xx.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int buf_size
Size of buf except extra allocated bytes.
int width
picture width / height.
static int read_header(FFV1Context *f)
#define VQA_PREAMBLE_SIZE
#define AV_LOG_INFO
Standard information.
enum AVMediaType codec_type
int sample_rate
samples per second
static int wsvqa_probe(AVProbeData *p)
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
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
#define AVERROR_INVALIDDATA
int channels
number of audio channels
This structure stores compressed data.