40 if (!memcmp(probe_packet->
buf + 4,
"97012000", 8))
43 if (!memcmp(probe_packet->
buf + 4,
"00052200", 8))
53 unsigned int tag_len,
unsigned int remaining)
56 char *buf,
key[5] = {0};
71 {
"(c) ",
"copyright" },
72 {
"ARNG",
"arranger" },
75 {
"CDCT",
"conductor" },
76 {
"COMT",
"comment" },
77 {
"FILE",
"filename" },
79 {
"LABL",
"publisher" },
80 {
"MUSC",
"composer" },
83 {
"PROD",
"producer" },
84 {
"PRSN",
"personnel" },
85 {
"REMX",
"remixer" },
121 if (chunk_tag ==
MKTAG(
'D',
'A',
'T',
'A'))
126 if ((
unsigned)
len > INT_MAX/2 || header_size < 8) {
134 case MKTAG(
'C',
'O',
'M',
'M'):
140 read_bitrate =
AV_RB32(comm_chunk + 4);
141 rate_flag =
AV_RB32(comm_chunk + 8);
151 case MKTAG(
'D',
'S',
'I',
'Z'):
156 case MKTAG(
'Y',
'E',
'A',
'R'):
157 case MKTAG(
'E',
'N',
'C',
'D'):
158 case MKTAG(
'E',
'X',
'T',
'R'):
159 case MKTAG(
'_',
'Y',
'M',
'H'):
160 case MKTAG(
'_',
'N',
'T',
'T'):
161 case MKTAG(
'_',
'I',
'D',
'3'):
171 }
while (header_size >= 0 && !
avio_feof(
s->pb));
187 if (rate_flag < 8 || rate_flag > 44) {
241 int size = (
c->frame_bit_len -
c->remaining_bits + 7)>>3;
250 pkt->
data[0] = 8 -
c->remaining_bits;
259 c->remaining_bits = (
size << 3) -
c->frame_bit_len +
c->remaining_bits;
272 st =
s->streams[stream_index];
278 pos *=
c->frame_bit_len;
283 if ((ret =
avio_seek(
s->pb, ((
pos-7) >> 3) +
s->internal->data_offset, SEEK_SET)) < 0)
286 c->remaining_bits = -7 - ((
pos-7)&7);
298 .extensions =
"vqf,vql,vqe",
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
unsigned int avio_rb32(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
#define MKTAG(a, b, c, d)
static int read_header(FFV1Context *f)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set that converts the value to a string and stores it.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
@ AV_ROUND_DOWN
Round toward -infinity.
@ AV_ROUND_UP
Round toward +infinity.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
internal header for RIFF based (de)muxers do NOT include this in end user applications
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
This structure stores compressed data.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
static int vqf_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
static const AVMetadataConv vqf_metadata_conv[]
static int vqf_probe(const AVProbeData *probe_packet)
static void add_metadata(AVFormatContext *s, uint32_t tag, unsigned int tag_len, unsigned int remaining)
AVInputFormat ff_vqf_demuxer
static int vqf_read_header(AVFormatContext *s)