46 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
47 32000, 44100, 48000, 64000, 88200, 96000, 192000, -1
82 uint32_t chmask,
flags;
112 bpp = ((flags & 3) + 1) << 3;
115 rate =
wv_rates[(flags >> 23) & 0xF];
125 "Cannot determine additional parameters\n");
139 "Insufficient channel information\n");
158 chan |= (
avio_r8(pb) & 0xF) << 8;
163 "Invalid channel info size %d\n", size);
178 "Cannot determine custom sampling rate\n");
192 if (flags && bpp != wc->
bpp) {
194 "Bits per sample differ, this block: %i, header block: %i\n",
200 "Channels differ, this block: %i, header block: %i\n",
204 if (flags && rate != -1 && rate != wc->
rate) {
206 "Sampling rate differ, this block: %i, header block: %i\n",
262 uint32_t block_samples;
304 if (block_samples > INT32_MAX)
306 "Too many samples in block: %"PRIu32
"\n", block_samples);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
uint8_t block_header[WV_HEADER_SIZE]
#define AV_LOG_WARNING
Something somehow does not look correct.
int64_t pos
byte position in stream, -1 if unknown
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
void ff_id3v1_read(AVFormatContext *s)
Read an ID3v1 tag.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
static int wv_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#define AV_CH_LAYOUT_STEREO
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
static int wv_probe(AVProbeData *p)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
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.
AVDictionary * metadata
Metadata that applies to the whole file.
AVInputFormat ff_wv_demuxer
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int avio_r8(AVIOContext *s)
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 seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
audio channel layout utility functions
static const int wv_rates[16]
int ff_wv_parse_header(WvHeader *wv, const uint8_t *data)
Parse a WavPack block header.
static int read_header(FFV1Context *f)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
AVIOContext * pb
I/O context.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
This structure contains the data a format has to probe a file.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
unsigned int avio_rl16(AVIOContext *s)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
static int wv_read_header(AVFormatContext *s)
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
void * priv_data
Format private data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
AVCodecParameters * codecpar
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
unsigned int avio_rl24(AVIOContext *s)
static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
#define AV_CH_LAYOUT_MONO
#define MKTAG(a, b, c, d)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
#define WV_FLAG_FINAL_BLOCK
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...