|
VLC
4.0.0-dev
|
HTTP read-only files. More...
|
Macros | |
| #define | vlc_http_file_get_status vlc_http_res_get_status |
| #define | vlc_http_file_get_redirect vlc_http_res_get_redirect |
| #define | vlc_http_file_get_type vlc_http_res_get_type |
| #define | vlc_http_file_destroy vlc_http_res_destroy |
Functions | |
| struct vlc_http_resource * | vlc_http_file_create (struct vlc_http_mgr *mgr, const char *url, const char *ua, const char *ref) |
| Creates an HTTP file. More... | |
| uintmax_t | vlc_http_file_get_size (struct vlc_http_resource *) |
| Gets file size. More... | |
| bool | vlc_http_file_can_seek (struct vlc_http_resource *) |
| Checks seeking support. More... | |
| int | vlc_http_file_seek (struct vlc_http_resource *, uintmax_t offset) |
| Sets the read offset. More... | |
| struct block_t * | vlc_http_file_read (struct vlc_http_resource *) |
| Reads data. More... | |
HTTP read-only files.
| #define vlc_http_file_destroy vlc_http_res_destroy |
| #define vlc_http_file_get_redirect vlc_http_res_get_redirect |
| #define vlc_http_file_get_status vlc_http_res_get_status |
| #define vlc_http_file_get_type vlc_http_res_get_type |
Referenced by FileControl().
| bool vlc_http_file_can_seek | ( | struct vlc_http_resource * | ) |
Checks seeking support.
| true | if file supports seeking |
| false | if file does not support seeking |
References vlc_http_resource::response, vlc_http_msg_can_seek(), and vlc_http_res_get_status().
Referenced by FileControl().
| struct vlc_http_resource* vlc_http_file_create | ( | struct vlc_http_mgr * | mgr, |
| const char * | url, | ||
| const char * | ua, | ||
| const char * | ref | ||
| ) |
Creates an HTTP file.
Allocates a structure for a remote HTTP-served read-only file.
| url | URL of the file to read |
| ua | user agent string (or NULL to ignore) |
| ref | referral URL (or NULL to ignore) |
References vlc_http_file::offset, vlc_http_file::resource, unlikely, and vlc_http_res_init().
Referenced by Open().
| uintmax_t vlc_http_file_get_size | ( | struct vlc_http_resource * | ) |
Gets file size.
Determines the file size in bytes.
References vlc_http_resource::response, vlc_http_msg_get_file_size(), vlc_http_msg_get_size(), and vlc_http_res_get_status().
Referenced by FileControl().
| struct block_t* vlc_http_file_read | ( | struct vlc_http_resource * | ) |
Reads data.
Reads data from a file and update the file offset.
References block_t::i_buffer, vlc_http_file::offset, vlc_http_resource::response, vlc_http_error, vlc_http_file_seek(), vlc_http_msg_can_seek(), vlc_http_msg_get_file_size(), and vlc_http_res_read().
Referenced by FileRead().
| int vlc_http_file_seek | ( | struct vlc_http_resource * | , |
| uintmax_t | offset | ||
| ) |
Sets the read offset.
| offset | byte offset of next read |
| 0 | if seek succeeded |
| -1 | if seek failed |
References vlc_http_file::offset, vlc_http_resource::response, vlc_http_msg_destroy(), vlc_http_msg_get_status(), and vlc_http_res_open().
Referenced by FileSeek(), and vlc_http_file_read().
1.8.13