40 #define AUD_HEADER_SIZE 12
41 #define AUD_CHUNK_PREAMBLE_SIZE 8
42 #define AUD_CHUNK_SIGNATURE 0x0000DEAF
44 #define FORM_TAG MKBETAG('F', 'O', 'R', 'M')
45 #define WVQA_TAG MKBETAG('W', 'V', 'Q', 'A')
46 #define VQHD_TAG MKBETAG('V', 'Q', 'H', 'D')
47 #define FINF_TAG MKBETAG('F', 'I', 'N', 'F')
48 #define SND0_TAG MKBETAG('S', 'N', 'D', '0')
49 #define SND1_TAG MKBETAG('S', 'N', 'D', '1')
50 #define SND2_TAG MKBETAG('S', 'N', 'D', '2')
51 #define VQFR_TAG MKBETAG('V', 'Q', 'F', 'R')
54 #define CINF_TAG MKBETAG('C', 'I', 'N', 'F')
55 #define CINH_TAG MKBETAG('C', 'I', 'N', 'H')
56 #define CIND_TAG MKBETAG('C', 'I', 'N', 'D')
57 #define PINF_TAG MKBETAG('P', 'I', 'N', 'F')
58 #define PINH_TAG MKBETAG('P', 'I', 'N', 'H')
59 #define PIND_TAG MKBETAG('P', 'I', 'N', 'D')
60 #define CMDS_TAG MKBETAG('C', 'M', 'D', 'S')
62 #define VQA_HEADER_SIZE 0x2A
63 #define VQA_FRAMERATE 15
64 #define VQA_PREAMBLE_SIZE 8
105 if ((field < 8000) || (field > 48000))
110 if (p->
buf[10] & 0xFC)
115 if (p->
buf[11] != 99)
137 if (header[11] == 99)
145 wsaud->
audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8;
174 unsigned int chunk_size;
185 chunk_size =
AV_RL16(&preamble[0]);
187 if (ret != chunk_size)
219 unsigned char *header;
221 unsigned int chunk_tag;
222 unsigned int chunk_size;
283 chunk_tag =
AV_RB32(&scratch[0]);
284 chunk_size =
AV_RB32(&scratch[4]);
300 scratch[0], scratch[1],
301 scratch[2], scratch[3]);
318 unsigned int chunk_type;
319 unsigned int chunk_size;
323 chunk_type =
AV_RB32(&preamble[0]);
324 chunk_size =
AV_RB32(&preamble[4]);
325 skip_byte = chunk_size & 0x01;
337 if (ret != chunk_size) {
373 #if CONFIG_WSAUD_DEMUXER
383 #if CONFIG_WSVQA_DEMUXER
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AV_WL32 AV_WL24 AV_WL16 AV_RB32
int64_t audio_frame_counter
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
#define VQA_PREAMBLE_SIZE
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static int read_header(FFV1Context *f)
void av_free_packet(AVPacket *pkt)
Free a packet.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
AVCodecContext * codec
codec context
static int wsaud_read_header(AVFormatContext *s, AVFormatParameters *ap)
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.
int64_t audio_frame_counter
int bit_rate
the average bitrate
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(AVProbeData *p)
enum AVMediaType codec_type
int sample_rate
samples per second
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int wsvqa_probe(AVProbeData *p)
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
struct WsVqaDemuxContext WsVqaDemuxContext
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
This structure contains the data a format has to probe a file.
#define AUD_CHUNK_SIGNATURE
#define AUD_CHUNK_PREAMBLE_SIZE
CodecID
Identify the syntax and semantics of the bitstream.
int channels
number of audio channels
void * priv_data
Format private data.
static int wsaud_probe(AVProbeData *p)
struct WsAudDemuxContext WsAudDemuxContext
static int wsvqa_read_header(AVFormatContext *s, AVFormatParameters *ap)
static int wsvqa_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...