Go to the documentation of this file.
37 #define FORM_TAG MKTAG('F', 'O', 'R', 'M')
38 #define MOVE_TAG MKTAG('M', 'O', 'V', 'E')
39 #define PC__TAG MKTAG('_', 'P', 'C', '_')
40 #define SOND_TAG MKTAG('S', 'O', 'N', 'D')
41 #define BNAM_TAG MKTAG('B', 'N', 'A', 'M')
42 #define SIZE_TAG MKTAG('S', 'I', 'Z', 'E')
43 #define PALT_TAG MKTAG('P', 'A', 'L', 'T')
44 #define INDX_TAG MKTAG('I', 'N', 'D', 'X')
45 #define BRCH_TAG MKTAG('B', 'R', 'C', 'H')
46 #define SHOT_TAG MKTAG('S', 'H', 'O', 'T')
47 #define VGA__TAG MKTAG('V', 'G', 'A', ' ')
48 #define TEXT_TAG MKTAG('T', 'E', 'X', 'T')
49 #define AUDI_TAG MKTAG('A', 'U', 'D', 'I')
52 #define WC3_DEFAULT_WIDTH 320
53 #define WC3_DEFAULT_HEIGHT 165
56 #define WC3_SAMPLE_RATE 22050
57 #define WC3_AUDIO_BITS 16
60 #define WC3_FRAME_FPS 15
62 #define PALETTE_SIZE (256 * 3)
100 unsigned int fourcc_tag;
124 switch (fourcc_tag) {
212 unsigned int fourcc_tag;
216 unsigned char text[1024];
218 while (!packet_read) {
226 switch (fourcc_tag) {
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
#define AV_CHANNEL_LAYOUT_MONO
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
int nb_channels
Number of channels in this layout.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
static int wc3_read_header(AVFormatContext *s)
static av_cold int read_close(AVFormatContext *ctx)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
unsigned int avio_rb32(AVIOContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
size_t static size_t av_strnlen(const char *s, size_t len)
Get the count of continuous non zero chars starting from the beginning.
This structure contains the data a format has to probe a file.
AVChannelLayout ch_layout
Audio only.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
#define WC3_DEFAULT_HEIGHT
int sample_rate
Audio only.
const AVInputFormat ff_wc3_demuxer
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
An AVChannelLayout holds information about the channel layout of audio data.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
static int wc3_probe(const AVProbeData *p)
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int block_align
Audio only.
static int wc3_read_packet(AVFormatContext *s, AVPacket *pkt)
static int wc3_read_close(AVFormatContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
int index
stream index in AVFormatContext
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define WC3_DEFAULT_WIDTH
#define av_fourcc2str(fourcc)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.