Go to the documentation of this file.
44 static const uint8_t ifv_magic[] = {0x11, 0xd2, 0xd3, 0xab, 0xba, 0xa9,
45 0xcf, 0x11, 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65, 0x44};
47 if (!memcmp(p->
buf, ifv_magic,
sizeof(ifv_magic)))
60 uint32_t end_index,
i;
71 for (
i = start_index;
i < end_index;
i++) {
106 if (vid_magic !=
MKTAG(
'H',
'2',
'6',
'4'))
113 if (aud_magic ==
MKTAG(
'G',
'R',
'A',
'W')) {
115 }
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++) {
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.
#define AVERROR_EOF
End of file.
static int read_index(AVFormatContext *s, enum AVMediaType frame_type, uint32_t start_index)
#define AV_CH_LAYOUT_MONO
uint32_t next_audio_index
uint32_t next_video_index
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
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.
unsigned int avio_rl16(AVIOContext *s)
static int parse_header(AVFormatContext *s)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
static int ifv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
static int ifv_read_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
static int ifv_probe(const AVProbeData *p)
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int ifv_read_header(AVFormatContext *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...
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.
const AVInputFormat ff_ifv_demuxer
int index
stream index in AVFormatContext
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
#define avpriv_request_sample(...)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
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)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp)
Set a dictionary value to an ISO-8601 compliant timestamp string.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.