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)))
58 int64_t pos,
size, timestamp;
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;
static int ifv_read_header(AVFormatContext *s)
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.
int64_t pos
byte position in stream, -1 if unknown
#define avpriv_request_sample(...)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
uint32_t next_audio_index
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVInputFormat ff_ifv_demuxer
static int ifv_read_packet(AVFormatContext *s, AVPacket *pkt)
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp)
Set a dictionary value to an ISO-8601 compliant timestamp string.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVStream ** streams
A list of all streams in the file.
#define AVERROR_EOF
End of file.
uint64_t channel_layout
Audio only.
#define i(width, name, range_min, range_max)
AVDictionary * metadata
Metadata that applies to the whole file.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
static int ifv_probe(const AVProbeData *p)
unsigned int avio_rl32(AVIOContext *s)
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
uint32_t next_video_index
static int parse_header(AVFormatContext *s)
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int ifv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
AVIOContext * pb
I/O context.
static int read_index(AVFormatContext *s, enum AVMediaType frame_type, uint32_t start_index)
This structure contains the data a format has to probe a file.
#define flags(name, subs,...)
int sample_rate
Audio only.
unsigned int avio_rl16(AVIOContext *s)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
void * priv_data
Format private data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
#define AV_CH_LAYOUT_MONO
#define MKTAG(a, b, c, d)
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...