43 13, 14, 16, 18, 20, 21, 27, 32, 6, 1, 1, 1, 1, 1, 1, 1
46 18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 1, 1, 1, 1, 1, 1
129 mode = (toc >> 3) & 0x0F;
152 if (read !=
size - 1) {
161 #if CONFIG_AMR_DEMUXER
173 #if CONFIG_AMRNB_DEMUXER
176 int mode,
i = 0, valid = 0, invalid = 0;
179 while (i < p->buf_size) {
181 if (
mode < 9 && (
b[
i] & 0x4) == 0x4) {
198 if (valid > 100 && valid >> 4 > invalid)
229 #if CONFIG_AMRWB_DEMUXER
232 int mode,
i = 0, valid = 0, invalid = 0;
235 while (i < p->buf_size) {
237 if (
mode < 10 && (
b[
i] & 0x4) == 0x4) {
254 if (valid > 100 && valid >> 4 > invalid)
289 .mime_type =
"audio/amr",
293 .write_header = amr_write_header,
static const uint8_t amrnb_packed_size[16]
static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
static const char AMRWB_header[]
static int amr_probe(const AVProbeData *p)
static int amr_read_header(AVFormatContext *s)
static const char AMR_header[]
static const uint8_t amrwb_packed_size[16]
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int avio_r8(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
audio channel layout utility functions
#define MKTAG(a, b, c, d)
mode
Use these values in ebur128_init (or'ed).
static int read_header(FFV1Context *f)
#define AV_CH_LAYOUT_MONO
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_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
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]
This struct describes the properties of an encoded stream.
uint64_t channel_layout
Audio only.
enum AVMediaType codec_type
General type of the encoded data.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
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.
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.