libavformat/aviobuf.c File Reference

#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "avio.h"
#include <stdarg.h>

Go to the source code of this file.

Defines

#define IO_BUFFER_SIZE   32768
#define SHORT_SEEK_THRESHOLD   4096
 Do seeks within this distance ahead of the current buffer by skipping data instead of calling the protocol seek function, for seekable protocols.

Functions

static void fill_buffer (ByteIOContext *s)
int init_put_byte (ByteIOContext *s, unsigned char *buffer, int buffer_size, int write_flag, void *opaque, 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))
ByteIOContextav_alloc_put_byte (unsigned char *buffer, int buffer_size, int write_flag, void *opaque, 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))
static void flush_buffer (ByteIOContext *s)
void put_byte (ByteIOContext *s, int b)
void put_buffer (ByteIOContext *s, const unsigned char *buf, int size)
void put_flush_packet (ByteIOContext *s)
int64_t url_fseek (ByteIOContext *s, int64_t offset, int whence)
 fseek() equivalent for ByteIOContext.
void url_fskip (ByteIOContext *s, int64_t offset)
 Skip given number of bytes forward.
int64_t url_ftell (ByteIOContext *s)
 ftell() equivalent for ByteIOContext.
int64_t url_fsize (ByteIOContext *s)
 Gets the filesize.
int url_feof (ByteIOContext *s)
 feof() equivalent for ByteIOContext.
int url_ferror (ByteIOContext *s)
void put_le32 (ByteIOContext *s, unsigned int val)
void put_be32 (ByteIOContext *s, unsigned int val)
void put_strz (ByteIOContext *s, const char *str)
void put_le64 (ByteIOContext *s, uint64_t val)
void put_be64 (ByteIOContext *s, uint64_t val)
void put_le16 (ByteIOContext *s, unsigned int val)
void put_be16 (ByteIOContext *s, unsigned int val)
void put_le24 (ByteIOContext *s, unsigned int val)
void put_be24 (ByteIOContext *s, unsigned int val)
void put_tag (ByteIOContext *s, const char *tag)
unsigned long ff_crc04C11DB7_update (unsigned long checksum, const uint8_t *buf, unsigned int len)
unsigned long get_checksum (ByteIOContext *s)
void init_checksum (ByteIOContext *s, unsigned long(*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum)
int get_byte (ByteIOContext *s)
int url_fgetc (ByteIOContext *s)
int get_buffer (ByteIOContext *s, unsigned char *buf, int size)
 Reads size bytes from ByteIOContext into buf.
int get_partial_buffer (ByteIOContext *s, unsigned char *buf, int size)
 Reads size bytes from ByteIOContext into buf.
unsigned int get_le16 (ByteIOContext *s)
unsigned int get_le24 (ByteIOContext *s)
unsigned int get_le32 (ByteIOContext *s)
uint64_t get_le64 (ByteIOContext *s)
unsigned int get_be16 (ByteIOContext *s)
unsigned int get_be24 (ByteIOContext *s)
unsigned int get_be32 (ByteIOContext *s)
char * get_strz (ByteIOContext *s, char *buf, int maxlen)
uint64_t get_be64 (ByteIOContext *s)
uint64_t ff_get_v (ByteIOContext *bc)
int url_fdopen (ByteIOContext **s, URLContext *h)
int url_setbufsize (ByteIOContext *s, int buf_size)
int url_resetbuf (ByteIOContext *s, int flags)
 Reset the buffer for reading or writing.
int url_fopen (ByteIOContext **s, const char *filename, int flags)
int url_fclose (ByteIOContext *s)
URLContexturl_fileno (ByteIOContext *s)
char * url_fgets (ByteIOContext *s, char *buf, int buf_size)
int url_fget_max_packet_size (ByteIOContext *s)
 Return the maximum packet size associated to packetized buffered file handle.
int av_url_read_fpause (ByteIOContext *s, int pause)
int64_t av_url_read_fseek (ByteIOContext *s, int stream_index, int64_t timestamp, int flags)


Define Documentation

#define IO_BUFFER_SIZE   32768

Definition at line 28 of file aviobuf.c.

Referenced by url_fdopen().

#define SHORT_SEEK_THRESHOLD   4096

Do seeks within this distance ahead of the current buffer by skipping data instead of calling the protocol seek function, for seekable protocols.

Definition at line 35 of file aviobuf.c.

Referenced by url_fseek().


Function Documentation

ByteIOContext* av_alloc_put_byte ( unsigned char *  buffer,
int  buffer_size,
int  write_flag,
void *  opaque,
int(*)(void *opaque, uint8_t *buf, int buf_size)  read_packet,
int(*)(void *opaque, uint8_t *buf, int buf_size)  write_packet,
int64_t(*)(void *opaque, int64_t offset, int whence)  seek 
)

Definition at line 72 of file aviobuf.c.

Referenced by rdt_parse_packet().

int av_url_read_fpause ( ByteIOContext s,
int  pause 
)

Definition at line 677 of file aviobuf.c.

Referenced by av_read_pause(), and av_read_play().

int64_t av_url_read_fseek ( ByteIOContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)

Definition at line 684 of file aviobuf.c.

Referenced by asf_read_seek().

unsigned long ff_crc04C11DB7_update ( unsigned long  checksum,
const uint8_t *  buf,
unsigned int  len 
)

Definition at line 335 of file aviobuf.c.

Referenced by get_packetheader(), ogg_write_page(), put_packet(), and write_packet().

uint64_t ff_get_v ( ByteIOContext bc  ) 

static void fill_buffer ( ByteIOContext s  )  [static]

Definition at line 301 of file aviobuf.c.

Referenced by get_buffer(), get_byte(), get_partial_buffer(), url_fgetc(), and url_fseek().

static void flush_buffer ( ByteIOContext s  )  [static]

Definition at line 87 of file aviobuf.c.

Referenced by put_buffer(), put_byte(), put_flush_packet(), and url_fseek().

unsigned int get_be16 ( ByteIOContext s  ) 

unsigned int get_be24 ( ByteIOContext s  ) 

unsigned int get_be32 ( ByteIOContext s  ) 

Definition at line 495 of file aviobuf.c.

Referenced by aiff_read_header(), amf_parse_object(), au_read_header(), avi_read_packet(), decode_frame_header(), dv_read_header(), dxa_read_header(), ea_read_packet(), ebml_read_float(), ff_rm_read_mdpr_codecdata(), ffm_read_header(), flv_read_header(), flv_read_packet(), get_aiff_header(), get_be64(), get_packetheader(), get_tag(), gxf_material_tags(), gxf_packet(), gxf_resync_media(), gxf_track_tags(), id3v2_parse(), iff_read_header(), lmlm4_read_packet(), matroska_read_header(), mmf_read_header(), mov_read_cmov(), mov_read_ctts(), mov_read_default(), mov_read_dref(), mov_read_elst(), mov_read_esds(), mov_read_ftyp(), mov_read_hdlr(), mov_read_mdhd(), mov_read_mvhd(), mov_read_pasp(), mov_read_stco(), mov_read_stsc(), mov_read_stsd(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_tfhd(), mov_read_tkhd(), mov_read_trex(), mov_read_trkn(), mov_read_trun(), mov_read_udta_string(), mov_read_wide(), mp3_parse_vbr_tags(), mpegps_psm_parse(), mxf_read_content_storage(), mxf_read_generic_descriptor(), mxf_read_index_table_segment(), mxf_read_material_package(), mxf_read_primer_pack(), mxf_read_sequence(), mxf_read_source_clip(), mxf_read_source_package(), mxf_read_track(), parse_packet_header(), process_audio_header_eacs(), r3d_read_rdvo(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), r3d_read_reos(), rdt_load_mdpr(), read_atom(), read_part_of_packet(), rl2_read_header(), rm_read_audio_stream_info(), rm_read_header(), siff_parse_soun(), siff_parse_vbv1(), swf_read_header(), sync(), thp_read_header(), and thp_read_packet().

uint64_t get_be64 ( ByteIOContext s  ) 

int get_buffer ( ByteIOContext s,
unsigned char *  buf,
int  size 
)

Reads size bytes from ByteIOContext into buf.

Returns:
number of bytes read or AVERROR

Definition at line 386 of file aviobuf.c.

Referenced by aiff_read_header(), amf_get_string(), amr_read_header(), amr_read_packet(), apc_read_header(), ape_parse_tag(), ape_read_header(), ape_read_packet(), ape_tag_read_field(), asf_read_header(), av_get_packet(), av_open_input_file(), av_read(), avi_read_header(), avs_read_packet(), avs_read_video_packet(), bfi_read_header(), cin_read_packet(), decode_frame(), decode_main_header(), decode_stream_header(), dv_read_header(), dv_read_packet(), dxa_read_packet(), ebml_read_ascii(), ebml_read_binary(), ff_asf_parse_packet(), ff_rm_parse_packet(), ff_rm_read_mdpr_codecdata(), ffm_read_data(), ffm_read_header(), film_read_header(), film_read_packet(), flac_read_header(), flic_read_header(), flic_read_packet(), flv_get_extradata(), fourxm_read_header(), fourxm_read_packet(), get_aiff_header(), get_codec_data(), get_guid(), get_meta(), get_pts(), get_riff(), get_str(), id3v2_read_ttag(), idcin_read_header(), idcin_read_packet(), iff_read_packet(), img_read_packet(), ipmovie_read_header(), klv_read_packet(), load_ipmovie_packet(), mm_read_packet(), mmf_read_packet(), mov_read_cmov(), mov_read_dref(), mov_read_esds(), mov_read_extradata(), mov_read_glbl(), mov_read_smi(), mov_read_stsd(), mov_read_udta_string(), mov_read_wave(), mp3_read_header(), mpc8_parse_seektable(), mpc8_read_header(), mpc_read_header(), mpc_read_packet(), mpegps_read_packet(), mpegps_read_pes_header(), mpegts_get_pcr(), mpegts_raw_read_packet(), mpegts_read_header(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), mxf_read_content_storage(), mxf_read_cryptographic_context(), mxf_read_generic_descriptor(), mxf_read_local_tags(), mxf_read_material_package(), mxf_read_primer_pack(), mxf_read_sequence(), mxf_read_source_clip(), mxf_read_source_package(), mxf_read_track(), nsv_parse_NSVf_header(), nuv_header(), nuv_packet(), ogg_read_page(), oma_read_header(), process_ipmovie_chunk(), r3d_read_red1(), read_frame(), read_packet(), read_part_of_packet(), read_seek(), rl2_read_header(), rm_assemble_video_frame(), rm_read_audio_stream_info(), rm_read_packet(), roq_read_header(), roq_read_packet(), sdp_read_header(), seq_fill_buffer(), seq_read_packet(), siff_read_packet(), smacker_read_header(), smacker_read_packet(), str_read_header(), str_read_packet(), swf_read_packet(), thp_read_header(), tta_read_header(), vc1t_read_header(), vmd_read_header(), vmd_read_packet(), wc3_read_header(), wc3_read_packet(), wsaud_read_header(), wsaud_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), wv_read_block_header(), and wv_read_packet().

int get_byte ( ByteIOContext s  ) 

Note:
return 0 if EOF, so you cannot use it if EOF handling is necessary

Definition at line 360 of file aviobuf.c.

Referenced by amf_parse_object(), amr_read_packet(), asf_read_frame_header(), asf_read_header(), avi_read_header(), avi_read_packet(), avs_read_packet(), bfi_read_packet(), cin_read_file_header(), cin_read_frame_header(), dv_read_header(), dxa_read_header(), ebml_read_num(), ebml_read_uint(), ff_asf_get_packet(), ff_asf_parse_packet(), ff_get_v(), ffm_read_header(), find_any_startcode(), find_next_start_code(), flv_read_header(), flv_read_metabody(), flv_read_packet(), flv_set_video_codec(), get_be16(), get_be24(), get_codec_data(), get_le16(), get_le24(), get_len(), get_line(), get_pts(), get_str(), get_str8(), get_strl(), get_strz(), get_token(), gxf_header(), gxf_material_tags(), gxf_packet(), gxf_resync_media(), gxf_track_tags(), id3v2_get_size(), id3v2_read_ttag(), iff_read_header(), klv_decode_ber_length(), mmf_read_header(), mov_read_ctts(), mov_read_dref(), mov_read_elst(), mov_read_esds(), mov_read_hdlr(), mov_read_mdhd(), mov_read_mvhd(), mov_read_stco(), mov_read_stsc(), mov_read_stsd(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_tfhd(), mov_read_tkhd(), mov_read_trex(), mov_read_trun(), mp4_read_descr(), mp4_read_descr_len(), mpc8_read_header(), mpc_read_header(), mpegps_psm_parse(), mpegps_read_header(), mpegps_read_packet(), mpegps_read_pes_header(), msnwc_tcp_read_header(), mtv_read_header(), mxf_read_pixel_layout(), mxf_read_sync(), nc_read_packet(), nsv_parse_NSVs_header(), nsv_read_chunk(), nsv_resync(), nut_read_packet(), nuv_header(), parse_packet_header(), process_audio_header_eacs(), process_audio_header_elements(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), read_arbitary(), read_braindead_odml_indx(), read_frame(), read_header(), read_line(), read_part_of_packet(), rm_assemble_video_frame(), rm_read_audio_stream_info(), rm_read_dts(), rm_read_metadata(), seq_parse_frame_data(), skip_reserved(), smacker_read_header(), smacker_read_packet(), sol_read_header(), swf_read_header(), swf_read_packet(), sync(), vc1t_read_header(), vc1t_read_packet(), vid_read_packet(), voc_get_packet(), wv_read_block_header(), yuv4_read_header(), and yuv4_read_packet().

unsigned long get_checksum ( ByteIOContext s  ) 

unsigned int get_le16 ( ByteIOContext s  ) 

Definition at line 448 of file aviobuf.c.

unsigned int get_le24 ( ByteIOContext s  ) 

unsigned int get_le32 ( ByteIOContext s  ) 

Definition at line 464 of file aviobuf.c.

uint64_t get_le64 ( ByteIOContext s  ) 

int get_partial_buffer ( ByteIOContext s,
unsigned char *  buf,
int  size 
)

Reads size bytes from ByteIOContext into buf.

This reads at most 1 packet. If that is not enough fewer bytes will be returned.

Returns:
number of bytes read or AVERROR

Definition at line 429 of file aviobuf.c.

char* get_strz ( ByteIOContext s,
char *  buf,
int  maxlen 
)

Definition at line 503 of file aviobuf.c.

Referenced by avi_read_tag(), and ffm_read_header().

void init_checksum ( ByteIOContext s,
unsigned long(*)(unsigned long c, const uint8_t *p, unsigned int len update_checksum,
unsigned long  checksum 
)

Definition at line 348 of file aviobuf.c.

Referenced by get_packetheader(), ogg_write_page(), put_packet(), and write_packet().

int init_put_byte ( ByteIOContext s,
unsigned char *  buffer,
int  buffer_size,
int  write_flag,
void *  opaque,
int(*)(void *opaque, uint8_t *buf, int buf_size)  read_packet,
int(*)(void *opaque, uint8_t *buf, int buf_size)  write_packet,
int64_t(*)(void *opaque, int64_t offset, int whence)  seek 
)

void put_be16 ( ByteIOContext s,
unsigned int  val 
)

void put_be24 ( ByteIOContext s,
unsigned int  val 
)

void put_be32 ( ByteIOContext s,
unsigned int  val 
)

Definition at line 240 of file aviobuf.c.

Referenced by ff_avc_parse_nal_units(), ff_rtp_send_data(), ffm_write_header(), flush_packet(), flv_write_header(), flv_write_packet(), gxf_write_material_data_section(), gxf_write_media_preamble(), gxf_write_packet_header(), gxf_write_timecode_auxiliary(), gxf_write_track_description(), gxf_write_umf_media_dv(), gxf_write_umf_media_timecode(), gxf_write_umf_packet(), mov_write_3gp_udta_tag(), mov_write_ac3_tag(), mov_write_amr_tag(), mov_write_audio_tag(), mov_write_avcc_tag(), mov_write_avid_tag(), mov_write_ctts_tag(), mov_write_d263_tag(), mov_write_dinf_tag(), mov_write_dref_tag(), mov_write_edts_tag(), mov_write_enda_tag(), mov_write_esds_tag(), mov_write_ftyp_tag(), mov_write_glbl_tag(), mov_write_gmhd_tag(), mov_write_hdlr_tag(), mov_write_ilst_tag(), mov_write_itunes_hdlr_tag(), mov_write_mdat_tag(), mov_write_mdhd_tag(), mov_write_mdia_tag(), mov_write_meta_tag(), mov_write_minf_tag(), mov_write_moov_tag(), mov_write_mvhd_tag(), mov_write_nmhd_tag(), mov_write_psp_udta_tag(), mov_write_smhd_tag(), mov_write_stbl_tag(), mov_write_stco_tag(), mov_write_string_data_tag(), mov_write_string_tag(), mov_write_stsc_tag(), mov_write_stsd_tag(), mov_write_stss_tag(), mov_write_stsz_tag(), mov_write_stts_tag(), mov_write_subtitle_tag(), mov_write_svq3_tag(), mov_write_tkhd_tag(), mov_write_trailer(), mov_write_trak_tag(), mov_write_trkn_tag(), mov_write_udta_tag(), mov_write_uuid_tag_ipod(), mov_write_uuid_tag_psp(), mov_write_uuidprof_tag(), mov_write_uuidusmt_tag(), mov_write_video_tag(), mov_write_vmhd_tag(), mov_write_wave_tag(), mxf_write_cdci_common(), mxf_write_essence_container_data(), mxf_write_generic_desc(), mxf_write_generic_sound_common(), mxf_write_index_table_segment(), mxf_write_mpegvideo_desc(), mxf_write_multi_descriptor(), mxf_write_partition(), mxf_write_primer_pack(), mxf_write_random_index_pack(), mxf_write_refs_count(), mxf_write_structural_component(), mxf_write_system_item(), mxf_write_track(), mxf_write_wav_common(), ogg_update_checksum(), put_be64(), put_padding_packet(), rm_write_trailer(), rm_write_video(), rtp_check_and_send_back_rr(), rv10_write_header(), swf_write_video(), updatePacketSize(), updateSize(), and write_packet_header().

void put_be64 ( ByteIOContext s,
uint64_t  val 
)

void put_buffer ( ByteIOContext s,
const unsigned char *  buf,
int  size 
)

Definition at line 112 of file aviobuf.c.

Referenced by adts_write_frame_header(), adts_write_packet(), avi_write_packet(), crc_write_trailer(), daud_write_packet(), ff_avc_parse_nal_units(), ff_flac_write_header(), ff_isom_write_avcc(), ff_rtp_send_data(), ffm_write_header(), flac_write_packet(), flac_write_trailer(), flush_packet(), flv_write_header(), flv_write_packet(), framecrc_write_packet(), gif_image_write_header(), gif_image_write_image(), gxf_write_media_packet(), gxf_write_mpeg_auxiliary(), gxf_write_umf_media_description(), http_send_data(), matroska_read_header(), mkv_write_ass_blocks(), mkv_write_block(), mkv_write_codecprivate(), mov_write_ac3_tag(), mov_write_esds_tag(), mov_write_extradata_tag(), mov_write_glbl_tag(), mov_write_hdlr_tag(), mov_write_packet(), mov_write_string_data_tag(), mov_write_subtitle_tag(), mov_write_udta_tag(), mov_write_video_tag(), mpegts_write_pes(), mpjpeg_write_header(), mpjpeg_write_packet(), mxf_write_cdci_common(), mxf_write_common_fields(), mxf_write_d10_video_packet(), mxf_write_essence_container_refs(), mxf_write_generic_desc(), mxf_write_index_table_segment(), mxf_write_klv_fill(), mxf_write_metadata_key(), mxf_write_multi_descriptor(), mxf_write_packet(), mxf_write_partition(), mxf_write_preface(), mxf_write_primer_pack(), mxf_write_random_index_pack(), mxf_write_system_item(), mxf_write_track(), mxf_write_umid(), mxf_write_uuid(), ogg_write_page(), put_amf_string(), put_ebml_binary(), put_frame(), put_guid(), put_packet(), put_str(), put_strz(), put_swf_matrix(), put_swf_rect(), put_xiph_codecpriv(), rm_write_audio(), rm_write_video(), rtp_check_and_send_back_rr(), rtsp_cmd_describe(), section_write_packet(), swf_write_header(), swf_write_video(), vc1test_write_header(), vc1test_write_packet(), voc_write_header(), voc_write_packet(), write_globalinfo(), write_header(), write_mainheader(), write_packet(), write_streamheader(), write_streaminfo(), and write_trailer().

void put_byte ( ByteIOContext s,
int  b 
)

Definition at line 105 of file aviobuf.c.

Referenced by asf_write_header1(), avi_write_header(), avi_write_info_tag(), avi_write_ix(), avi_write_packet(), ff_isom_write_avcc(), ff_rtp_send_data(), ffm_write_header(), flush_packet(), flv_write_header(), flv_write_packet(), gif_image_write_header(), gif_image_write_image(), gif_write_trailer(), gif_write_video(), gxf_write_map_packet(), gxf_write_material_data_section(), gxf_write_media_preamble(), gxf_write_mpeg_auxiliary(), gxf_write_packet_header(), gxf_write_padding(), gxf_write_timecode_auxiliary(), gxf_write_track_description(), gxf_write_umf_packet(), gxf_write_umf_user_data(), klv_encode_ber4_length(), klv_encode_ber_length(), mkv_write_ass_blocks(), mkv_write_block(), mov_write_3gp_udta_tag(), mov_write_amr_tag(), mov_write_d263_tag(), mov_write_esds_tag(), mov_write_hdlr_tag(), mov_write_mdhd_tag(), mov_write_mvhd_tag(), mov_write_svq3_tag(), mov_write_tkhd_tag(), mov_write_video_tag(), mxf_write_cdci_common(), mxf_write_d10_audio_packet(), mxf_write_d10_video_packet(), mxf_write_generic_sound_common(), mxf_write_index_table_segment(), mxf_write_klv_fill(), mxf_write_system_item(), mxf_write_timecode_component(), ogg_write_page(), put_amf_bool(), put_amf_double(), put_be16(), put_be24(), put_be32(), put_ebml_id(), put_ebml_num(), put_ebml_size_unknown(), put_ebml_uint(), put_ebml_void(), put_le16(), put_le24(), put_le32(), put_padding_packet(), put_payload_header(), put_payload_parsing_info(), put_str(), put_str8(), put_strz(), put_tag(), put_timestamp(), put_v(), put_vcd_padding_sector(), put_xiph_codecpriv(), put_xiph_size(), putDescr(), rm_write_video(), rtp_check_and_send_back_rr(), rv10_write_header(), swf_write_header(), swf_write_video(), vc1test_write_header(), voc_write_packet(), voc_write_trailer(), write_header(), write_packet(), write_packet_header(), and write_streamheader().

void put_flush_packet ( ByteIOContext s  ) 

void put_le16 ( ByteIOContext s,
unsigned int  val 
)

void put_le24 ( ByteIOContext s,
unsigned int  val 
)

Definition at line 280 of file aviobuf.c.

Referenced by vc1test_write_header(), vc1test_write_trailer(), and voc_write_packet().

void put_le32 ( ByteIOContext s,
unsigned int  val 
)

void put_le64 ( ByteIOContext s,
uint64_t  val 
)

void put_strz ( ByteIOContext s,
const char *  str 
)

Definition at line 248 of file aviobuf.c.

Referenced by avi_write_info_tag(), and ffm_write_header().

void put_tag ( ByteIOContext s,
const char *  tag 
)

Definition at line 292 of file aviobuf.c.

Referenced by avi_start_new_riff(), avi_write_header(), avi_write_idx1(), avi_write_info_tag(), avi_write_ix(), avi_write_trailer(), flv_write_header(), gif_image_write_header(), gxf_write_material_data_section(), gxf_write_track_description(), mov_write_3gp_udta_tag(), mov_write_ac3_tag(), mov_write_amr_tag(), mov_write_avcc_tag(), mov_write_avid_tag(), mov_write_ctts_tag(), mov_write_d263_tag(), mov_write_dinf_tag(), mov_write_dref_tag(), mov_write_edts_tag(), mov_write_enda_tag(), mov_write_esds_tag(), mov_write_ftyp_tag(), mov_write_glbl_tag(), mov_write_gmhd_tag(), mov_write_hdlr_tag(), mov_write_ilst_tag(), mov_write_itunes_hdlr_tag(), mov_write_mdat_tag(), mov_write_mdhd_tag(), mov_write_mdia_tag(), mov_write_meta_tag(), mov_write_minf_tag(), mov_write_moov_tag(), mov_write_mvhd_tag(), mov_write_nmhd_tag(), mov_write_smhd_tag(), mov_write_stbl_tag(), mov_write_stco_tag(), mov_write_string_data_tag(), mov_write_string_tag(), mov_write_stsc_tag(), mov_write_stsd_tag(), mov_write_stss_tag(), mov_write_stsz_tag(), mov_write_stts_tag(), mov_write_svq3_tag(), mov_write_tkhd_tag(), mov_write_trailer(), mov_write_trak_tag(), mov_write_trkn_tag(), mov_write_udta_tag(), mov_write_uuid_tag_ipod(), mov_write_uuid_tag_psp(), mov_write_uuidprof_tag(), mov_write_uuidusmt_tag(), mov_write_video_tag(), mov_write_vmhd_tag(), mov_write_wave_tag(), ogg_write_page(), rm_write_trailer(), rv10_write_header(), swf_write_header(), and swf_write_video().

int url_fclose ( ByteIOContext s  ) 

int url_fdopen ( ByteIOContext **  s,
URLContext h 
)

Note:
when opened as read/write, the buffers are only used for writing

Definition at line 537 of file aviobuf.c.

Referenced by url_fopen().

int url_feof ( ByteIOContext s  ) 

int url_ferror ( ByteIOContext s  ) 

int url_fget_max_packet_size ( ByteIOContext s  ) 

Return the maximum packet size associated to packetized buffered file handle.

If the file is not packetized (stream like http or file on disk), then 0 is returned.

Parameters:
s buffered file handle
Returns:
maximum packet size in bytes

Definition at line 672 of file aviobuf.c.

Referenced by rtp_write_header().

int url_fgetc ( ByteIOContext s  ) 

Note:
return URL_EOF (-1) if EOF

Definition at line 373 of file aviobuf.c.

Referenced by mpegts_resync(), ogg_read_page(), and url_fgets().

char* url_fgets ( ByteIOContext s,
char *  buf,
int  buf_size 
)

Note:
unlike fgets, the EOL character is not returned and a whole line is parsed. return NULL if first char read was EOF

Definition at line 651 of file aviobuf.c.

URLContext* url_fileno ( ByteIOContext s  ) 

Definition at line 631 of file aviobuf.c.

int url_fopen ( ByteIOContext **  s,
const char *  filename,
int  flags 
)

Note:
when opened as read/write, the buffers are only used for writing

Definition at line 606 of file aviobuf.c.

Referenced by av_open_input_file(), build_feed_streams(), img_read_packet(), main(), mov_read_trak(), and opt_output_file().

int64_t url_fseek ( ByteIOContext s,
int64_t  offset,
int  whence 
)

fseek() equivalent for ByteIOContext.

Returns:
new position or AVERROR.

Definition at line 137 of file aviobuf.c.

Referenced by adjust_write_index(), aiff_read_header(), ape_parse_tag(), ape_read_header(), ape_read_packet(), asf_build_simple_index(), asf_read_header(), asf_read_pts(), asf_read_seek(), asf_write_header1(), asf_write_trailer(), au_read_header(), av_estimate_timings_from_pts(), av_open_input_file(), av_seek(), av_seek_frame_binary(), av_seek_frame_byte(), av_seek_frame_generic(), avi_load_index(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_read_tag(), avi_write_counters(), avi_write_ix(), avi_write_trailer(), bfi_read_header(), dv_read_header(), dv_read_seek(), dxa_read_header(), dxa_read_packet(), ea_read_packet(), ebml_parse_elem(), end_ebml_master(), end_header(), ff_asf_get_packet(), ffm_read_data(), ffm_seek1(), ffm_write_trailer(), film_read_packet(), find_and_decode_index(), find_any_startcode(), find_tag(), flac_read_header(), flac_write_trailer(), flic_read_header(), flic_read_packet(), flv_read_header(), flv_read_packet(), flv_write_header(), flv_write_trailer(), fourxm_read_header(), fourxm_read_packet(), get_aiff_header(), gxf_read_timestamp(), gxf_resync_media(), gxf_seek(), gxf_write_trailer(), gxf_write_umf_media_description(), id3v2_parse(), idcin_read_packet(), iff_read_header(), ipmovie_read_header(), load_ipmovie_packet(), matroska_execute_seekhead(), matroska_read_seek(), mkv_write_seekhead(), mkv_write_trailer(), mm_read_header(), mm_read_packet(), mmf_read_header(), mov_read_dref(), mov_write_stsc_tag(), mov_write_stss_tag(), mov_write_trailer(), mp3_parse_vbr_tags(), mp3_read_header(), mpc8_handle_chunk(), mpc8_parse_seektable(), mpc8_read_seek(), mpc_read_packet(), mpegps_read_dts(), mpegps_read_packet(), mpegps_read_pes_header(), mpegts_get_pcr(), mpegts_raw_read_packet(), mpegts_read_header(), mpegts_resync(), mtv_read_header(), mxf_read_header(), mxf_read_local_tags(), mxf_read_seek(), mxf_write_footer(), mxf_write_partition(), nsv_parse_NSVf_header(), nut_read_header(), nut_read_packet(), ogg_get_length(), ogg_read_timestamp(), ogg_restore(), ogg_update_checksum(), oma_read_header(), process_ea_header(), process_ipmovie_chunk(), put_swf_end_tag(), pva_read_timestamp(), r3d_read_header(), r3d_seek(), rdt_load_mdpr(), read_braindead_odml_indx(), read_frame(), read_packet(), read_seek(), rl2_read_packet(), rm_read_dts(), rm_write_trailer(), roq_read_header(), roq_read_packet(), rpl_read_header(), rpl_read_packet(), seq_fill_buffer(), seq_init_frame_buffers(), seq_parse_frame_data(), seq_read_packet(), skip_reserved(), smacker_read_packet(), str_read_header(), swf_write_trailer(), thp_read_header(), thp_read_packet(), tta_read_header(), tta_read_seek(), updatePacketSize(), updateSize(), url_fskip(), url_ftell(), vc1test_write_trailer(), vid_read_header(), vid_read_packet(), vmd_read_header(), vmd_read_packet(), wc3_read_header(), wc3_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), and wv_read_seek().

int64_t url_fsize ( ByteIOContext s  ) 

void url_fskip ( ByteIOContext s,
int64_t  offset 
)

Skip given number of bytes forward.

Parameters:
offset number of bytes

Definition at line 189 of file aviobuf.c.

Referenced by aiff_read_header(), amf_get_string(), amf_parse_object(), ape_read_header(), ape_tag_read_field(), asf_read_frame_header(), asf_read_header(), avi_load_index(), avi_read_header(), avi_read_packet(), avi_write_ix(), avi_write_trailer(), avs_read_header(), avs_read_packet(), bfi_read_header(), cdata_read_header(), decode_frame(), dxa_read_header(), ea_read_packet(), ff_asf_parse_packet(), ff_rm_read_mdpr_codecdata(), flv_read_header(), flv_read_packet(), get_codec_data(), get_dts(), get_meta(), get_tag(), gxf_header(), gxf_material_tags(), gxf_packet(), gxf_read_index(), gxf_track_tags(), id3v2_parse(), iff_read_header(), lmlm4_read_packet(), matroska_read_header(), mov_read_default(), mov_read_dref(), mov_read_ftyp(), mov_read_hdlr(), mov_read_meta(), mov_read_mvhd(), mov_read_stsd(), mov_read_wave(), mov_read_wide(), mpc8_handle_chunk(), mpc8_read_header(), mpc_read_header(), mpegps_psm_parse(), mpegps_read_dts(), mpegps_read_packet(), mpegps_read_pes_header(), msnwc_tcp_read_packet(), mtv_read_header(), mtv_read_packet(), mxf_decrypt_triplet(), mxf_read_content_storage(), mxf_read_generic_descriptor(), mxf_read_header(), mxf_read_material_package(), mxf_read_packet(), mxf_read_sequence(), mxf_read_source_clip(), mxf_read_source_package(), nc_read_packet(), nsv_read_chunk(), nuv_header(), nuv_packet(), process_audio_header_eacs(), process_ea_header(), process_video_header_mdec(), process_video_header_vp6(), r3d_read_packet(), r3d_read_red1(), r3d_read_reos(), rdt_load_mdpr(), read_packet(), read_part_of_packet(), rl2_read_header(), rm_read_audio_stream_info(), rm_read_dts(), rm_read_header(), siff_parse_soun(), siff_parse_vbv1(), siff_read_header(), swf_read_header(), swf_read_packet(), sync(), tta_read_header(), txd_read_packet(), vc1t_read_header(), voc_get_packet(), voc_read_header(), and xa_read_header().

int64_t url_ftell ( ByteIOContext s  ) 

ftell() equivalent for ByteIOContext.

Returns:
position or AVERROR.

Definition at line 194 of file aviobuf.c.

Referenced by adjust_write_index(), aiff_read_header(), amf_parse_object(), amr_read_packet(), asf_build_simple_index(), asf_read_header(), asf_write_header1(), asf_write_trailer(), av_encode(), av_find_stream_info(), av_get_packet(), av_open_input_stream(), avi_load_index(), avi_read_header(), avi_read_packet(), avi_read_tag(), avi_write_counters(), avi_write_header(), avi_write_ix(), avi_write_packet(), avi_write_trailer(), avs_read_audio_packet(), decode_frame(), decode_frame_header(), decode_info_header(), decode_main_header(), decode_stream_header(), decode_syncpoint(), dxa_read_header(), dxa_read_packet(), ebml_level_end(), ebml_parse_elem(), ebml_read_binary(), ebml_read_master(), ebml_read_num(), end_ebml_master(), end_header(), event_loop(), ff_asf_get_packet(), ff_asf_parse_packet(), ff_rm_read_mdpr_codecdata(), ffm_is_avail_data(), ffm_read_data(), ffm_read_header(), ffm_read_packet(), ffm_write_header(), ffm_write_trailer(), film_read_packet(), find_and_decode_index(), find_startcode(), flac_write_trailer(), flic_read_packet(), flush_packet(), flv_read_packet(), flv_write_header(), flv_write_trailer(), fourxm_read_packet(), get_riff(), gxf_read_timestamp(), gxf_resync_media(), gxf_write_eos_packet(), gxf_write_map_packet(), gxf_write_material_data_section(), gxf_write_media_packet(), gxf_write_track_description(), gxf_write_track_description_section(), gxf_write_trailer(), gxf_write_umf_media_description(), gxf_write_umf_packet(), gxf_write_umf_track_description(), gxf_write_umf_user_data(), handle_packet(), id3v2_parse(), iss_read_header(), iss_read_packet(), klv_read_packet(), matroska_execute_seekhead(), matroska_parse_cluster(), mkv_start_seekhead(), mkv_write_ass_blocks(), mkv_write_block(), mkv_write_cues(), mkv_write_header(), mkv_write_packet(), mkv_write_seekhead(), mkv_write_tracks(), mkv_write_trailer(), mov_read_default(), mov_read_dref(), mov_read_hdlr(), mov_read_header(), mov_read_moof(), mov_read_packet(), mov_read_stsd(), mov_write_3gp_udta_tag(), mov_write_audio_tag(), mov_write_avcc_tag(), mov_write_dinf_tag(), mov_write_esds_tag(), mov_write_ftyp_tag(), mov_write_hdlr_tag(), mov_write_ilst_tag(), mov_write_itunes_hdlr_tag(), mov_write_mdat_tag(), mov_write_mdia_tag(), mov_write_meta_tag(), mov_write_minf_tag(), mov_write_moov_tag(), mov_write_packet(), mov_write_stbl_tag(), mov_write_stco_tag(), mov_write_string_data_tag(), mov_write_string_tag(), mov_write_stsc_tag(), mov_write_stsd_tag(), mov_write_stss_tag(), mov_write_stsz_tag(), mov_write_subtitle_tag(), mov_write_trailer(), mov_write_trak_tag(), mov_write_trkn_tag(), mov_write_uuidusmt_tag(), mov_write_video_tag(), mov_write_wave_tag(), mp3_read_header(), mpc8_get_chunk_header(), mpc8_handle_chunk(), mpc8_read_header(), mpc8_read_packet(), mpc_read_packet(), mpegps_read_pes_header(), mpegts_raw_read_packet(), mpegts_read_header(), mpegts_write_header(), mtv_read_packet(), mxf_decrypt_triplet(), mxf_read_local_tags(), mxf_write_d10_video_packet(), mxf_write_footer(), mxf_write_klv_fill(), mxf_write_partition(), mxf_write_random_index_pack(), nsv_parse_NSVf_header(), nsv_resync(), nut_read_header(), nut_read_packet(), nuv_packet(), ogg_read_timestamp(), ogg_save(), ogg_update_checksum(), ogg_write_page(), print_report(), process_ea_header(), process_ipmovie_chunk(), put_ebml_void(), put_header(), put_payload_parsing_info(), put_swf_end_tag(), put_swf_tag(), pva_read_timestamp(), r3d_read_header(), r3d_read_reda(), r3d_read_redv(), rdt_parse_packet(), read_atom(), read_braindead_odml_indx(), read_frame(), read_part_of_packet(), read_seek(), rm_assemble_video_frame(), rm_read_audio_stream_info(), roq_read_packet(), skip_reserved(), smacker_read_header(), smacker_read_packet(), start_ebml_master(), str_read_packet(), swf_write_header(), swf_write_trailer(), swf_write_video(), sync(), tta_read_header(), updatePacketSize(), updateSize(), vmd_read_packet(), wav_read_header(), wav_read_packet(), write_packet(), wv_read_block_header(), and wv_read_seek().

int url_resetbuf ( ByteIOContext s,
int  flags 
)

Reset the buffer for reading or writing.

Note:
Will drop any data currently in the buffer without transmitting it.
Parameters:
flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY to set up the buffer for writing.

Definition at line 590 of file aviobuf.c.

Referenced by init_put_byte(), and url_setbufsize().

int url_setbufsize ( ByteIOContext s,
int  buf_size 
)

Warning:
must be called before any I/O

Definition at line 575 of file aviobuf.c.

Referenced by av_open_input_file().


Generated on Fri Oct 26 02:35:45 2012 for FFmpeg by  doxygen 1.5.8