24 #include "libavutil/intreadwrite.h"
25 #include "libavutil/dict.h"
26 #include "libavutil/mathematics.h"
40 if (!memcmp(probe_packet->
buf + 4,
"97012000", 8))
43 if (!memcmp(probe_packet->
buf + 4,
"00052200", 8))
50 unsigned int tag_len,
unsigned int remaining)
53 char *
buf, key[5] = {0};
68 {
"(c) ",
"copyright" },
69 {
"ARNG",
"arranger" },
72 {
"CDCT",
"conductor" },
73 {
"COMT",
"comment" },
74 {
"FILE",
"filename" },
76 {
"LABL",
"publisher" },
77 {
"MUSC",
"composer" },
80 {
"PROD",
"producer" },
81 {
"PRSN",
"personnel" },
82 {
"REMX",
"remixer" },
115 if (chunk_tag ==
MKTAG(
'D',
'A',
'T',
'A'))
120 if ((
unsigned) len > INT_MAX/2) {
128 case MKTAG(
'C',
'O',
'M',
'M'):
131 read_bitrate =
AV_RB32(comm_chunk + 4);
132 rate_flag =
AV_RB32(comm_chunk + 8);
142 case MKTAG(
'D',
'S',
'I',
'Z'):
147 snprintf(buf,
sizeof(buf),
"%d", size);
151 case MKTAG(
'Y',
'E',
'A',
'R'):
152 case MKTAG(
'E',
'N',
'C',
'D'):
153 case MKTAG(
'E',
'X',
'T',
'R'):
154 case MKTAG(
'_',
'Y',
'M',
'H'):
155 case MKTAG(
'_',
'N',
'T',
'T'):
156 case MKTAG(
'_',
'I',
'D',
'3'):
166 }
while (header_size >= 0 && !
url_feof(s->
pb));
182 if (rate_flag < 8 || rate_flag > 44) {
261 int stream_index, int64_t timestamp,
int flags)
294 .extensions =
"vqf,vql,vqe",
static int vqf_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const
Rescale a 64-bit integer with specified rounding.
int64_t pos
byte position in stream, -1 if unknown
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
AVCodecContext * codec
Codec context associated with this stream.
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...
int64_t data_offset
offset of the first packet
static int vqf_probe(AVProbeData *probe_packet)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
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.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#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. ...
AVInputFormat ff_vqf_demuxer
int bit_rate
the average bitrate
int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const
Rescale a 64-bit integer with rounding to nearest.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int vqf_read_header(AVFormatContext *s)
static const AVMetadataConv vqf_metadata_conv[]
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define MKTAG(a, b, c, d)
This structure contains the data a format has to probe a file.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
#define AVERROR_INVALIDDATA
int channels
number of audio channels
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
This structure stores compressed data.
static void add_metadata(AVFormatContext *s, uint32_t tag, unsigned int tag_len, unsigned int remaining)