33#define WV_MONO 0x00000004U
34#define WV_HYBRID 0x00000008U
35#define WV_JOINT 0x00000010U
36#define WV_CROSSD 0x00000020U
37#define WV_HSHAPE 0x00000040U
38#define WV_FLOAT 0x00000080U
39#define WV_INT32 0x00000100U
40#define WV_HBR 0x00000200U
41#define WV_HBAL 0x00000400U
42#define WV_MCINIT 0x00000800U
43#define WV_MCEND 0x00001000U
44#define WV_DSD 0x80000000U
47 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
48 32000, 44100, 48000, 64000, 88200, 96000, 192000, -1
66 if (p->buf_size <= 32)
83 uint32_t chmask,
flags;
128 "Cannot determine additional parameters\n");
142 "Insufficient channel information\n");
161 chan |= (
avio_r8(pb) & 0xF) << 8;
167 chan |= (
avio_r8(pb) & 0xF) << 8;
173 "Invalid channel info size %d\n",
size);
180 "Invalid DSD block\n");
183 rate_x = 1U << (
avio_r8(pb) & 0x1f);
196 if (rate == -1 || rate * (uint64_t)rate_x >= INT_MAX) {
198 "Cannot determine custom sampling rate\n");
210 wc->
rate = rate * rate_x;
214 "Bits per sample differ, this block: %i, header block: %i\n",
220 "Channels differ, this block: %i, header block: %i\n",
226 "Sampling rate differ, this block: %i, header block: %i\n",
227 rate * rate_x, wc->
rate);
284 uint32_t block_samples;
317 pkt->stream_index = 0;
322 if (block_samples > INT32_MAX)
324 "Too many samples in block: %"PRIu32
"\n", block_samples);
326 pkt->duration = block_samples;
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
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.
unsigned int avio_rl16(AVIOContext *s)
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_rl24(AVIOContext *s)
int avio_r8(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
static int read_probe(const AVProbeData *p)
Public libavutil channel layout APIs header.
static int read_header(FFV1Context *f, RangeCoder *c)
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_STEREO
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
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 struct AVCodec *c)
Add a new stream to a media file.
int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void ff_id3v1_read(AVFormatContext *s)
Read an ID3v1 tag.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
#define MKTAG(a, b, c, d)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
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
The number of audio samples per second.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
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.
uint8_t block_header[WV_HEADER_SIZE]
static AVFormatContext * ctx
static const int wv_rates[16]
int ff_wv_parse_header(WvHeader *wv, const uint8_t *data)
Parse a WavPack block header.
#define WV_FLAG_FINAL_BLOCK
static int wv_read_packet(AVFormatContext *s, AVPacket *pkt)
static int wv_read_header(AVFormatContext *s)
static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
static int wv_probe(const AVProbeData *p)