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
51 typedef struct AVIOInterruptCB {
52 int (*callback)(
void*);
93 int64_t (*
seek)(
void *
opaque, int64_t offset,
int whence);
113 int64_t timestamp,
int flags);
160 int64_t (*seek)(
void *opaque, int64_t offset,
int whence));
190 #define AVSEEK_SIZE 0x10000
198 #define AVSEEK_FORCE 0x20000
292 #define AVIO_FLAG_READ 1
293 #define AVIO_FLAG_WRITE 2
294 #define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)
311 #define AVIO_FLAG_NONBLOCK 8
437 int64_t timestamp,
int flags);
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.
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)
unsigned char * buffer
Start of the buffer.
const OptionDef options[]
Callback for checking whether to abort blocking functions.
int(* write_packet)(void *opaque, uint8_t *buf, int buf_size)
int(* read_packet)(void *opaque, uint8_t *buf, int buf_size)
unsigned char * buf_end
End of the data, may be less than buffer+buffer_size if the read function returned less data than req...
#define av_printf_format(fmtpos, attrpos)
unsigned char * checksum_ptr
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
const AVIOInterruptCB int_cb
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