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)
93 sample_rate =
AV_RL16(&header[0]);
94 channels = (header[10] & 0x1) + 1;
134 unsigned int chunk_size;
146 chunk_size =
AV_RL16(&preamble[0]);
156 if ((ret =
avio_read(pb, &pkt->
data[4], chunk_size)) != chunk_size)
157 return ret < 0 ? ret :
AVERROR(EIO);
164 if (ret != chunk_size)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t bit_rate
the average bitrate
int index
stream index in AVFormatContext
#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
#define AUD_CHUNK_PREAMBLE_SIZE
static int wsaud_read_header(AVFormatContext *s)
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
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.
AVStream ** streams
A list of all streams in the file.
static const uint8_t header[24]
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
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 NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AUD_CHUNK_SIGNATURE
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
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.
audio channel layout utility functions
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
enum AVMediaType codec_type
AVInputFormat ff_wsaud_demuxer
int sample_rate
samples per second
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt)
static int wsaud_probe(AVProbeData *p)
int channels
number of audio channels
#define AV_CH_LAYOUT_MONO
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.