|
Libav
0.7.1
|
unbuffered private I/O API More...
Go to the source code of this file.
Data Structures | |
| struct | URLContext |
| struct | URLProtocol |
Defines | |
| #define | URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ |
Typedefs | |
| typedef struct URLContext | URLContext |
| typedef struct URLProtocol | URLProtocol |
Functions | |
| int | ffurl_alloc (URLContext **h, const char *url, int flags) |
| Create a URLContext for accessing to the resource indicated by url, but do not initiate the connection yet. | |
| int | ffurl_connect (URLContext *h) |
| Connect an URLContext that has been allocated by ffurl_alloc. | |
| int | ffurl_open (URLContext **h, const char *url, int flags) |
| Create an URLContext for accessing to the resource indicated by url, and open it. | |
| int | ffurl_read (URLContext *h, unsigned char *buf, int size) |
| Read up to size bytes from the resource accessed by h, and store the read bytes in buf. | |
| int | ffurl_read_complete (URLContext *h, unsigned char *buf, int size) |
| Read as many bytes as possible (up to size), calling the read function multiple times if necessary. | |
| int | ffurl_write (URLContext *h, const unsigned char *buf, int size) |
| Write size bytes from buf to the resource accessed by h. | |
| int64_t | ffurl_seek (URLContext *h, int64_t pos, int whence) |
| Change the position that will be used by the next read/write operation on the resource accessed by h. | |
| int | ffurl_close (URLContext *h) |
| Close the resource accessed by the URLContext h, and free the memory used by it. | |
| int64_t | ffurl_size (URLContext *h) |
| Return the filesize of the resource accessed by h, AVERROR(ENOSYS) if the operation is not supported by h, or another negative value corresponding to an AVERROR error code in case of failure. | |
| int | ffurl_get_file_handle (URLContext *h) |
| Return the file descriptor associated with this URL. | |
| int | ffurl_register_protocol (URLProtocol *protocol, int size) |
| Register the URLProtocol protocol. | |
| int | ff_udp_set_remote_url (URLContext *h, const char *uri) |
| If no filename is given to av_open_input_file because you want to get the local port first, then you must call this function to set the remote server address. | |
| int | ff_udp_get_local_port (URLContext *h) |
| Return the local port used by the UDP connection. | |
Variables | |
| int(* | url_interrupt_cb )(void) |
unbuffered private I/O API
Definition in file url.h.
| #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ |
Definition at line 32 of file url.h.
Referenced by ffurl_alloc().
| typedef struct URLContext URLContext |
| typedef struct URLProtocol URLProtocol |
| int ff_udp_get_local_port | ( | URLContext * | h | ) |
Return the local port used by the UDP connection.
| h | media file context |
Definition at line 284 of file udp.c.
Referenced by rtp_get_local_rtcp_port(), rtp_get_local_rtp_port(), and rtp_open().
| int ff_udp_set_remote_url | ( | URLContext * | h, |
| const char * | uri | ||
| ) |
If no filename is given to av_open_input_file because you want to get the local port first, then you must call this function to set the remote server address.
url syntax: udp://host:port[?option=val...] option: 'ttl=n' : set the ttl value (for multicast only) 'localport=n' : set the local port 'pkt_size=n' : set max packet size 'reuse=1' : enable reusing the socket
| h | media file context |
| uri | of the remote server |
Definition at line 245 of file udp.c.
Referenced by rtp_set_remote_url(), and udp_open().
| int ffurl_alloc | ( | URLContext ** | h, |
| const char * | url, | ||
| int | flags | ||
| ) |
Create a URLContext for accessing to the resource indicated by url, but do not initiate the connection yet.
| puc | pointer to the location where, in case of success, the function puts the pointer to the created URLContext |
| flags | flags which control how the resource indicated by url is to be opened |
Definition at line 222 of file avio.c.
Referenced by avio_check(), ffurl_open(), mmsh_open(), and open_input().
| int ffurl_close | ( | URLContext * | h | ) |
Close the resource accessed by the URLContext h, and free the memory used by it.
Definition at line 328 of file avio.c.
Referenced by applehttp_close(), applehttp_read(), applehttp_read_seek(), avio_check(), avio_close(), avio_open(), concat_close(), concat_open(), crypto_close(), ff_rtsp_undo_setup(), ffurl_open(), free_variant_list(), gopher_close(), http_close(), http_open_cnx(), http_seek(), md5_close(), mms_close(), mmsh_close(), mmsh_open(), open_input(), read_data(), recheck_discard_flags(), rtmp_close(), rtp_close(), rtp_open(), sap_read_close(), and sap_write_close().
| int ffurl_connect | ( | URLContext * | h | ) |
Connect an URLContext that has been allocated by ffurl_alloc.
Definition at line 128 of file avio.c.
Referenced by avio_check(), ffurl_open(), mmsh_open(), and open_input().
| int ffurl_get_file_handle | ( | URLContext * | h | ) |
Return the file descriptor associated with this URL.
For RTP, this will return only the RTP file descriptor, not the RTCP file descriptor.
Definition at line 389 of file avio.c.
Referenced by http_get_file_handle(), rtp_open(), rtsp_write_packet(), sap_fetch_packet(), and sap_write_header().
| int ffurl_open | ( | URLContext ** | h, |
| const char * | url, | ||
| int | flags | ||
| ) |
Create an URLContext for accessing to the resource indicated by url, and open it.
| puc | pointer to the location where, in case of success, the function puts the pointer to the created URLContext |
| flags | flags which control how the resource indicated by url is to be opened |
Definition at line 250 of file avio.c.
Referenced by applehttp_read(), avio_open(), concat_open(), crypto_open(), gopher_open(), http_open_cnx(), md5_close(), mms_open(), open_input(), rtmp_open(), rtp_open(), sap_read_header(), and sap_write_header().
| int ffurl_read | ( | URLContext * | h, |
| unsigned char * | buf, | ||
| int | size | ||
| ) |
Read up to size bytes from the resource accessed by h, and store the read bytes in buf.
Definition at line 293 of file avio.c.
Referenced by applehttp_read(), concat_read(), crypto_read(), ff_rtmp_packet_read(), ffio_fdopen(), gopher_read(), http_getc(), http_read(), read_data(), sap_fetch_packet(), and sap_read_header().
| int ffurl_read_complete | ( | URLContext * | h, |
| unsigned char * | buf, | ||
| int | size | ||
| ) |
Read as many bytes as possible (up to size), calling the read function multiple times if necessary.
This makes special short-read handling in applications unnecessary, if the return value is < size then it is certain there was either an error or the end of file was reached.
Definition at line 300 of file avio.c.
Referenced by ff_rtmp_packet_read(), ff_rtsp_tcp_read_packet(), get_chunk_header(), get_http_header_data(), get_tcp_server_response(), open_input(), read_data_packet(), and rtmp_handshake().
| int ffurl_register_protocol | ( | URLProtocol * | protocol, |
| int | size | ||
| ) |
Register the URLProtocol protocol.
| size | the size of the URLProtocol struct referenced |
| int64_t ffurl_seek | ( | URLContext * | h, |
| int64_t | pos, | ||
| int | whence | ||
| ) |
Change the position that will be used by the next read/write operation on the resource accessed by h.
| pos | specifies the new position to set |
| whence | specifies how pos should be interpreted, it must be one of SEEK_SET (seek from the beginning), SEEK_CUR (seek from the current position), SEEK_END (seek from the end), or AVSEEK_SIZE (return the filesize of the requested resource, pos is ignored). |
Definition at line 318 of file avio.c.
Referenced by concat_read(), concat_seek(), ffio_fdopen(), ffurl_connect(), and ffurl_size().
| int64_t ffurl_size | ( | URLContext * | h | ) |
Return the filesize of the resource accessed by h, AVERROR(ENOSYS) if the operation is not supported by h, or another negative value corresponding to an AVERROR error code in case of failure.
Definition at line 374 of file avio.c.
Referenced by concat_open().
| int ffurl_write | ( | URLContext * | h, |
| const unsigned char * | buf, | ||
| int | size | ||
| ) |
Write size bytes from buf to the resource accessed by h.
Definition at line 307 of file avio.c.
Referenced by ff_rtmp_packet_write(), ffio_fdopen(), gopher_write(), http_close(), http_connect(), http_write(), md5_close(), rtmp_handshake(), rtp_check_and_send_back_rr(), rtp_send_punch_packets(), rtp_write(), sap_write_close(), sap_write_packet(), send_command_packet(), and tcp_write_packet().
| int(* url_interrupt_cb)(void) |
Definition at line 53 of file avio.c.
Referenced by applehttp_read(), avformat_find_stream_info(), avio_set_interrupt_cb(), read_data(), retry_transfer_wrapper(), rtp_read(), and tcp_open().
1.7.6.1