45 static const uint8_t ifv_magic[] = {0x11, 0xd2, 0xd3, 0xab, 0xba, 0xa9,
46 0xcf, 0x11, 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65, 0x44};
48 if (!memcmp(p->buf, ifv_magic,
sizeof(ifv_magic)))
61 uint32_t end_index,
i;
72 for (
i = start_index;
i < end_index;
i++) {
107 if (vid_magic !=
MKTAG(
'H',
'2',
'6',
'4'))
114 if (aud_magic ==
MKTAG(
'G',
'R',
'A',
'W')) {
116 }
else if (aud_magic ==
MKTAG(
'P',
'C',
'M',
'U')) {
194 ev = ea = e_next =
NULL;
217 uint64_t vframes, aframes;
227 if (vframes > INT_MAX || aframes > INT_MAX)
253 if (vframes > INT_MAX)
294 for (
unsigned i = 0;
i <
s->nb_streams;
i++) {
315 .p.extensions =
"ifv",
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
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)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
static int read_probe(const AVProbeData *p)
Public libavutil channel layout APIs header.
static int read_header(FFV1Context *f, RangeCoder *c)
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
#define AV_CHANNEL_LAYOUT_MONO
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
static int read_index(AVFormatContext *s, enum AVMediaType frame_type, uint32_t start_index)
static int parse_header(AVFormatContext *s)
static int ifv_read_packet(AVFormatContext *s, AVPacket *pkt)
static int ifv_probe(const AVProbeData *p)
static int ifv_read_header(AVFormatContext *s)
static int ifv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
#define MKTAG(a, b, c, d)
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.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
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.
int index
stream index in AVFormatContext
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
uint32_t next_video_index
uint32_t next_audio_index
#define avpriv_request_sample(...)