AVIOContext Struct Reference

Bytestream IO Context. More...

#include <avio.h>

Data Fields

AVClassav_class
 A class for private options.
unsigned char * buffer
 Start of the buffer.
int buffer_size
 Maximum buffer size.
unsigned char * buf_ptr
 Current position in the buffer.
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.
voidopaque
 A private pointer, passed to the read/write/seek/...
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
int must_flush
 true if the next seek should flush
int eof_reached
 true if eof reached
int write_flag
 true if open for writing
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
int(* read_pause )(void *opaque, int pause)
 Pause or resume playback for network streaming protocols - e.g.
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 seekable
 A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.

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

Definition at line 68 of file avio.h.

Field Documentation

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 82 of file avio.h.

Referenced by format_child_next().

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 87 of file avio.h.

Referenced by avio_r8(), avio_read(), avio_seek(), avio_seek_time(), avio_w8(), avio_write(), ffio_fill(), ffio_init_context(), ffio_read_partial(), ffio_rewind_with_probe_data(), fill_buffer(), init_packetizer(), read_gab2_sub(), and url_resetbuf().

int AVIOContext::buffer_size
unsigned long AVIOContext::checksum

Definition at line 104 of file avio.h.

Referenced by ffio_get_checksum(), ffio_init_checksum(), fill_buffer(), and flush_buffer().

unsigned char* AVIOContext::checksum_ptr

Definition at line 105 of file avio.h.

Referenced by ffio_get_checksum(), ffio_init_checksum(), fill_buffer(), and flush_buffer().

int AVIOContext::eof_reached

true if eof reached

Definition at line 98 of file avio.h.

Referenced by amr_read_packet(), ape_read_header(), ape_read_packet(), applehttp_read_packet(), applehttp_read_seek(), asf_read_header(), asfrtp_parse_packet(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_sync(), avio_read(), avio_seek(), bfi_read_packet(), bmv_read_packet(), cin_read_frame_header(), daud_packet(), decode_thread(), dfa_read_packet(), dv_read_header(), dxa_read_header(), dxa_read_packet(), ebml_read_num(), ff_asf_get_packet(), ff_asf_parse_packet(), ff_id3v2_parse(), ffio_init_context(), ffio_read_partial(), ffio_rewind_with_probe_data(), ffm_resync(), fill_buffer(), find_any_startcode(), find_next_start_code(), flac_read_header(), flv_read_packet(), fourxm_read_packet(), get_codec_data(), get_line(), get_swf_tag(), get_tag(), gxf_packet(), idcin_read_packet(), iff_read_header(), ipmovie_read_header(), mmf_read_packet(), mov_read_default(), mov_read_packet(), mpc8_read_header(), mpc8_read_packet(), mpegps_read_pes_header(), mpegts_resync(), msnwc_tcp_read_header(), mxf_read_header(), mxf_read_packet(), mxf_read_sync(), mxg_read_packet(), nc_read_packet(), new_output_stream(), nsv_parse_NSVf_header(), nsv_read_chunk(), nsv_resync(), nut_read_packet(), nuv_packet(), ogg_read_page(), parse_chunks(), parse_legacy_attrib(), parse_playlist(), pmp_packet(), process_audio_header_elements(), process_ipmovie_chunk(), qcp_read_packet(), read_braindead_odml_indx(), read_header(), read_packet(), recheck_discard_flags(), rm_read_header(), roq_read_packet(), smacker_read_packet(), smjpeg_read_header(), smjpeg_read_packet(), sol_read_packet(), sox_read_packet(), spdif_read_packet(), srt_read_packet(), str_read_packet(), sync(), tmv_read_packet(), txd_read_packet(), vc1t_read_packet(), vid_read_packet(), wc3_read_header(), wc3_read_packet(), wtvfile_read_packet(), wv_read_packet(), xwma_read_header(), and yuv4_read_packet().

int AVIOContext::error
int AVIOContext::max_packet_size

Definition at line 103 of file avio.h.

Referenced by avio_close_dyn_buf(), ffio_init_context(), fill_buffer(), and rtp_write_header().

int AVIOContext::must_flush

true if the next seek should flush

Definition at line 97 of file avio.h.

Referenced by avio_flush(), avio_seek(), ffio_init_context(), and ffio_rewind_with_probe_data().

void* AVIOContext::opaque

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

functions.

Definition at line 91 of file avio.h.

Referenced by avio_close(), avio_close_dyn_buf(), avio_pause(), avio_read(), avio_seek(), avio_seek_time(), avio_size(), ffio_init_context(), ffio_url_child_next(), fill_buffer(), flush_buffer(), and wtvfile_close().

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

Definition at line 93 of file avio.h.

Referenced by avio_read(), ffio_init_context(), and fill_buffer().

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

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

MMS.

Definition at line 111 of file avio.h.

Referenced by avio_pause(), and ffio_init_context().

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 117 of file avio.h.

Referenced by avio_seek_time(), and ffio_init_context().

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

Definition at line 95 of file avio.h.

Referenced by avio_seek(), avio_seek_time(), avio_size(), ffio_init_context(), and nut_read_header().

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

true if open for writing

Definition at line 99 of file avio.h.

Referenced by avio_seek(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), and url_resetbuf().

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

Definition at line 94 of file avio.h.

Referenced by ffio_init_context(), and flush_buffer().


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