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. | |
uintmax_t | vlc_http_file_get_size (struct vlc_http_resource *) |
Gets file size. | |
bool | vlc_http_file_can_seek (struct vlc_http_resource *) |
Checks seeking support. | |
int | vlc_http_file_seek (struct vlc_http_resource *file, uintmax_t offset) |
Sets the read offset. | |
block_t * | vlc_http_file_read (struct vlc_http_resource *) |
Reads data. | |
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 |
bool vlc_http_file_can_seek | ( | struct vlc_http_resource * | res | ) |
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.
mgr | HTTP connection manager |
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, vlc_http_file_callbacks, and vlc_http_res_init().
Referenced by Open().
uintmax_t vlc_http_file_get_size | ( | struct vlc_http_resource * | res | ) |
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().
block_t * vlc_http_file_read | ( | struct vlc_http_resource * | res | ) |
Reads data.
Reads data from a file and update the file offset.
References vlc_frame_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 * | file, |
uintmax_t | offset | ||
) |
Sets the read offset.
file | the HTTP file resource to set the read offset on |
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().