42#define MM_PREAMBLE_SIZE 6
44#define MM_TYPE_HEADER 0x0
45#define MM_TYPE_RAW 0x2
46#define MM_TYPE_INTER 0x5
47#define MM_TYPE_INTRA 0x8
48#define MM_TYPE_INTRA_HH 0xc
49#define MM_TYPE_INTER_HH 0xd
50#define MM_TYPE_INTRA_HHV 0xe
51#define MM_TYPE_INTER_HHV 0xf
52#define MM_TYPE_AUDIO2 0x14
53#define MM_TYPE_AUDIO 0x15
54#define MM_TYPE_PALETTE 0x31
56#define MM_HEADER_LEN_V 0x16
57#define MM_HEADER_LEN_AV 0x18
58#define MM_HEADER_LEN_AV2 0x1a
60#define MM_PALETTE_COUNT 128
61#define MM_PALETTE_SIZE (MM_PALETTE_COUNT*3)
77 if (!fps || fps > 60 || !
w ||
w > 2048 || !
h ||
h > 2048)
92 unsigned int type, length;
141 unsigned int type, length;
154 length =
AV_RL16(&preamble[2]);
173 pkt->stream_index = 0;
183 if (
s->nb_streams < 2)
187 pkt->stream_index = 1;
188 pkt->duration = length;
static int probe(const AVProbeData *p)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rl32(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Public libavutil channel layout APIs header.
static int read_header(FFV1Context *f, RangeCoder *c)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AV_CHANNEL_LAYOUT_MONO
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_INFO
Standard information.
Macro definitions for various function/variable attributes.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int read_packet(AVFormatContext *s, AVPacket *pkt)
#define MM_HEADER_LEN_AV2
static int read_header(AVFormatContext *s)
static int probe(const AVProbeData *p)
#define MM_TYPE_INTRA_HHV
#define MM_TYPE_INTER_HHV
An AVChannelLayout holds information about the channel layout of audio data.
int height
The height of the video frame in pixels.
AVChannelLayout ch_layout
The channel layout and number of channels.
int width
The width of the video frame in pixels.
enum AVMediaType codec_type
General type of the encoded data.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.