Go to the documentation of this file.
34 #define SMACKER_PAL 0x01
35 #define SMACKER_FLAG_RING_FRAME 0x01
67 0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C,
68 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C,
69 0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D,
70 0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D,
71 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E,
72 0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE,
73 0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF,
74 0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF
102 if (magic !=
MKTAG(
'S',
'M',
'K',
'2') && magic !=
MKTAG(
'S',
'M',
'K',
'4'))
108 if (pts_inc > INT_MAX / 100 || pts_inc == INT_MIN) {
116 if (smk->
frames > 0xFFFFFF) {
124 if (treesize >= UINT_MAX/4) {
141 av_reduce(&tbase, &pts_inc, tbase, pts_inc, (1UL << 31) - 1);
156 "Cannot allocate %"PRIu32
" bytes of extradata\n",
164 for (
i = 0;
i < 7;
i++) {
250 uint8_t *pal = smk->
pal;
253 memcpy(oldpal, pal, 768);
266 sz += (t & 0x7F) + 1;
267 pal += ((t & 0x7F) + 1) * 3;
268 }
else if (t & 0x40) {
271 if (off + j > 0x100) {
273 "Invalid palette update, offset=%d length=%d extends beyond palette size\n",
279 while (j-- && sz < 256) {
280 *pal++ = oldpal[off + 0];
281 *pal++ = oldpal[off + 1];
282 *pal++ = oldpal[off + 2];
299 if (smk->
flags & (1 <<
i)) {
365 int64_t timestamp,
int flags)
371 if (timestamp != 0) {
373 "Random seeks are not supported (can only seek to start).\n");
383 memset(smk->
pal, 0,
sizeof(smk->
pal));
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
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.
This struct describes the properties of an encoded stream.
#define AVERROR_EOF
End of file.
#define AV_CH_LAYOUT_MONO
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t duration
Decoding: duration of the stream, in stream time base.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
#define AV_CH_LAYOUT_STEREO
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
@ AV_CODEC_ID_BINKAUDIO_DCT
@ AVDISCARD_ALL
discard all
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
int extradata_size
Size of the extradata content in bytes.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int avio_r8(AVIOContext *s)
#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...
unsigned int avio_rl24(AVIOContext *s)
#define av_malloc_array(a, b)
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
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
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.
uint64_t channel_layout
Audio only.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define MKTAG(a, b, c, d)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
@ AV_CODEC_ID_BINKAUDIO_RDFT
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.