libavformat/avio.c File Reference

#include "avformat.h"
#include "avstring.h"

Go to the source code of this file.

Functions

static int default_interrupt_cb (void)
URLProtocolav_protocol_next (URLProtocol *p)
int register_protocol (URLProtocol *protocol)
int url_open (URLContext **puc, const char *filename, int flags)
int url_read (URLContext *h, unsigned char *buf, int size)
int url_write (URLContext *h, unsigned char *buf, int size)
offset_t url_seek (URLContext *h, offset_t pos, int whence)
int url_close (URLContext *h)
int url_exist (const char *filename)
offset_t url_filesize (URLContext *h)
int url_get_max_packet_size (URLContext *h)
 Return the maximum packet size associated to packetized file handle.
void url_get_filename (URLContext *h, char *buf, int buf_size)
void url_set_interrupt_cb (URLInterruptCB *interrupt_cb)
 The callback is called in blocking functions to test regulary if asynchronous interruption is needed.
int av_url_read_pause (URLContext *h, int pause)
 Pause and resume playing - only meaningful if using a network streaming protocol (e.g.
offset_t av_url_read_seek (URLContext *h, int stream_index, int64_t timestamp, int flags)
 Seek to a given timestamp relative to some component stream.

Variables

URLProtocolfirst_protocol = NULL
URLInterruptCBurl_interrupt_cb = default_interrupt_cb


Function Documentation

URLProtocol* av_protocol_next ( URLProtocol p  ) 

Definition at line 29 of file avio.c.

Referenced by opt_show_formats().

int av_url_read_pause ( URLContext 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 193 of file avio.c.

offset_t av_url_read_seek ( URLContext 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 200 of file avio.c.

static int default_interrupt_cb ( void   )  [static]

Definition at line 181 of file avio.c.

Referenced by url_set_interrupt_cb().

int register_protocol ( URLProtocol protocol  ) 

Definition at line 35 of file avio.c.

int url_close ( URLContext h  ) 

int url_exist ( const char *  filename  ) 

Definition at line 146 of file avio.c.

Referenced by build_feed_streams(), find_image_range(), and opt_output_file().

offset_t url_filesize ( URLContext h  ) 

Definition at line 155 of file avio.c.

void url_get_filename ( URLContext h,
char *  buf,
int  buf_size 
)

Definition at line 175 of file avio.c.

int url_get_max_packet_size ( URLContext h  ) 

Return the maximum packet size associated to packetized file handle.

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

Parameters:
h file handle
Returns:
maximum packet size in bytes

Definition at line 170 of file avio.c.

Referenced by http_prepare_data(), rtp_new_av_stream(), rtp_open(), and url_fdopen().

int url_open ( URLContext **  puc,
const char *  filename,
int  flags 
)

int url_read ( URLContext h,
unsigned char *  buf,
int  size 
)

Definition at line 104 of file avio.c.

Referenced by http_getc(), http_read(), udp_read_packet(), url_fdopen(), and url_readbuf().

offset_t url_seek ( URLContext h,
offset_t  pos,
int  whence 
)

Definition at line 125 of file avio.c.

Referenced by url_fdopen(), and url_filesize().

void url_set_interrupt_cb ( URLInterruptCB interrupt_cb  ) 

The callback is called in blocking functions to test regulary if asynchronous interruption is needed.

AVERROR(EINTR) is returned in this case by the interrupted function. 'NULL' means no interrupt callback is given.

Definition at line 186 of file avio.c.

Referenced by av_encode(), and decode_thread().

int url_write ( URLContext h,
unsigned char *  buf,
int  size 
)


Variable Documentation

Definition at line 26 of file avio.c.

URLInterruptCB* url_interrupt_cb = default_interrupt_cb

Definition at line 27 of file avio.c.

Referenced by tcp_open(), tcp_read(), tcp_write(), udp_read_packet(), and url_set_interrupt_cb().


Generated on Fri Apr 23 15:12:03 2010 for ffmpeg by  doxygen 1.5.6