FFmpeg  2.8.4
Data Fields
AVIOContext Struct Reference

Bytestream IO Context. More...

#include <avio.h>

Data Fields

const AVClassav_class
 A class for private options. More...
 
unsigned char * buffer
 Start of the buffer. More...
 
int buffer_size
 Maximum buffer size. More...
 
unsigned char * buf_ptr
 Current position in the buffer. More...
 
unsigned char * buf_end
 End of the data, may be less than buffer+buffer_size if the read function returned less data than requested, e.g. More...
 
void * opaque
 A private pointer, passed to the read/write/seek/... More...
 
int(* read_packet )(void *opaque, uint8_t *buf, int buf_size)
 
int(* write_packet )(void *opaque, uint8_t *buf, int buf_size)
 
int64_t(* seek )(void *opaque, int64_t offset, int whence)
 
int64_t pos
 position in the file of the current buffer More...
 
int must_flush
 true if the next seek should flush More...
 
int eof_reached
 true if eof reached More...
 
int write_flag
 true if open for writing More...
 
int max_packet_size
 
unsigned long checksum
 
unsigned char * checksum_ptr
 
unsigned long(* update_checksum )(unsigned long checksum, const uint8_t *buf, unsigned int size)
 
int error
 contains the error code or 0 if no error happened More...
 
int(* read_pause )(void *opaque, int pause)
 Pause or resume playback for network streaming protocols - e.g. More...
 
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. More...
 
int seekable
 A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable. More...
 
int64_t maxsize
 max filesize, used to limit allocations This field is internal to libavformat and access from outside is not allowed. More...
 
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. More...
 
int64_t bytes_read
 Bytes read statistic This field is internal to libavformat and access from outside is not allowed. More...
 
int seek_count
 seek statistic This field is internal to libavformat and access from outside is not allowed. More...
 
int writeout_count
 writeout statistic This field is internal to libavformat and access from outside is not allowed. More...
 
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. More...
 
int short_seek_threshold
 Threshold to favor readahead over seek. More...
 

Detailed Description

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()
Examples:
avio_reading.c, and transcode_aac.c.

Definition at line 111 of file avio.h.

Field Documentation

const AVClass* AVIOContext::av_class

A class for private options.

If this AVIOContext is created by avio_open2(), av_class is set and passes the options down to protocols.

If this AVIOContext is manually allocated, then av_class may be set by the caller.

warning – this field can be NULL, be sure to not pass this AVIOContext to any av_opt_* functions in that case.

Definition at line 124 of file avio.h.

unsigned char* AVIOContext::buffer

Start of the buffer.

Examples:
avio_reading.c.

Definition at line 125 of file avio.h.

Referenced by main().

int AVIOContext::buffer_size

Maximum buffer size.

Definition at line 126 of file avio.h.

unsigned char* AVIOContext::buf_ptr

Current position in the buffer.

Definition at line 127 of file avio.h.

unsigned char* AVIOContext::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.

Definition at line 128 of file avio.h.

void* AVIOContext::opaque

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

functions.

Definition at line 132 of file avio.h.

int(* AVIOContext::read_packet) (void *opaque, uint8_t *buf, int buf_size)

Definition at line 134 of file avio.h.

int(* AVIOContext::write_packet) (void *opaque, uint8_t *buf, int buf_size)

Definition at line 135 of file avio.h.

int64_t(* AVIOContext::seek) (void *opaque, int64_t offset, int whence)

Definition at line 136 of file avio.h.

int64_t AVIOContext::pos

position in the file of the current buffer

Definition at line 137 of file avio.h.

int AVIOContext::must_flush

true if the next seek should flush

Definition at line 138 of file avio.h.

int AVIOContext::eof_reached

true if eof reached

Definition at line 139 of file avio.h.

int AVIOContext::write_flag

true if open for writing

Definition at line 140 of file avio.h.

int AVIOContext::max_packet_size

Definition at line 141 of file avio.h.

unsigned long AVIOContext::checksum

Definition at line 142 of file avio.h.

unsigned char* AVIOContext::checksum_ptr

Definition at line 143 of file avio.h.

unsigned long(* AVIOContext::update_checksum) (unsigned long checksum, const uint8_t *buf, unsigned int size)

Definition at line 144 of file avio.h.

int AVIOContext::error

contains the error code or 0 if no error happened

Definition at line 145 of file avio.h.

int(* AVIOContext::read_pause) (void *opaque, int pause)

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

MMS.

Definition at line 149 of file avio.h.

int64_t(* AVIOContext::read_seek) (void *opaque, int stream_index, int64_t timestamp, int flags)

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.

Definition at line 155 of file avio.h.

int AVIOContext::seekable

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

Definition at line 160 of file avio.h.

int64_t AVIOContext::maxsize

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

Definition at line 166 of file avio.h.

int AVIOContext::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.

Definition at line 173 of file avio.h.

int64_t AVIOContext::bytes_read

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

Definition at line 179 of file avio.h.

int AVIOContext::seek_count

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

Definition at line 185 of file avio.h.

int AVIOContext::writeout_count

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

Definition at line 191 of file avio.h.

int AVIOContext::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.

Definition at line 198 of file avio.h.

int AVIOContext::short_seek_threshold

Threshold to favor readahead over seek.

This is current internal only, do not use from outside.

Definition at line 204 of file avio.h.


The documentation for this struct was generated from the following file: