40 #define ID_8SVX MKTAG('8','S','V','X') 41 #define ID_VHDR MKTAG('V','H','D','R') 42 #define ID_ATAK MKTAG('A','T','A','K') 43 #define ID_RLSE MKTAG('R','L','S','E') 44 #define ID_CHAN MKTAG('C','H','A','N') 45 #define ID_PBM MKTAG('P','B','M',' ') 46 #define ID_ILBM MKTAG('I','L','B','M') 47 #define ID_BMHD MKTAG('B','M','H','D') 48 #define ID_CMAP MKTAG('C','M','A','P') 50 #define ID_FORM MKTAG('F','O','R','M') 51 #define ID_ANNO MKTAG('A','N','N','O') 52 #define ID_AUTH MKTAG('A','U','T','H') 53 #define ID_CHRS MKTAG('C','H','R','S') 54 #define ID_COPYRIGHT MKTAG('(','c',')',' ') 55 #define ID_CSET MKTAG('C','S','E','T') 56 #define ID_FVER MKTAG('F','V','E','R') 57 #define ID_NAME MKTAG('N','A','M','E') 58 #define ID_TEXT MKTAG('T','E','X','T') 59 #define ID_BODY MKTAG('B','O','D','Y') 60 #define ID_ANNO MKTAG('A','N','N','O') 86 const char *
const tag,
87 const unsigned data_size)
118 uint32_t chunk_id, data_size;
119 int compression = -1;
134 const char *metadata_tag =
NULL;
147 if (data_size >= 16) {
171 if (data_size < 3 || data_size > 768 || data_size % 3) {
192 if (data_size >= 11) {
196 if (data_size >= 16) {
205 metadata_tag =
"comment";
209 metadata_tag =
"artist";
213 metadata_tag =
"copyright";
217 metadata_tag =
"title";
222 if ((res =
get_metadata(s, metadata_tag, data_size)) < 0) {
236 switch(compression) {
257 switch (compression) {
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
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_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
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,...)
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
#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.
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.
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.