libavformat/aviobuf.c File Reference

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

Go to the source code of this file.

Data Structures

struct  DynBuffer

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.
#define GET(name, type)
#define PUT(name, type)
#define GET_STR16(type, read)

Functions

static void fill_buffer (AVIOContext *s)
int ffio_init_context (AVIOContext *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))
int init_put_byte (AVIOContext *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))
AVIOContextav_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))
AVIOContextavio_alloc_context (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))
 Allocate and initialize an AVIOContext for buffered I/O.
static void flush_buffer (AVIOContext *s)
void avio_w8 (AVIOContext *s, int b)
void ffio_fill (AVIOContext *s, int b, int count)
void avio_write (AVIOContext *s, const unsigned char *buf, int size)
void avio_flush (AVIOContext *s)
int64_t avio_seek (AVIOContext *s, int64_t offset, int whence)
 fseek() equivalent for AVIOContext.
int64_t avio_skip (AVIOContext *s, int64_t offset)
 Skip given number of bytes forward.
int url_fskip (AVIOContext *s, int64_t offset)
int64_t url_ftell (AVIOContext *s)
int64_t avio_size (AVIOContext *s)
 Get the filesize.
int url_feof (AVIOContext *s)
 feof() equivalent for AVIOContext.
int url_ferror (AVIOContext *s)
void avio_wl32 (AVIOContext *s, unsigned int val)
void avio_wb32 (AVIOContext *s, unsigned int val)
void put_strz (AVIOContext *s, const char *str)
int get_byte (AVIOContext *s)
int get_buffer (AVIOContext *s, unsigned char *buf, int size)
int get_partial_buffer (AVIOContext *s, unsigned char *buf, int size)
void put_byte (AVIOContext *s, int val)
void put_buffer (AVIOContext *s, const unsigned char *buf, int size)
void put_nbyte (AVIOContext *s, int b, int count)
int url_fopen (AVIOContext **s, const char *filename, int flags)
int url_fclose (AVIOContext *s)
int64_t url_fseek (AVIOContext *s, int64_t offset, int whence)
int64_t url_fsize (AVIOContext *s)
int url_setbufsize (AVIOContext *s, int buf_size)
int url_fprintf (AVIOContext *s, const char *fmt,...)
void put_flush_packet (AVIOContext *s)
int av_url_read_fpause (AVIOContext *s, int pause)
int64_t av_url_read_fseek (AVIOContext *s, int stream_index, int64_t timestamp, int flags)
void init_checksum (AVIOContext *s, unsigned long(*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum)
unsigned long get_checksum (AVIOContext *s)
int url_open_dyn_buf (AVIOContext **s)
int url_open_dyn_packet_buf (AVIOContext **s, int max_packet_size)
int url_close_dyn_buf (AVIOContext *s, uint8_t **pbuffer)
int url_fdopen (AVIOContext **s, URLContext *h)
int avio_put_str (AVIOContext *s, const char *str)
 Write a NULL-terminated string.
int avio_put_str16le (AVIOContext *s, const char *str)
 Convert an UTF-8 string to UTF-16LE and write it.
int ff_get_v_length (uint64_t val)
 Get the length in bytes which is needed to store val as v.
void ff_put_v (AVIOContext *bc, uint64_t val)
 Put val using a variable number of bytes.
void avio_wl64 (AVIOContext *s, uint64_t val)
void avio_wb64 (AVIOContext *s, uint64_t val)
void avio_wl16 (AVIOContext *s, unsigned int val)
void avio_wb16 (AVIOContext *s, unsigned int val)
void avio_wl24 (AVIOContext *s, unsigned int val)
void avio_wb24 (AVIOContext *s, unsigned int val)
void put_tag (AVIOContext *s, const char *tag)
unsigned long ff_crc04C11DB7_update (unsigned long checksum, const uint8_t *buf, unsigned int len)
unsigned long ffio_get_checksum (AVIOContext *s)
void ffio_init_checksum (AVIOContext *s, unsigned long(*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum)
int avio_r8 (AVIOContext *s)
int url_fgetc (AVIOContext *s)
int avio_read (AVIOContext *s, unsigned char *buf, int size)
 Read size bytes from AVIOContext into buf.
int ffio_read_partial (AVIOContext *s, unsigned char *buf, int size)
 Read size bytes from AVIOContext into buf.
unsigned int avio_rl16 (AVIOContext *s)
unsigned int avio_rl24 (AVIOContext *s)
unsigned int avio_rl32 (AVIOContext *s)
uint64_t avio_rl64 (AVIOContext *s)
unsigned int avio_rb16 (AVIOContext *s)
unsigned int avio_rb24 (AVIOContext *s)
unsigned int avio_rb32 (AVIOContext *s)
char * get_strz (AVIOContext *s, char *buf, int maxlen)
int ff_get_line (AVIOContext *s, char *buf, int maxlen)
 Read a whole line of text from AVIOContext.
int avio_get_str (AVIOContext *s, int maxlen, char *buf, int buflen)
 Read a string from pb into buf.
uint64_t avio_rb64 (AVIOContext *s)
uint64_t ffio_read_varlen (AVIOContext *bc)
int ffio_fdopen (AVIOContext **s, URLContext *h)
 Create and initialize a AVIOContext for accessing the resource referenced by the URLContext h.
int ffio_set_buf_size (AVIOContext *s, int buf_size)
int url_resetbuf (AVIOContext *s, int flags)
 Reset the buffer for reading or writing.
int ffio_rewind_with_probe_data (AVIOContext *s, unsigned char *buf, int buf_size)
 Rewind the AVIOContext using the specified buffer containing the first buf_size bytes of the file.
int avio_open (AVIOContext **s, const char *filename, int flags)
 Create and initialize a AVIOContext for accessing the resource indicated by url.
int avio_close (AVIOContext *s)
 Close the resource accessed by the AVIOContext s and free it.
URLContexturl_fileno (AVIOContext *s)
int avio_printf (AVIOContext *s, const char *fmt,...)
char * url_fgets (AVIOContext *s, char *buf, int buf_size)
int url_fget_max_packet_size (AVIOContext *s)
int avio_pause (AVIOContext *s, int pause)
 Pause and resume playing - only meaningful if using a network streaming protocol (e.g.
int64_t avio_seek_time (AVIOContext *s, int stream_index, int64_t timestamp, int flags)
 Seek to a given timestamp relative to some component stream.
int url_open_buf (AVIOContext **s, uint8_t *buf, int buf_size, int flags)
int url_close_buf (AVIOContext *s)
 return the written or read size
static int dyn_buf_write (void *opaque, uint8_t *buf, int buf_size)
static int dyn_packet_buf_write (void *opaque, uint8_t *buf, int buf_size)
static int64_t dyn_buf_seek (void *opaque, int64_t offset, int whence)
static int url_open_dyn_buf_internal (AVIOContext **s, int max_packet_size)
int avio_open_dyn_buf (AVIOContext **s)
 Open a write only memory stream.
int ffio_open_dyn_packet_buf (AVIOContext **s, int max_packet_size)
 Open a write only packetized memory stream with a maximum packet size of 'max_packet_size'.
int avio_close_dyn_buf (AVIOContext *s, uint8_t **pbuffer)
 Return the written size and a pointer to the buffer.


Define Documentation

#define GET ( name,
type   ) 

Value:

type get_be ##name(AVIOContext *s) \
{\
    return avio_rb ##name(s);\
}\
    type get_le ##name(AVIOContext *s) \
{\
    return avio_rl ##name(s);\
}

Definition at line 321 of file aviobuf.c.

#define GET_STR16 ( type,
read   ) 

Value:

int avio_get_str16 ##type(AVIOContext *pb, int maxlen, char *buf, int buflen)\
{\
    char* q = buf;\
    int ret = 0;\
    if (buflen <= 0) \
        return AVERROR(EINVAL); \
    while (ret + 1 < maxlen) {\
        uint8_t tmp;\
        uint32_t ch;\
        GET_UTF16(ch, (ret += 2) <= maxlen ? read(pb) : 0, break;)\
        if (!ch)\
            break;\
        PUT_UTF8(ch, tmp, if (q - buf < buflen - 1) *q++ = tmp;)\
    }\
    *q = 0;\
    return ret;\
}\

Definition at line 797 of file aviobuf.c.

#define IO_BUFFER_SIZE   32768

Definition at line 31 of file aviobuf.c.

Referenced by ffio_fdopen(), and fill_buffer().

#define PUT ( name,
type   ) 

Value:

void put_le ##name(AVIOContext *s, type val)\
{\
        avio_wl ##name(s, val);\
}\
    void put_be ##name(AVIOContext *s, type val)\
{\
        avio_wb ##name(s, val);\
}

Definition at line 338 of file aviobuf.c.

#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 38 of file aviobuf.c.

Referenced by avio_seek().


Function Documentation

AVIOContext* 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 94 of file aviobuf.c.

int av_url_read_fpause ( AVIOContext s,
int  pause 
)

Definition at line 415 of file aviobuf.c.

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

Definition at line 419 of file aviobuf.c.

AVIOContext* avio_alloc_context ( 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 
)

Allocate and initialize an AVIOContext for buffered I/O.

It must be later freed with av_free().

Parameters:
buffer Memory block for input/output operations via AVIOContext. The buffer must be allocated with av_malloc() and friends.
buffer_size The buffer size is very important for performance. For protocols with fixed blocksize it should be set to this blocksize. For others a typical size is a cache page, e.g. 4kb.
write_flag Set to 1 if the buffer should be writable, 0 otherwise.
opaque An opaque pointer to user-specific data.
read_packet A function for refilling the buffer, may be NULL.
write_packet A function for writing the buffer contents, may be NULL.
seek A function for seeking to specified byte position, may be NULL.
Returns:
Allocated AVIOContext or NULL on failure.

Definition at line 108 of file aviobuf.c.

Referenced by av_alloc_put_byte(), http_receive_data(), rdt_parse_packet(), read_gab2_sub(), url_open_dyn_buf_internal(), and wtvfile_open_sector().

int avio_close ( AVIOContext s  ) 

Close the resource accessed by the AVIOContext s and free it.

This function can only be used if s was opened by avio_open().

Returns:
0 on success, an AVERROR < 0 on error.

Definition at line 973 of file aviobuf.c.

Referenced by av_close_input_file(), avformat_open_input(), build_feed_streams(), ff_rtp_chain_mux_open(), ff_rtsp_undo_setup(), ffmpeg_exit(), main(), mov_read_close(), parse_playlist(), read_packet(), rtsp_read_close(), sap_write_close(), and url_fclose().

int avio_close_dyn_buf ( AVIOContext s,
uint8_t **  pbuffer 
)

void avio_flush ( AVIOContext s  ) 

Definition at line 179 of file aviobuf.c.

Referenced by a64_write_packet(), adts_write_packet(), aiff_write_header(), aiff_write_trailer(), asf_write_header(), asf_write_trailer(), avi_write_ix(), avi_write_packet(), avi_write_trailer(), avio_close_dyn_buf(), caf_write_header(), caf_write_trailer(), crc_write_trailer(), daud_write_packet(), dv_write_packet(), ff_mov_write_packet(), ff_raw_write_packet(), ff_rtp_send_data(), ffm_write_header(), ffm_write_trailer(), flac_write_packet(), flac_write_trailer(), flush_packet(), flv_write_packet(), framecrc_write_packet(), gif_write_header(), gif_write_trailer(), gif_write_video(), gxf_write_header(), gxf_write_packet(), gxf_write_trailer(), ivf_write_packet(), md5_finish(), microdvd_write_header(), mkv_write_header(), mkv_write_trailer(), mov_write_header(), mov_write_trailer(), mp2_write_trailer(), mpegts_write_end(), mpegts_write_header(), mpegts_write_pes(), mpjpeg_write_header(), mpjpeg_write_packet(), mxf_write_footer(), mxf_write_packet(), mxf_write_partition(), ogg_write_page(), put_flush_packet(), put_vcd_padding_sector(), rm_write_audio(), rm_write_header(), rm_write_trailer(), rm_write_video(), roq_write_header(), rso_write_header(), rso_write_trailer(), rtp_check_and_send_back_rr(), rtp_send_punch_packets(), sox_write_header(), sox_write_trailer(), spdif_write_packet(), swf_write_header(), swf_write_trailer(), swf_write_video(), url_close_buf(), vc1test_write_packet(), vc1test_write_trailer(), write_header(), write_packet(), and write_trailer().

int avio_get_str ( AVIOContext pb,
int  maxlen,
char *  buf,
int  buflen 
)

Read a string from pb into buf.

The reading will terminate when either a NULL character was encountered, maxlen bytes have been read, or nothing more can be read from pb. The result is guaranteed to be NULL-terminated, it will be truncated if buf is too small. Note that the string is not interpreted or validated in any way, it might get truncated in the middle of a sequence for multi-byte encodings.

Returns:
number of bytes read (is always <= maxlen). If reading ends on EOF or error, the return value will be one more than bytes actually read.

Definition at line 779 of file aviobuf.c.

Referenced by get_strz().

int avio_open ( AVIOContext **  s,
const char *  url,
int  flags 
)

Create and initialize a AVIOContext for accessing the resource indicated by url.

Note:
When the resource indicated by url has been opened in read+write mode, the AVIOContext can be used only for writing.
Parameters:
s Used to return the pointer to the created AVIOContext. In case of failure the pointed to value is set to NULL.
flags flags which control how the resource indicated by url is to be opened
Returns:
0 in case of success, a negative value corresponding to an AVERROR code in case of failure

Definition at line 957 of file aviobuf.c.

Referenced by build_feed_streams(), init_input(), main(), mov_open_dref(), opt_output_file(), parse_playlist(), read_packet(), and url_fopen().

int avio_open_dyn_buf ( AVIOContext **  s  ) 

int avio_pause ( AVIOContext h,
int  pause 
)

Pause and resume playing - only meaningful if using a network streaming protocol (e.g.

MMS).

Parameters:
pause 1 for pause, 0 for resume

Definition at line 1030 of file aviobuf.c.

Referenced by av_read_pause(), av_read_play(), and av_url_read_fpause().

int avio_printf ( AVIOContext s,
const char *  fmt,
  ... 
)

int avio_put_str ( AVIOContext s,
const char *  str 
)

Write a NULL-terminated string.

Returns:
number of bytes written.

Definition at line 452 of file aviobuf.c.

Referenced by avi_write_info_tag(), ffm_write_header(), id3v2_put_ttag(), and put_strz().

int avio_put_str16le ( AVIOContext s,
const char *  str 
)

Convert an UTF-8 string to UTF-16LE and write it.

Returns:
number of bytes written.

Definition at line 463 of file aviobuf.c.

Referenced by asf_write_header1(), id3v2_put_ttag(), mms_put_utf16(), and put_str16().

int avio_r8 ( AVIOContext s  ) 

Definition at line 611 of file aviobuf.c.

Referenced by aea_read_header(), amf_parse_object(), amr_read_packet(), ape_tag_read_field(), asf_read_frame_header(), asf_read_header(), asf_read_language_list(), asf_read_marker(), asf_read_stream_properties(), asfrtp_parse_packet(), avi_read_header(), avio_get_str(), avio_rb16(), avio_rb24(), avio_rl16(), avio_rl24(), avs_read_packet(), bfi_read_packet(), cdata_read_header(), cin_read_file_header(), cin_read_frame_header(), dv_read_header(), dxa_read_header(), ebml_read_num(), ebml_read_uint(), efi_read(), ff_asf_get_packet(), ff_asf_parse_packet(), ff_get_line(), ff_id3v2_parse(), ff_mov_read_esds(), ff_mov_read_stsd_entries(), ff_mp4_read_dec_config_descr(), ff_mp4_read_descr(), ff_mp4_read_descr_len(), ff_sauce_read(), ffio_read_varlen(), ffm_read_header(), ffm_resync(), find_any_startcode(), find_next_start_code(), flv_read_header(), flv_read_metabody(), flv_read_packet(), flv_set_video_codec(), get_attachment(), get_byte(), get_codec_data(), get_line(), get_pts(), get_size(), get_str(), get_str8(), get_strl(), get_token(), gxf_header(), gxf_material_tags(), gxf_packet(), gxf_resync_media(), gxf_track_tags(), iff_read_header(), ipmovie_read_header(), klv_decode_ber_length(), mmf_read_header(), mov_read_chpl(), mov_read_ctts(), mov_read_dref(), mov_read_elst(), mov_read_hdlr(), mov_read_mac_string(), 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_iods(), mpc8_read_header(), mpc_read_header(), mpegps_psm_parse(), mpegps_read_header(), mpegps_read_packet(), mpegps_read_pes_header(), mpegts_resync(), 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(), ogg_read_page(), parse_chunks(), parse_keyframes_index(), parse_packet_header(), pmp_packet(), process_audio_header_eacs(), process_audio_header_elements(), qcp_read_header(), qcp_read_packet(), 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(), read_ttag(), 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(), spdif_read_packet(), swf_read_header(), swf_read_packet(), sync(), tmv_read_header(), url_fgets(), vc1t_read_header(), vc1t_read_packet(), vid_read_packet(), voc_get_packet(), wv_read_block_header(), wv_read_packet(), yop_read_header(), yuv4_read_header(), and yuv4_read_packet().

unsigned int avio_rb16 ( AVIOContext s  ) 

unsigned int avio_rb24 ( AVIOContext s  ) 

unsigned int avio_rb32 ( AVIOContext s  ) 

Definition at line 748 of file aviobuf.c.

Referenced by aiff_read_header(), amf_parse_object(), au_read_header(), avio_rb64(), decode_frame_header(), dv_read_header(), dxa_read_header(), ea_read_packet(), ebml_read_float(), ff_id3v2_parse(), ff_mov_read_chan(), ff_mov_read_esds(), ff_mov_read_stsd_entries(), ff_mp4_read_dec_config_descr(), ff_rm_read_mdpr_codecdata(), ffm_read_header(), flv_read_header(), flv_read_packet(), get_aiff_header(), get_packetheader(), get_tag(), gxf_material_tags(), gxf_packet(), gxf_resync_media(), gxf_track_tags(), iff_read_header(), lmlm4_read_packet(), matroska_read_header(), mmf_read_header(), mov_read_chap(), mov_read_chpl(), mov_read_cmov(), mov_read_ctts(), mov_read_default(), mov_read_dref(), mov_read_elst(), mov_read_ftyp(), mov_read_hdlr(), mov_read_mdhd(), mov_read_mvhd(), mov_read_pasp(), mov_read_stco(), mov_read_stps(), 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(), 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_keyframes_index(), parse_packet_header(), process_audio_header_eacs(), qcp_read_header(), qt_rtp_parse_packet(), r3d_read_rdvo(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), r3d_read_reos(), rdt_load_mdpr(), read_atom(), read_desc_chunk(), read_header(), read_info_chunk(), read_packet(), read_pakt_chunk(), read_part_of_packet(), rl2_read_header(), rm_read_audio_stream_info(), rm_read_header(), rm_read_index(), siff_parse_soun(), siff_parse_vbv1(), sox_read_header(), swf_read_header(), sync(), thp_read_header(), thp_read_packet(), vqf_read_header(), wc3_read_header(), and wc3_read_packet().

uint64_t avio_rb64 ( AVIOContext s  ) 

int avio_read ( AVIOContext s,
unsigned char *  buf,
int  size 
)

Read size bytes from AVIOContext into buf.

Returns:
number of bytes read or AVERROR

Definition at line 631 of file aviobuf.c.

Referenced by add_metadata(), aiff_read_header(), amf_get_string(), amr_read_header(), amr_read_packet(), apc_read_header(), ape_read_header(), ape_read_packet(), ape_tag_read_field(), asf_read_stream_properties(), av_append_packet(), av_get_packet(), av_probe_input_buffer(), av_read(), avi_read_header(), avi_read_nikon(), avi_read_tag(), 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_ape_parse_tag(), ff_asf_parse_packet(), ff_get_guid(), ff_id3v1_read(), ff_id3v2_parse(), ff_id3v2_read(), ff_mp4_read_dec_config_descr(), ff_rm_parse_packet(), ff_sauce_read(), 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_attachment(), get_buffer(), get_codec_data(), get_meta(), get_metadata(), get_packet_header(), get_pts(), get_riff(), get_str(), get_tag(), idcin_read_header(), idcin_read_packet(), iff_read_header(), iff_read_packet(), ingenient_read_packet(), ipmovie_read_header(), klv_read_packet(), load_ipmovie_packet(), lxf_read_header(), lxf_read_packet(), mmf_read_packet(), mov_read_chpl(), mov_read_cmov(), mov_read_dref(), mov_read_extradata(), mov_read_ftyp(), mov_read_glbl(), mov_read_smi(), mov_read_strf(), mov_read_stsz(), mov_read_udta_string(), mov_read_wave(), mp4_read_iods(), 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_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(), mxg_update_cache(), nsv_parse_NSVf_header(), nuv_header(), nuv_packet(), ogg_read_page(), oma_read_header(), parse_chunks(), process_ipmovie_chunk(), qcp_read_header(), r3d_read_red1(), read_frame(), read_header(), read_kuki_chunk(), read_packet(), read_part_of_packet(), read_seek(), read_ttag(), rl2_read_header(), rm_assemble_video_frame(), rm_read_audio_stream_info(), rm_read_extradata(), roq_read_header(), roq_read_packet(), seq_fill_buffer(), seq_read_packet(), siff_read_packet(), smacker_read_header(), smacker_read_packet(), sox_read_header(), spdif_read_packet(), str_read_header(), str_read_packet(), swf_read_packet(), sync(), thp_read_header(), tta_read_header(), vc1t_read_header(), vmd_read_header(), vmd_read_packet(), vqf_read_packet(), wc3_read_header(), wc3_read_packet(), wsaud_read_header(), wsaud_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), wtvfile_read_packet(), wv_read_block_header(), wv_read_packet(), yop_read_header(), and yop_read_packet().

unsigned int avio_rl16 ( AVIOContext s  ) 

unsigned int avio_rl24 ( AVIOContext s  ) 

unsigned int avio_rl32 ( AVIOContext s  ) 

Definition at line 717 of file aviobuf.c.

Referenced by aiff_read_header(), apc_read_header(), ape_read_header(), ape_tag_read_field(), asf_build_simple_index(), asf_read_ext_stream_properties(), asf_read_file_properties(), asf_read_frame_header(), asf_read_header(), asf_read_marker(), asf_read_metadata(), asf_read_stream_properties(), au_read_header(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_read_info(), avi_read_nikon(), avio_rl64(), avs_read_header(), bfi_read_header(), bfi_read_packet(), cin_read_file_header(), cin_read_frame_header(), dfa_read_header(), dxa_read_header(), ea_read_packet(), ff_ape_parse_tag(), ff_asf_get_packet(), ff_mov_read_stsd_entries(), ff_rm_read_mdpr_codecdata(), ffm_read_header(), flac_read_header(), fourxm_read_packet(), get_aiff_header(), get_attachment(), get_codec_data(), get_fourcc(), get_riff(), get_swf_tag(), get_tag(), get_value(), guess_ni_flag(), gxf_header(), gxf_read_index(), idcin_read_header(), idcin_read_packet(), iff_read_header(), ingenient_read_packet(), mmf_read_header(), mov_read_cmov(), mov_read_default(), mov_read_dref(), mov_read_hdlr(), mov_read_meta(), mov_read_udta_string(), mov_read_wide(), mpc8_read_header(), mpc_read_header(), mpc_read_packet(), msnwc_tcp_read_packet(), mtv_read_header(), nsv_parse_NSVf_header(), nsv_parse_NSVs_header(), nsv_read_chunk(), nuv_header(), ogg_read_page(), parse_chunks(), parse_legacy_attrib(), pmp_header(), pmp_packet(), process_audio_header_eacs(), process_audio_header_sead(), process_ea_header(), process_video_header_vp6(), qcp_read_header(), qcp_read_packet(), qt_rtp_parse_packet(), rdt_load_mdpr(), read_atom(), read_braindead_odml_indx(), read_gab2_sub(), read_header(), read_ints(), read_packet(), rl2_read_header(), rm_read_audio_stream_info(), rm_read_header(), rm_read_index(), rpl_read_packet(), siff_parse_soun(), siff_parse_vbv1(), siff_read_header(), siff_read_packet(), smacker_read_header(), smacker_read_packet(), sol_read_header(), sox_read_header(), swf_read_header(), tmv_read_header(), tta_read_header(), txd_read_packet(), vc1t_read_header(), vc1t_read_packet(), voc_get_packet(), vqf_read_header(), wc3_read_header(), wc3_read_packet(), wv_read_block_header(), wv_read_packet(), xa_read_header(), and xwma_read_header().

uint64_t avio_rl64 ( AVIOContext s  ) 

int64_t avio_seek ( AVIOContext s,
int64_t  offset,
int  whence 
)

fseek() equivalent for AVIOContext.

Returns:
new position or AVERROR.

Definition at line 185 of file aviobuf.c.

Referenced by adjust_write_index(), aiff_read_header(), aiff_write_trailer(), 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(), av_estimate_timings_from_pts(), 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_write_counters(), avi_write_ix(), avi_write_trailer(), avio_skip(), avio_tell(), bfi_read_header(), caf_write_trailer(), dv_read_header(), dv_read_seek(), dxa_read_header(), dxa_read_packet(), ea_read_packet(), efi_read(), end_ebml_master(), end_header(), ff_ape_parse_tag(), ff_asf_get_packet(), ff_gen_syncpoint_search(), ff_id3v1_read(), ff_id3v2_parse(), ff_id3v2_read(), ff_restore_parser_state(), ff_sauce_read(), ffm_read_data(), ffm_seek1(), film_read_packet(), find_and_decode_index(), find_any_startcode(), flac_read_header(), flac_write_trailer(), flic_read_header(), flv_read_header(), flv_read_packet(), flv_write_header(), flv_write_trailer(), get_attachment(), get_tag(), guess_ni_flag(), gxf_read_timestamp(), gxf_resync_media(), gxf_seek(), gxf_write_trailer(), gxf_write_umf_media_description(), iff_read_header(), ipmovie_read_header(), load_ipmovie_packet(), matroska_execute_seekhead(), matroska_read_seek(), mkv_write_seekhead(), mkv_write_trailer(), mov_read_chapters(), mov_read_dref(), mov_read_meta(), mov_read_packet(), 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_header(), mpc_read_packet(), mpegps_read_dts(), mpegps_read_header(), 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(), nsv_read_seek(), nut_read_header(), ogg_get_length(), ogg_read_timestamp(), ogg_restore(), ogg_update_checksum(), parse_keyframes_index(), parse_media_type(), pcm_read_seek(), process_ea_header(), put_swf_end_tag(), pva_read_timestamp(), qt_rtp_parse_packet(), r3d_read_header(), r3d_seek(), rdt_load_mdpr(), read_braindead_odml_indx(), read_frame(), read_header(), read_packet(), read_seek(), rl2_read_packet(), rm_read_dts(), rm_read_header(), rm_read_index(), rm_write_trailer(), roq_read_packet(), rpl_read_header(), rpl_read_packet(), rso_write_trailer(), seq_fill_buffer(), seq_init_frame_buffers(), seq_parse_frame_data(), seq_read_packet(), skip_reserved(), smacker_read_packet(), sox_write_trailer(), str_read_header(), swf_write_trailer(), thp_read_header(), thp_read_packet(), tmv_read_seek(), tta_read_header(), tta_read_seek(), updatePacketSize(), updateSize(), url_fseek(), url_fskip(), url_ftell(), vc1test_write_trailer(), vid_read_packet(), vmd_read_header(), vmd_read_packet(), vqf_read_seek(), wc3_read_header(), wc3_read_packet(), write_hint_packets(), wsvqa_read_header(), wtvfile_open_sector(), wtvfile_read_packet(), wtvfile_seek(), wv_read_block_header(), wv_read_header(), wv_read_seek(), yop_read_header(), and yop_read_seek().

int64_t avio_seek_time ( AVIOContext h,
int  stream_index,
int64_t  timestamp,
int  flags 
)

Seek to a given timestamp relative to some component stream.

Only meaningful if using a network streaming protocol (e.g. MMS.).

Parameters:
stream_index The stream index that the timestamp is relative to. If stream_index is (-1) the timestamp should be in AV_TIME_BASE units from the beginning of the presentation. If a stream_index >= 0 is used and the protocol does not support seeking based on component streams, the call will fail with ENOTSUP.
timestamp timestamp in AVStream.time_base units or if there is no stream specified then in AV_TIME_BASE units.
flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE and AVSEEK_FLAG_ANY. The protocol may silently ignore AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will fail with ENOTSUP if used and not supported.
Returns:
>= 0 on success
See also:
AVInputFormat::read_seek

Definition at line 1037 of file aviobuf.c.

Referenced by asf_read_seek(), av_url_read_fseek(), and flv_read_seek().

int64_t avio_size ( AVIOContext s  ) 

int64_t avio_skip ( AVIOContext s,
int64_t  offset 
)

Skip given number of bytes forward.

Returns:
new position or AVERROR.

Definition at line 242 of file aviobuf.c.

Referenced by aea_read_header(), aiff_read_header(), amf_get_string(), amf_parse_object(), ape_read_header(), ape_tag_read_field(), asf_build_simple_index(), asf_read_content_desc(), asf_read_ext_content_desc(), asf_read_ext_stream_properties(), asf_read_frame_header(), asf_read_header(), asf_read_language_list(), asf_read_marker(), asf_read_metadata(), asf_read_stream_properties(), asfrtp_parse_packet(), au_read_header(), avi_load_index(), avi_read_header(), avi_read_nikon(), avi_write_ix(), avi_write_trailer(), avs_read_header(), avs_read_packet(), bfi_read_header(), cdata_read_header(), decode_frame(), dfa_read_header(), dfa_read_packet(), dxa_read_header(), ea_read_packet(), ebml_parse_elem(), ff_asf_parse_packet(), ff_id3v2_parse(), ff_mov_read_chan(), ff_mov_read_stsd_entries(), ff_rm_read_mdpr_codecdata(), ff_sauce_read(), flac_read_header(), flic_read_packet(), flv_read_header(), flv_read_packet(), flv_write_header(), fourxm_read_header(), fourxm_read_packet(), get_aiff_header(), get_codec_data(), get_dts(), get_meta(), get_packet_header(), get_tag(), gxf_header(), gxf_material_tags(), gxf_packet(), gxf_read_index(), gxf_track_tags(), idcin_read_packet(), iff_read_header(), ingenient_read_packet(), lmlm4_read_packet(), lxf_read_header(), matroska_read_header(), mmf_read_header(), mov_read_chan(), mov_read_default(), mov_read_dref(), mov_read_mvhd(), mov_read_strf(), mov_read_wave(), mov_read_wide(), mp3_parse_vbr_tags(), mpc8_handle_chunk(), mpc8_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(), nut_read_packet(), nuv_header(), nuv_packet(), ogg_read_page(), parse_chunks(), parse_media_type(), parse_videoinfoheader2(), pmp_header(), pmp_packet(), process_audio_header_eacs(), process_ea_header(), process_ipmovie_chunk(), process_video_header_mdec(), process_video_header_vp6(), qcp_read_header(), qcp_read_packet(), qt_rtp_parse_packet(), r3d_read_packet(), r3d_read_red1(), r3d_read_reos(), rdt_load_mdpr(), read_gab2_sub(), read_header(), read_kuki_chunk(), read_packet(), read_part_of_packet(), rl2_read_header(), rm_read_audio_stream_info(), rm_read_dts(), rm_read_header(), rm_read_index(), roq_read_packet(), rpl_read_packet(), siff_parse_soun(), siff_parse_vbv1(), siff_read_header(), sol_read_header(), sox_read_header(), spdif_read_packet(), swf_read_header(), swf_read_packet(), sync(), tmv_read_packet(), tta_read_header(), txd_read_packet(), vc1t_read_header(), vid_read_header(), voc_get_packet(), voc_read_header(), vqf_read_header(), wc3_read_header(), wc3_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), wv_read_block_header(), wv_read_header(), xa_read_header(), xwma_read_header(), yop_read_header(), and yop_read_packet().

void avio_w8 ( AVIOContext s,
int  b 
)

Definition at line 143 of file aviobuf.c.

Referenced by a64_write_packet(), aiff_write_trailer(), asf_write_header1(), avi_write_header(), avi_write_info_tag(), avi_write_ix(), avi_write_packet(), avio_put_str(), avio_wb16(), avio_wb24(), avio_wb32(), avio_wl16(), avio_wl24(), avio_wl32(), ff_isom_write_avcc(), ff_put_v(), ff_rtp_send_data(), ffm_write_header(), flac_write_block_padding(), 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_media_description(), gxf_write_umf_packet(), id3v2_put_size(), id3v2_put_ttag(), 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_chpl_tag(), mov_write_d263_tag(), mov_write_edts_tag(), mov_write_esds_tag(), mov_write_hdlr_tag(), mov_write_itunes_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_mpegvideo_desc(), mxf_write_system_item(), mxf_write_timecode_component(), mxf_write_umid(), ogg_write_page(), output_immediate(), output_match(), put_amf_bool(), put_amf_double(), put_avc_eos_tag(), put_byte(), put_ebml_id(), put_ebml_num(), put_ebml_size_unknown(), put_ebml_uint(), put_ebml_void(), put_padding_packet(), put_payload_header(), put_payload_parsing_info(), put_str(), put_str8(), put_tag(), put_timestamp(), put_vcd_padding_sector(), put_xiph_codecpriv(), put_xiph_size(), putDescr(), rm_write_video(), rtp_check_and_send_back_rr(), rtp_send_punch_packets(), rv10_write_header(), sox_write_header(), swf_write_header(), swf_write_video(), vc1test_write_header(), voc_write_packet(), voc_write_trailer(), write_escape_str(), write_header(), write_packet(), write_packet_header(), write_streamheader(), write_tags(), and write_trailer().

void avio_wb16 ( AVIOContext s,
unsigned int  val 
)

void avio_wb24 ( AVIOContext s,
unsigned int  val 
)

void avio_wb32 ( AVIOContext s,
unsigned int  val 
)

Definition at line 307 of file aviobuf.c.

Referenced by aiff_write_header(), aiff_write_trailer(), avio_wb64(), caf_write_header(), ff_avc_parse_nal_units(), ff_mov_write_chan(), 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_packet(), id3v2_put_ttag(), 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_chpl_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_hmhd_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_ms_tag(), mov_write_mvhd_tag(), mov_write_nmhd_tag(), mov_write_pasp_tag(), mov_write_psp_udta_tag(), mov_write_rtp_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_tapt_tag(), mov_write_tkhd_tag(), mov_write_trailer(), mov_write_trak_tag(), mov_write_tref_tag(), mov_write_trkn_tag(), mov_write_udta_sdp(), 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(), output_match(), put_avc_eos_tag(), put_padding_packet(), rm_write_trailer(), rm_write_video(), rtp_check_and_send_back_rr(), rtp_send_punch_packets(), rv10_write_header(), sox_write_header(), swf_write_video(), updatePacketSize(), updateSize(), write_hint_packets(), write_packet_header(), and write_trailer().

void avio_wb64 ( AVIOContext s,
uint64_t  val 
)

void avio_wl16 ( AVIOContext s,
unsigned int  val 
)

void avio_wl24 ( AVIOContext s,
unsigned int  val 
)

Definition at line 522 of file aviobuf.c.

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

void avio_wl32 ( AVIOContext s,
unsigned int  val 
)

void avio_wl64 ( AVIOContext s,
uint64_t  val 
)

void avio_write ( AVIOContext s,
const unsigned char *  buf,
int  size 
)

Definition at line 164 of file aviobuf.c.

Referenced by a64_write_header(), a64_write_packet(), adts_write_packet(), aiff_write_header(), aiff_write_packet(), asf_write_header1(), asfrtp_parse_packet(), avi_write_packet(), avio_close_dyn_buf(), avio_printf(), avio_put_str(), caf_write_packet(), crc_write_trailer(), daud_write_packet(), dv_write_packet(), ff_avc_parse_nal_units(), ff_flac_write_header(), ff_isom_write_avcc(), ff_mov_write_packet(), ff_raw_write_packet(), ff_rtp_send_data(), ffm_write_header(), flac_write_block_comment(), 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_material_data_section(), gxf_write_mpeg_auxiliary(), gxf_write_packet(), gxf_write_track_description(), gxf_write_umf_media_description(), http_send_data(), id3v2_put_ttag(), ivf_write_header(), ivf_write_packet(), latm_parse_packet(), matroska_read_header(), md5_finish(), microdvd_write_header(), mkv_flush_dynbuf(), mkv_write_ass_blocks(), mkv_write_block(), mkv_write_codecprivate(), mov_write_3gp_udta_tag(), mov_write_ac3_tag(), mov_write_chpl_tag(), mov_write_esds_tag(), mov_write_extradata_tag(), mov_write_glbl_tag(), mov_write_hdlr_tag(), mov_write_string_data_tag(), mov_write_subtitle_tag(), mov_write_udta_sdp(), mov_write_udta_tag(), mov_write_video_tag(), mp2_write_trailer(), mpegts_insert_null_packet(), mpegts_insert_pcr_only(), 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(), output_immediate(), put_amf_string(), put_buffer(), put_ebml_binary(), put_frame(), put_guid(), put_packet(), put_str(), put_str16(), put_swf_matrix(), put_swf_rect(), put_xiph_codecpriv(), rm_write_audio(), rm_write_video(), roq_write_header(), rso_write_packet(), rtp_check_and_send_back_rr(), rtsp_cmd_describe(), rv10_write_header(), section_write_packet(), sox_write_header(), sox_write_packet(), spdif_write_packet(), svq3_parse_packet(), swf_write_header(), swf_write_video(), url_fprintf(), vc1test_write_header(), vc1test_write_packet(), voc_write_header(), voc_write_packet(), vp8_handle_packet(), write_chapter(), write_globalinfo(), write_header(), write_hint_packets(), write_mainheader(), write_packet(), write_streamheader(), write_streaminfo(), write_trailer(), and xiph_handle_packet().

static int64_t dyn_buf_seek ( void *  opaque,
int64_t  offset,
int  whence 
) [static]

Definition at line 1134 of file aviobuf.c.

Referenced by url_open_dyn_buf_internal().

static int dyn_buf_write ( void *  opaque,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 1089 of file aviobuf.c.

Referenced by dyn_packet_buf_write(), and url_open_dyn_buf_internal().

static int dyn_packet_buf_write ( void *  opaque,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 1119 of file aviobuf.c.

Referenced by url_open_dyn_buf_internal().

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

Definition at line 586 of file aviobuf.c.

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

int ff_get_line ( AVIOContext s,
char *  buf,
int  maxlen 
)

Read a whole line of text from AVIOContext.

Stop reading after reaching either a \n, a \0 or EOF. The returned string is always \0-terminated, and may be truncated if the buffer is too small.

Parameters:
s the read-only AVIOContext
buf buffer to store the read line
maxlen size of the buffer
Returns:
the length of the string written in the buffer, not including the final \0

Definition at line 764 of file aviobuf.c.

Referenced by microdvd_read_header(), microdvd_read_packet(), read_chomp_line(), read_header(), and srt_read_packet().

int ff_get_v_length ( uint64_t  val  ) 

Get the length in bytes which is needed to store val as v.

Definition at line 480 of file aviobuf.c.

Referenced by ff_put_v(), and write_packet().

void ff_put_v ( AVIOContext bc,
uint64_t  val 
)

Put val using a variable number of bytes.

Definition at line 489 of file aviobuf.c.

Referenced by put_packet(), put_s(), put_str(), put_tt(), write_chapter(), write_globalinfo(), write_mainheader(), write_packet(), write_streamheader(), and write_streaminfo().

int ffio_fdopen ( AVIOContext **  s,
URLContext h 
)

Create and initialize a AVIOContext for accessing the resource referenced by the URLContext h.

Note:
When the URLContext h has been opened in read+write mode, the AVIOContext can be used only for writing.
Parameters:
s Used to return the pointer to the created AVIOContext. In case of failure the pointed to value is set to NULL.
Returns:
0 in case of success, a negative value corresponding to an AVERROR code in case of failure

Definition at line 840 of file aviobuf.c.

Referenced by avio_open(), ff_rtp_chain_mux_open(), and url_fdopen().

void ffio_fill ( AVIOContext s,
int  b,
int  count 
)

Definition at line 150 of file aviobuf.c.

Referenced by put_nbyte(), and spdif_write_packet().

unsigned long ffio_get_checksum ( AVIOContext s  ) 

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

Definition at line 599 of file aviobuf.c.

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

int ffio_init_context ( AVIOContext 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 
)

int ffio_open_dyn_packet_buf ( AVIOContext **  s,
int  max_packet_size 
)

Open a write only packetized memory stream with a maximum packet size of 'max_packet_size'.

The stream is stored in a memory buffer with a big endian 4 byte header giving the packet size in bytes.

Parameters:
s new IO context
max_packet_size maximum packet size (must be > 0)
Returns:
zero if no error.

Definition at line 1175 of file aviobuf.c.

Referenced by ff_mov_add_hinted_packet(), ff_rtp_chain_mux_open(), http_prepare_data(), rtp_new_av_stream(), tcp_write_packet(), and url_open_dyn_packet_buf().

int ffio_read_partial ( AVIOContext s,
unsigned char *  buf,
int  size 
)

Read size bytes from AVIOContext 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 678 of file aviobuf.c.

Referenced by ff_raw_read_partial_packet(), and get_partial_buffer().

uint64_t ffio_read_varlen ( AVIOContext bc  ) 

int ffio_rewind_with_probe_data ( AVIOContext s,
unsigned char *  buf,
int  buf_size 
)

Rewind the AVIOContext using the specified buffer containing the first buf_size bytes of the file.

Used after probing to avoid seeking. Joins buf and s->buffer, taking any overlap into consideration.

Note:
s->buffer must overlap with buf or they can't be joined and the function fails
Parameters:
s The read-only AVIOContext to rewind
buf The probe buffer containing the first buf_size bytes of the file
buf_size The size of buf
Returns:
0 in case of success, a negative value corresponding to an AVERROR code in case of failure

Definition at line 918 of file aviobuf.c.

Referenced by av_probe_input_buffer().

int ffio_set_buf_size ( AVIOContext s,
int  buf_size 
)

Warning:
must be called before any I/O

Definition at line 880 of file aviobuf.c.

Referenced by fill_buffer(), and url_setbufsize().

static void fill_buffer ( AVIOContext s  )  [static]

Definition at line 545 of file aviobuf.c.

Referenced by avio_r8(), avio_read(), avio_seek(), ffio_read_partial(), url_feof(), and url_fgetc().

static void flush_buffer ( AVIOContext s  )  [static]

Definition at line 125 of file aviobuf.c.

Referenced by avio_flush(), avio_seek(), avio_w8(), avio_write(), and ffio_fill().

unsigned long get_checksum ( AVIOContext s  ) 

Definition at line 430 of file aviobuf.c.

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

Deprecated:
use avio_get_str instead

Definition at line 757 of file aviobuf.c.

Referenced by ffm_read_header(), mov_read_chapters(), and read_info_chunk().

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

Definition at line 424 of file aviobuf.c.

int init_put_byte ( AVIOContext 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 
)

Definition at line 82 of file aviobuf.c.

void put_strz ( AVIOContext s,
const char *  str 
)

Definition at line 316 of file aviobuf.c.

int url_close_buf ( AVIOContext s  ) 

return the written or read size

Definition at line 1073 of file aviobuf.c.

int url_feof ( AVIOContext s  ) 

feof() equivalent for AVIOContext.

Returns:
non zero if and only if end of file

Definition at line 279 of file aviobuf.c.

Referenced by amr_read_packet(), ape_read_packet(), applehttp_read_packet(), asf_build_simple_index(), asf_read_header(), avi_load_index(), avi_read_header(), avi_read_idx1(), avio_read(), bfi_read_packet(), cin_read_frame_header(), daud_packet(), dv_read_header(), dxa_read_header(), dxa_read_packet(), ebml_read_num(), ff_asf_get_packet(), ff_asf_parse_packet(), ffio_read_partial(), ffm_resync(), 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(), 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(), read_thread(), rm_read_header(), rm_read_packet(), roq_read_packet(), smacker_read_packet(), sol_read_packet(), sox_read_packet(), spdif_read_packet(), srt_read_packet(), str_read_packet(), sync(), tmv_read_packet(), txd_read_packet(), url_fgets(), vc1t_read_packet(), vid_read_packet(), wc3_read_header(), wc3_read_packet(), wtvfile_read_packet(), and wv_read_packet().

int url_ferror ( AVIOContext s  ) 

Definition at line 291 of file aviobuf.c.

Referenced by av_interleaved_write_frame(), av_write_frame(), and av_write_trailer().

int url_fget_max_packet_size ( AVIOContext s  ) 

Deprecated:
use AVIOContext.max_packet_size directly.

Definition at line 1024 of file aviobuf.c.

char* url_fgets ( AVIOContext 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 1003 of file aviobuf.c.

URLContext* url_fileno ( AVIOContext s  ) 

Definition at line 983 of file aviobuf.c.

int url_open_buf ( AVIOContext **  s,
uint8_t *  buf,
int  buf_size,
int  flags 
)

Definition at line 1059 of file aviobuf.c.

static int url_open_dyn_buf_internal ( AVIOContext **  s,
int  max_packet_size 
) [static]

Definition at line 1148 of file aviobuf.c.

Referenced by avio_open_dyn_buf(), and ffio_open_dyn_packet_buf().

int url_resetbuf ( AVIOContext 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 896 of file aviobuf.c.

Referenced by ffio_init_context(), and ffio_set_buf_size().


Generated on Fri Oct 26 02:38:20 2012 for FFmpeg by  doxygen 1.5.8