34 #include "libavutil/channel_layout.h"
35 #include "libavutil/intreadwrite.h"
36 #include "libavutil/dict.h"
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) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AVCodecContext * codec
Codec context associated with this stream.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
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...
#define AV_CH_LAYOUT_STEREO
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.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AVERROR_EOF
End of file.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#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(). ...
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
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 ...
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
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.
AVDictionary * metadata
Metadata that applies to the whole file.
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
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.