53 if (p->
buf[0] ==
'.' && p->
buf[1] ==
's' &&
54 p->
buf[2] ==
'n' && p->
buf[3] ==
'd')
66 unsigned int id, channels, rate;
72 if (tag !=
MKTAG(
'.',
's',
'n',
'd'))
88 if (channels == 0 || channels > 64) {
111 #define BLOCK_SIZE 1024
134 .read_probe = au_probe,
135 .read_header = au_read_header,
136 .read_packet = au_read_packet,
145 #define AU_UNKNOWN_SIZE ((uint32_t)(~0))
194 avio_wb32(pb, (uint32_t)(file_size - 24));
206 .mime_type =
"audio/basic",
210 .write_header = au_write_header,
211 .write_packet = au_write_packet,
212 .write_trailer = au_write_trailer,
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
unsigned int avio_rb32(AVIOContext *s)
#define MKTAG(a, b, c, d)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
AVCodecID
Identify the syntax and semantics of the bitstream.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
void av_log_ask_for_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message asking for a sample.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
int void avio_flush(AVIOContext *s)
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static const AVCodecTag codec_au_tags[]
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
This structure contains the data a format has to probe a file.
#define AVERROR_INVALIDDATA
#define AVPROBE_SCORE_MAX
#define AVERROR_PATCHWELCOME
int channels
number of audio channels
void * priv_data
Format private data.
void avio_wb32(AVIOContext *s, unsigned int val)
This structure stores compressed data.