41 #define AUD_HEADER_SIZE 12
42 #define AUD_CHUNK_PREAMBLE_SIZE 8
43 #define AUD_CHUNK_SIGNATURE 0x0000DEAF
64 if ((field < 8000) || (field > 48000))
69 if (p->
buf[10] & 0xFC)
72 if (p->
buf[11] != 99 && p->
buf[11] != 1)
134 unsigned int chunk_size;
146 chunk_size =
AV_RL16(&preamble[0]);
157 return ret < 0 ? ret :
AVERROR(EIO);
164 if (ret != chunk_size)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
audio channel layout utility functions
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_STEREO
@ AV_CODEC_ID_ADPCM_IMA_WS
@ AV_CODEC_ID_WESTWOOD_SND1
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 AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const uint8_t header[24]
uint64_t channel_layout
Audio only.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
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.
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.
This structure contains the data a format has to probe a file.
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.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int index
stream index in AVFormatContext
#define avpriv_request_sample(...)
#define AUD_CHUNK_SIGNATURE
static int wsaud_read_header(AVFormatContext *s)
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt)
#define AUD_CHUNK_PREAMBLE_SIZE
AVInputFormat ff_wsaud_demuxer
static int wsaud_probe(const AVProbeData *p)