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.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
#define AV_CH_LAYOUT_STEREO
#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]
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
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.
#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.
#define AUD_CHUNK_SIGNATURE
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.
AVInputFormat ff_wsaud_demuxer
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt)
static int wsaud_probe(AVProbeData *p)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.