38 #define ID_8SVX MKTAG('8','S','V','X')
39 #define ID_VHDR MKTAG('V','H','D','R')
40 #define ID_ATAK MKTAG('A','T','A','K')
41 #define ID_RLSE MKTAG('R','L','S','E')
42 #define ID_CHAN MKTAG('C','H','A','N')
43 #define ID_PBM MKTAG('P','B','M',' ')
44 #define ID_ILBM MKTAG('I','L','B','M')
45 #define ID_BMHD MKTAG('B','M','H','D')
46 #define ID_CMAP MKTAG('C','M','A','P')
48 #define ID_FORM MKTAG('F','O','R','M')
49 #define ID_ANNO MKTAG('A','N','N','O')
50 #define ID_AUTH MKTAG('A','U','T','H')
51 #define ID_CHRS MKTAG('C','H','R','S')
52 #define ID_COPYRIGHT MKTAG('(','c',')',' ')
53 #define ID_CSET MKTAG('C','S','E','T')
54 #define ID_FVER MKTAG('F','V','E','R')
55 #define ID_NAME MKTAG('N','A','M','E')
56 #define ID_TEXT MKTAG('T','E','X','T')
57 #define ID_BODY MKTAG('B','O','D','Y')
58 #define ID_ANNO MKTAG('A','N','N','O')
84 const char *
const tag,
85 const unsigned data_size)
116 uint32_t chunk_id, data_size;
117 int compression = -1;
132 const char *metadata_tag =
NULL;
145 if (data_size >= 16) {
169 if (data_size < 3 || data_size > 768 || data_size % 3) {
190 if (data_size >= 11) {
194 if (data_size >= 16) {
203 metadata_tag =
"comment";
207 metadata_tag =
"artist";
211 metadata_tag =
"copyright";
215 metadata_tag =
"title";
220 if ((res =
get_metadata(s, metadata_tag, data_size)) < 0) {
234 switch(compression) {
255 switch (compression) {
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AV_CH_LAYOUT_STEREO
unsigned int avio_rb16(AVIOContext *s)
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
unsigned int avio_rb32(AVIOContext *s)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
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.
#define AV_DICT_DONT_STRDUP_VAL
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
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.
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int avio_r8(AVIOContext *s)
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 bit_rate
the average bitrate
audio channel layout utility functions
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
This structure contains the data a format has to probe a file.
#define AVERROR_INVALIDDATA
#define AVPROBE_SCORE_MAX
int eof_reached
true if eof reached
int channels
number of audio channels
void * priv_data
Format private data.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.