20 #ifndef AVFORMAT_AVIO_H
21 #define AVFORMAT_AVIO_H
31 #include "libavutil/common.h"
32 #include "libavutil/dict.h"
33 #include "libavutil/log.h"
35 #include "libavformat/version.h"
38 #define AVIO_SEEKABLE_NORMAL 0x0001
113 int64_t timestamp,
int flags);
192 int64_t (*seek)(
void *opaque, int64_t
offset,
int whence));
222 #define AVSEEK_SIZE 0x10000
230 #define AVSEEK_FORCE 0x20000
332 #define AVIO_FLAG_READ 1
333 #define AVIO_FLAG_WRITE 2
334 #define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)
351 #define AVIO_FLAG_NONBLOCK 8
359 #define AVIO_FLAG_DIRECT 0x8000
479 int64_t timestamp,
int flags);
const char const char void * val
int64_t(* read_seek)(void *opaque, int stream_index, int64_t timestamp, int flags)
Seek to a given timestamp in stream with the specified stream_index.
int writeout_count
writeout statistic This field is internal to libavformat and access from outside is not allowed...
void * opaque
A private pointer, passed to the read/write/seek/...
int write_flag
true if open for writing
int64_t(* seek)(void *opaque, int64_t offset, int whence)
int64_t maxsize
max filesize, used to limit allocations This field is internal to libavformat and access from outside...
unsigned char * buffer
Start of the buffer.
static const uint8_t offset[511][2]
int64_t bytes_read
Bytes read statistic This field is internal to libavformat and access from outside is not allowed...
const OptionDef options[]
Callback for checking whether to abort blocking functions.
int(* write_packet)(void *opaque, uint8_t *buf, int buf_size)
const AVIOInterruptCB int_cb
#define av_printf_format(fmtpos, attrpos)
int(* read_packet)(void *opaque, uint8_t *buf, int buf_size)
int direct
avio_read and avio_write should if possible be satisfied directly instead of going through a buffer...
unsigned char * buf_end
End of the data, may be less than buffer+buffer_size if the read function returned less data than req...
int seek_count
seek statistic This field is internal to libavformat and access from outside is not allowed...
unsigned char * checksum_ptr
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
int must_flush
true if the next seek should flush
unsigned char * buf_ptr
Current position in the buffer.
unsigned long(* update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size)
int buffer_size
Maximum buffer size.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Describe the class of an AVClass context structure.
int error
contains the error code or 0 if no error happened
int(* read_pause)(void *opaque, int pause)
Pause or resume playback for network streaming protocols - e.g.
int64_t pos
position in the file of the current buffer
const AVClass * av_class
A class for private options.
int eof_reached
true if eof reached
static int write_packet(AVFormatContext *s1, AVPacket *pkt)