FFmpeg
|
Bytestream IO Context. More...
#include <avio.h>
Data Fields | |
const AVClass * | av_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 | 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... | |
const char * | protocol_whitelist |
',' separated list of allowed protocols. More... | |
const char * | protocol_blacklist |
',' separated list of disallowed protocols. More... | |
int(* | write_data_type )(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time) |
A callback that is used instead of write_packet. More... | |
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). More... | |
enum AVIODataMarkerType | current_type |
Internal, not meant to be used from outside of AVIOContext. More... | |
int64_t | last_time |
int(* | short_seek_get )(void *opaque) |
A callback that is used instead of short_seek_threshold. More... | |
int64_t | written |
unsigned char * | 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. More... | |
int | min_packet_size |
Try to buffer at least this amount of data before flushing it. More... | |
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*.
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 174 of file avio.h.
Referenced by av_probe_input_buffer2(), and format_child_next().
unsigned char* AVIOContext::buffer |
Start of the buffer.
Definition at line 226 of file avio.h.
Referenced by asf_write_trailer(), avio_close(), avio_read(), avio_read_partial(), avio_seek(), avio_write_marker(), close_demux_for_component(), ff_wms_parse_sdp_a_line(), ffio_ensure_seekback(), ffio_init_context(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), fill_buffer(), flush_buffer(), free_playlist_list(), free_representation(), hls_read_seek(), main(), url_resetbuf(), and wtvfile_close().
int AVIOContext::buffer_size |
Maximum buffer size.
Definition at line 227 of file avio.h.
Referenced by avio_read(), ff_configure_buffers_for_index(), ffio_ensure_seekback(), ffio_init_context(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), fill_buffer(), and url_resetbuf().
unsigned char* AVIOContext::buf_ptr |
Current position in the buffer.
Definition at line 228 of file avio.h.
Referenced by asf_write_trailer(), avio_flush(), avio_r8(), avio_read(), avio_read_partial(), avio_seek(), avio_seek_time(), avio_w8(), avio_write(), avio_write_marker(), ffio_ensure_seekback(), ffio_fill(), ffio_get_checksum(), ffio_init_checksum(), ffio_init_context(), ffio_read_indirect(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), fill_buffer(), flush_buffer(), hls_read_seek(), mxf_write_content_storage(), mxf_write_identification(), mxf_write_multi_descriptor(), mxf_write_package(), mxf_write_preface(), mxf_write_sequence(), mxf_write_structural_component(), mxf_write_tape_descriptor(), mxf_write_track(), and read_gab2_sub().
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 229 of file avio.h.
Referenced by avio_r8(), avio_read(), avio_read_partial(), avio_seek(), avio_seek_time(), avio_w8(), avio_write(), ffio_ensure_seekback(), ffio_fill(), ffio_init_context(), ffio_read_indirect(), ffio_rewind_with_probe_data(), fill_buffer(), flush_buffer(), hls_read_seek(), init_packetizer(), read_gab2_sub(), and url_resetbuf().
void* AVIOContext::opaque |
A private pointer, passed to the read/write/seek/...
functions.
Definition at line 233 of file avio.h.
Referenced by avio_accept(), avio_close(), avio_close_dyn_buf(), avio_get_dyn_buf(), avio_handshake(), avio_pause(), avio_seek(), avio_seek_time(), avio_size(), ff_avio_child_next(), ffio_close_null_buf(), ffio_geturlcontext(), ffio_init_context(), read_packet_wrapper(), writeout(), and wtvfile_close().
Definition at line 235 of file avio.h.
Referenced by avio_read_partial(), ffio_ensure_seekback(), ffio_geturlcontext(), ffio_init_context(), fill_buffer(), and read_packet_wrapper().
Definition at line 236 of file avio.h.
Referenced by ffio_init_context(), ffio_open_null_buf(), and writeout().
Definition at line 237 of file avio.h.
Referenced by avio_seek(), avio_seek_time(), avio_size(), and ffio_init_context().
int64_t AVIOContext::pos |
position in the file of the current buffer
Definition at line 238 of file avio.h.
Referenced by asfrtp_parse_packet(), avio_read(), avio_read_partial(), avio_seek(), avio_seek_time(), avio_size(), ffio_init_context(), ffio_rewind_with_probe_data(), fill_buffer(), hls_read_seek(), init_packetizer(), read_header(), and writeout().
int AVIOContext::eof_reached |
true if eof reached
Definition at line 239 of file avio.h.
Referenced by amf_skip_tag(), ape_read_header(), asf_read_packet(), asfrtp_parse_packet(), avio_feof(), avio_read(), avio_seek(), bmv_read_packet(), decode_frame_header(), decode_main_header(), ebml_level_end(), ebml_parse(), ff_mov_read_chan(), ff_mov_read_stsd_entries(), ff_read_riff_info(), ffio_init_context(), ffio_rewind_with_probe_data(), fill_buffer(), find_sidx(), get_line(), get_str(), gxf_packet(), hls_read_seek(), hnm_read_packet(), idcin_read_header(), idcin_read_packet(), mov_metadata_hmmt(), mov_read_chap(), mov_read_ctts(), mov_read_elst(), mov_read_sbgp(), mov_read_stco(), mov_read_stps(), mov_read_stsc(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_trun(), new_output_stream(), parse_multipart_header(), read_packet(), read_thread(), recheck_discard_flags(), skip_reserved(), xwma_read_header(), and yuv4_read_packet().
int AVIOContext::write_flag |
true if open for writing
Definition at line 240 of file avio.h.
Referenced by avio_close(), avio_flush(), avio_read(), avio_read_partial(), avio_seek(), ffio_ensure_seekback(), ffio_read_indirect(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), flush_buffer(), and url_resetbuf().
int AVIOContext::max_packet_size |
Definition at line 241 of file avio.h.
Referenced by avio_close_dyn_buf(), ffio_ensure_seekback(), ffio_init_context(), fill_buffer(), read_packet_wrapper(), and rtp_write_header().
unsigned long AVIOContext::checksum |
Definition at line 242 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 243 of file avio.h.
Referenced by ffio_ensure_seekback(), ffio_get_checksum(), ffio_init_checksum(), fill_buffer(), and flush_buffer().
unsigned long(* AVIOContext::update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size) |
Definition at line 244 of file avio.h.
Referenced by avio_read(), avio_write(), ffio_get_checksum(), ffio_init_checksum(), ffio_init_context(), fill_buffer(), and flush_buffer().
int AVIOContext::error |
contains the error code or 0 if no error happened
Definition at line 245 of file avio.h.
Referenced by asf_get_packet(), av_interleaved_write_frame(), av_write_frame(), av_write_trailer(), avformat_write_header(), avi_sync(), avio_read(), avio_read_partial(), cin_read_frame_header(), ebml_read_num(), ff_read_line_to_bprint(), ffio_init_context(), fill_buffer(), flush_if_needed(), flv_write_packet(), gdv_read_packet(), get_line(), idcin_read_header(), idcin_read_packet(), main(), mxg_read_packet(), read_thread(), write_packet(), writeout(), wtvfile_read_packet(), and yuv4_read_packet().
Pause or resume playback for network streaming protocols - e.g.
MMS.
Definition at line 249 of file avio.h.
Referenced by avio_pause(), and ffio_init_context().
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 255 of file avio.h.
Referenced by avio_seek_time(), and ffio_init_context().
int AVIOContext::seekable |
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
Definition at line 260 of file avio.h.
Referenced by adp_read_header(), adts_aac_read_header(), aiff_read_header(), aiff_write_trailer(), amf_parse_object(), ape_read_header(), apng_write_trailer(), asf_read_data(), asf_read_header(), asf_write_header1(), asf_write_trailer(), ast_write_trailer(), avi_read_header(), avi_write_header(), avi_write_idx1(), avi_write_ix(), avi_write_packet(), avi_write_packet_internal(), avi_write_trailer(), avio_seek(), caf_write_header(), caf_write_trailer(), cine_read_seek(), dsf_read_header(), dtshd_read_header(), end_ebml_master_crc32(), end_ebml_master_crc32_preliminary(), estimate_timings(), ff_id3v1_read(), ff_voc_get_packet(), ffio_init_context(), flac_write_trailer(), flv_read_packet(), flv_write_header(), get_aac_sample_rates(), gxf_write_header(), hls_read_header(), ico_write_header(), ivf_write_trailer(), matroska_execute_seekhead(), mkv_check_new_extra_data(), mkv_start_new_cluster(), mkv_write_flush_packet(), mkv_write_header(), mkv_write_packet_internal(), mkv_write_tags(), mkv_write_tracks(), mkv_write_trailer(), mov_find_next_sample(), mov_init(), mov_read_cmov(), mov_read_default(), mov_read_header(), mov_read_moof(), mp3_read_header(), mp3_write_xing(), mpc8_read_header(), mpc_read_header(), mpegps_read_pes_header(), mv_read_packet(), mv_read_seek(), mxf_parse_handle_essence(), mxf_read_random_index_pack(), mxf_write_footer(), nut_read_header(), ogg_get_length(), ogg_read_page(), ogg_replace_stream(), put_id3v2_tags(), r3d_read_header(), read_header(), read_seek(), reopen_demux_for_component(), rm_read_header(), rm_write_trailer(), rsd_read_header(), rso_write_header(), seek_back(), seg_init(), seg_write_header(), segment_start(), smjpeg_write_trailer(), sox_write_trailer(), start_ebml_master_crc32(), swf_write_trailer(), tak_read_header(), tta_read_header(), vc1test_write_trailer(), webm_chunk_write_header(), wv_read_block_header(), wv_read_header(), and wv_write_trailer().
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 266 of file avio.h.
Referenced by append_packet_chunked(), ffio_limit(), mp3_read_header(), and thp_read_header().
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 273 of file avio.h.
Referenced by avio_read(), avio_seek(), avio_write(), and ffio_init_context().
int64_t AVIOContext::bytes_read |
Bytes read statistic This field is internal to libavformat and access from outside is not allowed.
Definition at line 279 of file avio.h.
Referenced by avformat_find_stream_info(), avio_close(), avio_read(), and fill_buffer().
int AVIOContext::seek_count |
seek statistic This field is internal to libavformat and access from outside is not allowed.
Definition at line 285 of file avio.h.
Referenced by avformat_find_stream_info(), avio_close(), and avio_seek().
int AVIOContext::writeout_count |
writeout statistic This field is internal to libavformat and access from outside is not allowed.
Definition at line 291 of file avio.h.
Referenced by avio_close(), and writeout().
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 298 of file avio.h.
Referenced by ffio_init_context(), ffio_set_buf_size(), and fill_buffer().
int AVIOContext::short_seek_threshold |
Threshold to favor readahead over seek.
This is current internal only, do not use from outside.
Definition at line 304 of file avio.h.
Referenced by avio_seek(), ff_configure_buffers_for_index(), and ffio_init_context().
const char* AVIOContext::protocol_whitelist |
',' separated list of allowed protocols.
Definition at line 309 of file avio.h.
Referenced by avformat_open_input().
const char* AVIOContext::protocol_blacklist |
',' separated list of disallowed protocols.
Definition at line 314 of file avio.h.
Referenced by avformat_open_input().
int(* AVIOContext::write_data_type)(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time) |
A callback that is used instead of write_packet.
Definition at line 319 of file avio.h.
Referenced by avio_write_marker(), ffio_init_context(), init_fps(), and writeout().
int AVIOContext::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).
Definition at line 326 of file avio.h.
Referenced by avio_write_marker(), and ffio_init_context().
enum AVIODataMarkerType AVIOContext::current_type |
Internal, not meant to be used from outside of AVIOContext.
Definition at line 331 of file avio.h.
Referenced by avio_write_marker(), ffio_init_context(), and writeout().
int64_t AVIOContext::last_time |
Definition at line 332 of file avio.h.
Referenced by avio_write_marker(), ffio_init_context(), and writeout().
A callback that is used instead of short_seek_threshold.
This is current internal only, do not use from outside.
Definition at line 338 of file avio.h.
Referenced by avio_seek(), and ffio_init_context().
int64_t AVIOContext::written |
Definition at line 340 of file avio.h.
Referenced by avio_size(), ffio_init_context(), and writeout().
unsigned char* AVIOContext::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.
Definition at line 346 of file avio.h.
Referenced by avio_flush(), avio_seek(), ffio_init_context(), ffio_set_buf_size(), and flush_buffer().
int AVIOContext::min_packet_size |
Try to buffer at least this amount of data before flushing it.
Definition at line 351 of file avio.h.
Referenced by avio_write_marker(), and ffio_init_context().