43#define AUD_HEADER_SIZE 12
44#define AUD_CHUNK_PREAMBLE_SIZE 8
45#define AUD_CHUNK_SIGNATURE 0x0000DEAF
66 if ((field < 8000) || (field > 48000))
71 if (p->buf[10] & 0xFC)
74 if (p->buf[11] != 99 && p->buf[11] != 1)
135 unsigned int chunk_size;
146 chunk_size =
AV_RL16(&preamble[0]);
164 if (ret != chunk_size)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
Public libavutil channel layout APIs header.
@ 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 struct AVCodec *c)
Add a new stream to a media file.
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
#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.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const uint8_t header[24]
int nb_channels
Number of channels in this layout.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
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
The number of audio samples per second.
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.
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
static int wsaud_probe(const AVProbeData *p)