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
const(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

buf_ptr_max
ubyte* buf_ptr_max;

Maximum reached position before a backward seek in the write buffer, used keeping track of already written data for a later flush.

buffer
ubyte* buffer;

< Start of the buffer.

buffer_size
int buffer_size;

< Maximum buffer size

bytes_read
long bytes_read;

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

checksum
c_ulong checksum;
Undocumented in source.
checksum_ptr
ubyte* checksum_ptr;
Undocumented in source.
current_type
AVIODataMarkerType current_type;

Internal, not meant to be used from outside of AVIOContext.

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

ignore_boundary_point
int ignore_boundary_point;

If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT, but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly small chunks of data returned from the callback).

last_time
long last_time;
Undocumented in source.
max_packet_size
int max_packet_size;
Undocumented in source.
maxsize
long maxsize;

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

min_packet_size
int min_packet_size;

Try to buffer at least this amount of data before flushing it

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
long pos;

< position in the file of the current buffer

protocol_blacklist
const(char)* protocol_blacklist;

',' separated list of disallowed protocols.

protocol_whitelist
const(char)* protocol_whitelist;

',' separated list of allowed protocols.

read_packet
int function(void* opaque, ubyte* 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
long function(void* opaque, int stream_index, long 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
long function(void* opaque, long 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_get
int function(void* opaque) short_seek_get;

A callback that is used instead of short_seek_threshold. This is current internal only, do not use from outside.

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
c_ulong function(c_ulong checksum, const(ubyte)* buf, uint size) update_checksum;
Undocumented in source.
write_data_type
int function(void* opaque, ubyte* buf, int buf_size, AVIODataMarkerType type, long time) write_data_type;

A callback that is used instead of write_packet.

write_flag
int write_flag;

< true if open for writing

write_packet
int function(void* opaque, ubyte* 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.

written
long written;
Undocumented in source.

Meta