22 #include "libavutil/dict.h"
23 #include "libavutil/error.h"
24 #include "libavutil/log.h"
25 #include "libavutil/mathematics.h"
26 #include "libavcodec/avcodec.h"
33 {
AV_CODEC_ID_AC3, { 0x2C, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
34 {
AV_CODEC_ID_ATRAC3P, { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB, 0x71, 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
35 {
AV_CODEC_ID_EAC3, { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D, 0xFB, 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
36 {
AV_CODEC_ID_MP2, { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
64 if (!memcmp(subformat + 4,
102 cbSize =
FFMIN(size, cbSize);
103 if (cbSize >= 22 &&
id == 0xfffe) {
177 int64_t start, end, cur;
193 if (chunk_size > end ||
194 end - chunk_size < cur ||
195 chunk_size == UINT_MAX) {
200 chunk_size += (chunk_size & 1);
215 "out of memory, unable to read INFO tag\n");
221 if (
avio_read(pb, value, chunk_size) != chunk_size) {
224 "premature end of file while reading INFO tag\n");
228 value[chunk_size] = 0;
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_always_inline int ff_get_guid(AVIOContext *s, ff_asf_guid *g)
#define AV_LOG_WARNING
Something somehow does not look correct.
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define FF_MEDIASUBTYPE_BASE_GUID
static void parse_waveformatex(AVIOContext *pb, AVCodecContext *c)
#define AVERROR_EOF
End of file.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
const AVCodecTag ff_codec_wav_tags[]
uint64_t channel_layout
Audio channel layout.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int bit_rate
the average bitrate
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
int width
picture width / height.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
int ff_get_bmp_header(AVIOContext *pb, AVStream *st)
Read BITMAPINFOHEADER structure and set AVStream codec width, height and bits_per_encoded_sample fiel...
enum AVMediaType codec_type
int sample_rate
samples per second
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
AVDictionary * metadata
Metadata that applies to the whole file.
const AVCodecGuid ff_codec_wav_guids[]
int eof_reached
true if eof reached
int channels
number of audio channels
int ff_read_riff_info(AVFormatContext *s, int64_t size)
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...