43 static const uint8_t ifv_magic[] = {0x11, 0xd2, 0xd3, 0xab, 0xba, 0xa9,
44 0xcf, 0x11, 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65, 0x44};
46 if (!memcmp(p->
buf, ifv_magic,
sizeof(ifv_magic)))
59 uint32_t end_index,
i;
70 for (
i = start_index;
i < end_index;
i++) {
105 if (vid_magic !=
MKTAG(
'H',
'2',
'6',
'4'))
112 if (aud_magic ==
MKTAG(
'G',
'R',
'A',
'W')) {
114 }
else if (aud_magic ==
MKTAG(
'P',
'C',
'M',
'U')) {
194 ev = ea = e_next =
NULL;
213 uint64_t vframes, aframes;
223 if (vframes > INT_MAX || aframes > INT_MAX)
249 if (vframes > INT_MAX)
290 for (
unsigned i = 0;
i <
s->nb_streams;
i++) {
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 MKTAG(a, b, c, d)
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp)
Set a dictionary value to an ISO-8601 compliant timestamp string.
static int read_header(FFV1Context *f)
#define AV_CH_LAYOUT_MONO
AVStream * avformat_new_stream(AVFormatContext *s, const 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 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)
AVInputFormat ff_ifv_demuxer
static int ifv_read_header(AVFormatContext *s)
static int ifv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
common internal API header
#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)
uint64_t channel_layout
Audio only.
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
Audio only.
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
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(...)