AVIOContext

Bytestream IO Context. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVIOContext) must not be used outside libav*.

@note None of the function pointers in AVIOContext should be called directly, they should only be set by the client application when implementing custom I/O. Normally these are set to the function pointers specified in avio_alloc_context()

Members

Variables

av_class
AVClass* av_class;

A class for private options.

buf_end
ubyte* buf_end;

< End of the data, may be less than buffer+buffer_size if the read function returned less data than requested, e.g. for streams where no more data has been received yet.

buf_ptr
ubyte* buf_ptr;

< Current position in the buffer

buffer
ubyte* buffer;

< Start of the buffer.

buffer_size
int buffer_size;

< Maximum buffer size

bytes_read
int64_t bytes_read;

Bytes read statistic This field is internal to libavformat and access from outside is not allowed.

checksum
uint checksum;
Undocumented in source.
checksum_ptr
ubyte* checksum_ptr;
Undocumented in source.
direct
int direct;

avio_read and avio_write should if possible be satisfied directly instead of going through a buffer, and avio_seek will always call the underlying seek function directly.

eof_reached
int eof_reached;

< true if eof reached

error
int error;

< contains the error code or 0 if no error happened

max_packet_size
int max_packet_size;
Undocumented in source.
maxsize
int64_t maxsize;

max filesize, used to limit allocations This field is internal to libavformat and access from outside is not allowed.

must_flush
int must_flush;

< true if the next seek should flush

opaque
void* opaque;

< A private pointer, passed to the read/write/seek/... functions.

orig_buffer_size
int orig_buffer_size;

Original buffer size used internally after probing and ensure seekback to reset the buffer size This field is internal to libavformat and access from outside is not allowed.

pos
int64_t pos;

< position in the file of the current buffer

protocol_whitelist
char* protocol_whitelist;

',' separated list of allowed protocols.

read_packet
int function(void* opaque, uint8_t* buf, int buf_size) read_packet;
Undocumented in source.
read_pause
int function(void* opaque, int pause) read_pause;

Pause or resume playback for network streaming protocols - e.g. MMS.

read_seek
int64_t function(void* opaque, int stream_index, int64_t timestamp, int flags) read_seek;

Seek to a given timestamp in stream with the specified stream_index. Needed for some network streaming protocols which don't support seeking to byte position.

seek
int64_t function(void* opaque, int64_t offset, int whence) seek;
Undocumented in source.
seek_count
int seek_count;

seek statistic This field is internal to libavformat and access from outside is not allowed.

seekable
int seekable;

A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.

short_seek_threshold
int short_seek_threshold;

Threshold to favor readahead over seek. This is current internal only, do not use from outside.

update_checksum
uint function(uint checksum, const uint8_t* buf, uint size) update_checksum;
Undocumented in source.
write_flag
int write_flag;

< true if open for writing

write_packet
int function(void* opaque, uint8_t* buf, int buf_size) write_packet;
Undocumented in source.
writeout_count
int writeout_count;

writeout statistic This field is internal to libavformat and access from outside is not allowed.

Meta