libgpac
Documentation of the core library of GPAC
|
#include <gpac/tools.h>
#include <gpac/download.h>
#include <gpac/network.h>
#include <gpac/token.h>
#include <gpac/thread.h>
#include <gpac/list.h>
#include <gpac/base_coding.h>
#include <gpac/cache.h>
#include <gpac/filters.h>
#include <gpac/revision.h>
#include <gpac/crypt.h>
Data Structures | |
struct | GF_HTTPHeader |
struct | GF_PartialDownload |
struct | GF_SessTask |
struct | __gf_download_session |
struct | __gf_download_manager |
Macros | |
#define | SIZE_IN_STREAM ( 2 << 29 ) |
#define | SESSION_RETRY_COUNT 10 |
#define | SESSION_RETRY_SSL 8 |
#define | GF_DOWNLOAD_AGENT_NAME "GPAC/"GPAC_VERSION "-rev" GPAC_GIT_REVISION |
#define | GF_DOWNLOAD_BUFFER_SIZE 50000 |
#define | GF_DOWNLOAD_BUFFER_SIZE_LIMIT_RATE GF_DOWNLOAD_BUFFER_SIZE/20 |
#define | GF_NETIO_SESSION_NO_STORE (1<<30) |
#define | SET_LAST_ERR(_e) sess->last_error = _e; |
#define | PUSH_HDR(_name, _value) |
Enumerations | |
enum | { GF_DOWNLOAD_SESSION_USE_SSL = 1<<10 , GF_DOWNLOAD_SESSION_THREAD_DEAD = 1<<11 , GF_DOWNLOAD_SESSION_SSL_FORCED = 1<<12 } |
enum | REQUEST_TYPE { GET = 0 , HEAD = 1 , OTHER = 2 } |
enum | HTTPCloseType { HTTP_NO_CLOSE =0 , HTTP_CLOSE , HTTP_RESET_CONN } |
Functions | |
static void | gf_dm_data_received (GF_DownloadSession *sess, u8 *payload, u32 payload_size, Bool store_in_init, u32 *rewrite_size, u8 *original_payload) |
static GF_Err | gf_dm_read_data (GF_DownloadSession *sess, char *data, u32 data_size, u32 *out_read) |
static void | gf_dm_connect (GF_DownloadSession *sess) |
GF_Err | gf_dm_sess_send (GF_DownloadSession *sess, u8 *data, u32 size) |
GF_Err | gf_dm_sess_flush_async (GF_DownloadSession *sess, Bool no_select) |
void | gf_dm_sess_set_header_ex (GF_DownloadSession *sess, const char *name, const char *value, Bool allow_overwrite) |
static GF_Err | dm_sess_write (GF_DownloadSession *sess, const u8 *buffer, u32 size) |
static void | dm_sess_sk_del (GF_DownloadSession *sess) |
static void | sess_connection_closed (GF_DownloadSession *sess) |
GF_Err | gf_cache_write_to_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess, const char *data, const u32 size, GF_Mutex *mx) |
GF_Err | gf_cache_close_write_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess, Bool success) |
Close the write file pointer of cache This function also flushes all buffers, so cache will always be consistent after. More... | |
GF_Err | gf_cache_open_write_cache (const DownloadedCacheEntry entry, const GF_DownloadSession *sess) |
Open the write file pointer of cache This function prepares calls for gf_cache_write_to_cache. More... | |
void | gf_cache_set_end_range (DownloadedCacheEntry entry, u64 range_end) |
Bool | gf_cache_is_in_progress (const DownloadedCacheEntry entry) |
static GF_Err | gf_user_credentials_save_digest (GF_DownloadManager *dm, GF_UserCredentials *creds, const char *password, Bool store_info) |
Saves the digest for authentication of password and username. More... | |
GF_UserCredentials * | gf_user_credentials_find_for_site (GF_DownloadManager *dm, const char *server_name, const char *user_name) |
static void | on_user_pass (void *udta, const char *user, const char *pass, Bool store_info) |
static GF_Err | gf_user_credentials_ask_password (GF_DownloadManager *dm, GF_UserCredentials *creds, Bool secure) |
Asks the user for credentials for given site. More... | |
GF_UserCredentials * | gf_user_credentials_register (GF_DownloadManager *dm, Bool secure, const char *server_name, const char *username, const char *password, Bool valid) |
static Bool | gf_dm_is_local (GF_DownloadManager *dm, const char *url) |
Bool | gf_dm_can_handle_url (const char *url) |
DownloadedCacheEntry | gf_dm_find_cached_entry_by_url (GF_DownloadSession *sess) |
DownloadedCacheEntry | gf_cache_create_entry (const char *cache_directory, const char *url, u64 start_range, u64 end_range, Bool mem_storage, GF_Mutex *mx) |
s32 | gf_cache_remove_session_from_cache_entry (DownloadedCacheEntry entry, GF_DownloadSession *sess) |
Bool | gf_cache_set_mime (const DownloadedCacheEntry entry, const char *mime) |
Bool | gf_cache_set_range (const DownloadedCacheEntry entry, u64 size, u64 start_range, u64 end_range) |
Bool | gf_cache_set_content (const DownloadedCacheEntry entry, GF_Blob *blob, Bool copy, GF_Mutex *mx) |
Bool | gf_cache_set_headers (const DownloadedCacheEntry entry, const char *headers) |
void | gf_cache_set_downtime (const DownloadedCacheEntry entry, u32 download_time_ms) |
void | gf_cache_set_max_age (const DownloadedCacheEntry entry, u32 max_age, Bool must_revalidate) |
static void | gf_dm_remove_cache_entry_from_session (GF_DownloadSession *sess) |
s32 | gf_cache_add_session_to_cache_entry (DownloadedCacheEntry entry, GF_DownloadSession *sess) |
Bool | gf_cache_entry_persistent (const DownloadedCacheEntry entry) |
void | gf_cache_entry_set_persistent (const DownloadedCacheEntry entry) |
static void | gf_dm_sess_notify_state (GF_DownloadSession *sess, GF_NetIOStatus dnload_status, GF_Err error) |
Bool | gf_cache_entry_can_reuse (const DownloadedCacheEntry entry, Bool skip_revalidate) |
Bool | gf_cache_entry_is_shared (const DownloadedCacheEntry entry) |
FILE * | gf_cache_open_read (const DownloadedCacheEntry entry) |
Bool | gf_cache_is_mem (const DownloadedCacheEntry entry) |
static void | gf_dm_configure_cache (GF_DownloadSession *sess) |
void | gf_dm_delete_cached_file_entry (const GF_DownloadManager *dm, const char *url) |
GF_EXPORT void | gf_dm_delete_cached_file_entry_session (const GF_DownloadSession *sess, const char *url, Bool force) |
void | gf_dm_sess_set_header (GF_DownloadSession *sess, const char *name, const char *value) |
GF_Err | gf_dm_sess_send_reply (GF_DownloadSession *sess, u32 reply_code, const char *response_body, u32 body_len, Bool no_body) |
void | gf_dm_sess_clear_headers (GF_DownloadSession *sess) |
static void | gf_dm_disconnect (GF_DownloadSession *sess, HTTPCloseType close_type) |
GF_EXPORT void | gf_dm_sess_del (GF_DownloadSession *sess) |
void | http_do_requests (GF_DownloadSession *sess) |
static void | gf_dm_sess_user_io (GF_DownloadSession *sess, GF_NETIO_Parameter *par) |
GF_EXPORT GF_Err | gf_dm_sess_last_error (GF_DownloadSession *sess) |
GF_EXPORT void | gf_dm_url_info_init (GF_URL_Info *info) |
GF_EXPORT void | gf_dm_url_info_del (GF_URL_Info *info) |
static s32 | gf_dm_parse_protocol (const char *url, GF_URL_Info *info) |
GF_EXPORT GF_Err | gf_dm_get_url_info (const char *url, GF_URL_Info *info, const char *baseURL) |
char * | gf_cache_get_forced_headers (const DownloadedCacheEntry entry) |
u32 | gf_cache_get_downtime (const DownloadedCacheEntry entry) |
u32 | gf_cache_is_done (const DownloadedCacheEntry entry) |
Bool | gf_cache_is_deleted (const DownloadedCacheEntry entry) |
static void | gf_dm_sess_reload_cached_headers (GF_DownloadSession *sess) |
GF_EXPORT GF_Err | gf_dm_sess_setup_from_url (GF_DownloadSession *sess, const char *url, Bool allow_direct_reuse) |
Bool | gf_dm_session_do_task (GF_DownloadSession *sess) |
Bool | gf_dm_session_task (GF_FilterSession *fsess, void *callback, u32 *reschedule_ms) |
static u32 | gf_dm_session_thread (void *par) |
static GF_DownloadSession * | gf_dm_sess_new_internal (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Socket *server, GF_Err *e) |
GF_EXPORT GF_DownloadSession * | gf_dm_sess_new_server (GF_DownloadManager *dm, GF_Socket *server, void *ssl_sock_ctx, gf_dm_user_io user_io, void *usr_cbk, Bool async, GF_Err *e) |
GF_DownloadSession * | gf_dm_sess_new_subsession (GF_DownloadSession *sess, u32 stream_id, void *usr_cbk, GF_Err *e) |
u32 | gf_dm_sess_subsession_count (GF_DownloadSession *sess) |
void | gf_dm_sess_server_reset (GF_DownloadSession *sess) |
GF_EXPORT GF_DownloadSession * | gf_dm_sess_new_simple (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Err *e) |
GF_EXPORT GF_DownloadSession * | gf_dm_sess_new (GF_DownloadManager *dm, const char *url, u32 dl_flags, gf_dm_user_io user_io, void *usr_cbk, GF_Err *e) |
DownloadedCacheEntry | gf_dm_refresh_cache_entry (GF_DownloadSession *sess) |
GF_EXPORT const char * | gf_dm_sess_mime_type (GF_DownloadSession *sess) |
GF_EXPORT GF_Err | gf_dm_sess_set_range (GF_DownloadSession *sess, u64 start_range, u64 end_range, Bool discontinue_cache) |
GF_EXPORT GF_Err | gf_dm_sess_process (GF_DownloadSession *sess) |
GF_EXPORT GF_Err | gf_dm_sess_process_headers (GF_DownloadSession *sess) |
GF_EXPORT GF_DownloadManager * | gf_dm_new (GF_FilterSession *fsess) |
GF_EXPORT void | gf_dm_set_auth_callback (GF_DownloadManager *dm, gf_dm_get_usr_pass get_user_password, void *usr_cbk) |
GF_EXPORT void | gf_dm_del (GF_DownloadManager *dm) |
static void | gf_icy_skip_data (GF_DownloadSession *sess, const char *data, u32 nbBytes) |
static char * | gf_dm_get_chunk_data (GF_DownloadSession *sess, Bool first_chunk_in_payload, char *body_start, u32 *payload_size, u32 *header_size) |
static void | dm_sess_update_download_rate (GF_DownloadSession *sess) |
static Bool | dm_exceeds_cap_rate (GF_DownloadManager *dm, GF_DownloadSession *for_sess) |
static void | gf_dm_sess_estimate_chunk_rate (GF_DownloadSession *sess, u32 nb_bytes) |
const u8 * | gf_cache_get_content (const DownloadedCacheEntry entry, u32 *size, u32 *max_valid_size, Bool *was_modified) |
void | gf_cache_release_content (const DownloadedCacheEntry entry) |
GF_EXPORT GF_Err | gf_dm_sess_fetch_data (GF_DownloadSession *sess, char *buffer, u32 buffer_size, u32 *read_size) |
GF_EXPORT GF_Err | gf_dm_sess_get_stats (GF_DownloadSession *sess, const char **server, const char **path, u64 *total_size, u64 *bytes_done, u32 *bytes_per_sec, GF_NetIOStatus *net_status) |
GF_EXPORT u64 | gf_dm_sess_get_utc_start (GF_DownloadSession *sess) |
GF_EXPORT const char * | gf_dm_sess_get_cache_name (GF_DownloadSession *sess) |
GF_EXPORT void | gf_dm_sess_abort (GF_DownloadSession *sess) |
static GF_Err | http_send_headers (GF_DownloadSession *sess) |
static GF_Err | http_parse_remaining_body (GF_DownloadSession *sess) |
static void | notify_error_body (GF_DownloadSession *sess, char *sHTTP, s32 bytesRead, s32 BodyStart) |
static u32 | http_parse_method (const char *comp) |
static GF_Err | wait_for_header_and_parse (GF_DownloadSession *sess) |
GF_EXPORT void | gf_dm_sess_set_max_rate (GF_DownloadSession *sess, u32 max_rate) |
GF_EXPORT u32 | gf_dm_sess_get_max_rate (GF_DownloadSession *sess) |
GF_EXPORT Bool | gf_dm_sess_is_regulated (GF_DownloadSession *sess) |
static void | wget_NetIO (void *cbk, GF_NETIO_Parameter *param) |
GF_EXPORT GF_Err | gf_dm_wget (const char *url, const char *filename, u64 start_range, u64 end_range, char **redirected_url) |
GF_EXPORT GF_Err | gf_dm_wget_with_cache (GF_DownloadManager *dm, const char *url, const char *filename, u64 start_range, u64 end_range, char **redirected_url) |
GF_EXPORT const char * | gf_dm_sess_get_resource_name (GF_DownloadSession *dnload) |
GF_EXPORT void | gf_dm_set_data_rate (GF_DownloadManager *dm, u32 rate_in_bits_per_sec) |
GF_EXPORT u32 | gf_dm_get_data_rate (GF_DownloadManager *dm) |
GF_EXPORT u32 | gf_dm_get_global_rate (GF_DownloadManager *dm) |
Bool | gf_dm_sess_is_h2 (GF_DownloadSession *sess) |
u32 | gf_dm_sess_get_resource_size (GF_DownloadSession *sess) |
GF_EXPORT const char * | gf_dm_sess_get_header (GF_DownloadSession *sess, const char *name) |
GF_EXPORT GF_Err | gf_dm_sess_enum_headers (GF_DownloadSession *sess, u32 *idx, const char **hdr_name, const char **hdr_val) |
GF_EXPORT GF_Err | gf_dm_sess_get_header_sizes_and_times (GF_DownloadSession *sess, u32 *req_hdr_size, u32 *rsp_hdr_size, u32 *connect_time, u32 *reply_time, u32 *download_time) |
GF_EXPORT void | gf_dm_sess_force_memory_mode (GF_DownloadSession *sess, u32 force_keep) |
GF_EXPORT GF_Err | gf_dm_set_localcache_provider (GF_DownloadManager *dm, Bool(*local_cache_url_provider_cbk)(void *udta, char *url, Bool is_cache_destroy), void *lc_udta) |
GF_EXPORT DownloadedCacheEntry | gf_dm_add_cache_entry (GF_DownloadManager *dm, const char *szURL, GF_Blob *blob, u64 start_range, u64 end_range, const char *mime, Bool clone_memory, u32 download_time_ms) |
GF_EXPORT GF_Err | gf_dm_force_headers (GF_DownloadManager *dm, const DownloadedCacheEntry entry, const char *headers) |
u32 | gf_dm_sess_async_pending (GF_DownloadSession *sess) |
void | gf_dm_sess_flush_h2 (GF_DownloadSession *sess) |
GF_Socket * | gf_dm_sess_get_socket (GF_DownloadSession *sess) |
void | gf_dm_sess_set_sock_group (GF_DownloadSession *sess, GF_SockGroup *sg) |
void | gf_dm_sess_detach_async (GF_DownloadSession *sess) |
void | gf_dm_sess_set_timeout (GF_DownloadSession *sess, u32 timeout) |
void | gf_dm_sess_set_netcap_id (GF_DownloadSession *sess, const char *netcap_id) |
struct GF_HTTPHeader |
struct GF_PartialDownload |
struct GF_SessTask |
#define SIZE_IN_STREAM ( 2 << 29 ) |
#define SESSION_RETRY_COUNT 10 |
#define SESSION_RETRY_SSL 8 |
#define GF_DOWNLOAD_AGENT_NAME "GPAC/"GPAC_VERSION "-rev" GPAC_GIT_REVISION |
#define GF_DOWNLOAD_BUFFER_SIZE 50000 |
#define GF_DOWNLOAD_BUFFER_SIZE_LIMIT_RATE GF_DOWNLOAD_BUFFER_SIZE/20 |
#define GF_NETIO_SESSION_NO_STORE (1<<30) |
#define SET_LAST_ERR | ( | _e | ) | sess->last_error = _e; |
#define PUSH_HDR | ( | _name, | |
_value | |||
) |
anonymous enum |
enum REQUEST_TYPE |
enum HTTPCloseType |
|
static |
|
static |
|
static |
void gf_dm_sess_set_header_ex | ( | GF_DownloadSession * | sess, |
const char * | name, | ||
const char * | value, | ||
Bool | allow_overwrite | ||
) |
|
static |
|
static |
GF_Err gf_cache_write_to_cache | ( | const DownloadedCacheEntry | entry, |
const GF_DownloadSession * | sess, | ||
const char * | data, | ||
const u32 | size, | ||
GF_Mutex * | mx | ||
) |
GF_Err gf_cache_close_write_cache | ( | const DownloadedCacheEntry | entry, |
const GF_DownloadSession * | sess, | ||
Bool | success | ||
) |
entry | The entry to use |
sess | The download session |
success | 1 if cache write is success, false otherwise |
GF_Err gf_cache_open_write_cache | ( | const DownloadedCacheEntry | entry, |
const GF_DownloadSession * | sess | ||
) |
entry | The entry to use |
sess | The download session |
void gf_cache_set_end_range | ( | DownloadedCacheEntry | entry, |
u64 | range_end | ||
) |
Bool gf_cache_is_in_progress | ( | const DownloadedCacheEntry | entry | ) |
|
static |
dm | The download manager |
creds | The credentials to fill |
GF_UserCredentials* gf_user_credentials_find_for_site | ( | GF_DownloadManager * | dm, |
const char * | server_name, | ||
const char * | user_name | ||
) |
Find a User's credentials for a given site
|
static |
|
static |
dm | The download manager |
creds | The credentials to fill |
GF_UserCredentials* gf_user_credentials_register | ( | GF_DownloadManager * | dm, |
Bool | secure, | ||
const char * | server_name, | ||
const char * | username, | ||
const char * | password, | ||
Bool | valid | ||
) |
|
static |
Bool gf_dm_can_handle_url | ( | const char * | url | ) |
DownloadedCacheEntry gf_dm_find_cached_entry_by_url | ( | GF_DownloadSession * | sess | ) |
Finds an existing entry in the cache for a given URL
sess | The session configured with the URL |
DownloadedCacheEntry gf_cache_create_entry | ( | const char * | cache_directory, |
const char * | url, | ||
u64 | start_range, | ||
u64 | end_range, | ||
Bool | mem_storage, | ||
GF_Mutex * | mx | ||
) |
Creates a new cache entry
s32 gf_cache_remove_session_from_cache_entry | ( | DownloadedCacheEntry | entry, |
GF_DownloadSession * | sess | ||
) |
Removes a session for a DownloadedCacheEntry
entry | The entry |
sess | The session to remove |
Bool gf_cache_set_mime | ( | const DownloadedCacheEntry | entry, |
const char * | mime | ||
) |
Bool gf_cache_set_range | ( | const DownloadedCacheEntry | entry, |
u64 | size, | ||
u64 | start_range, | ||
u64 | end_range | ||
) |
Bool gf_cache_set_content | ( | const DownloadedCacheEntry | entry, |
GF_Blob * | blob, | ||
Bool | copy, | ||
GF_Mutex * | mx | ||
) |
Bool gf_cache_set_headers | ( | const DownloadedCacheEntry | entry, |
const char * | headers | ||
) |
void gf_cache_set_downtime | ( | const DownloadedCacheEntry | entry, |
u32 | download_time_ms | ||
) |
|
static |
Removes a cache entry from cache and performs a cleanup if possible. If the cache entry is marked for deletion and has no sessions associated with it, it will be removed (so some modules using a streaming like cache will still work).
s32 gf_cache_add_session_to_cache_entry | ( | DownloadedCacheEntry | entry, |
GF_DownloadSession * | sess | ||
) |
Adds a session to a DownloadedCacheEntry. implemented in cache.c
entry | The entry |
sess | The session to add |
Bool gf_cache_entry_persistent | ( | const DownloadedCacheEntry | entry | ) |
void gf_cache_entry_set_persistent | ( | const DownloadedCacheEntry | entry | ) |
|
static |
Bool gf_cache_entry_is_shared | ( | const DownloadedCacheEntry | entry | ) |
FILE* gf_cache_open_read | ( | const DownloadedCacheEntry | entry | ) |
Bool gf_cache_is_mem | ( | const DownloadedCacheEntry | entry | ) |
|
static |
indicate we can destroy file upon destruction, except if disabled at session level
void gf_dm_delete_cached_file_entry | ( | const GF_DownloadManager * | dm, |
const char * | url | ||
) |
GF_EXPORT void gf_dm_delete_cached_file_entry_session | ( | const GF_DownloadSession * | sess, |
const char * | url, | ||
Bool | force | ||
) |
void gf_dm_sess_set_header | ( | GF_DownloadSession * | sess, |
const char * | name, | ||
const char * | value | ||
) |
GF_Err gf_dm_sess_send_reply | ( | GF_DownloadSession * | sess, |
u32 | reply_code, | ||
const char * | response_body, | ||
u32 | body_len, | ||
Bool | no_body | ||
) |
void gf_dm_sess_clear_headers | ( | GF_DownloadSession * | sess | ) |
|
static |
GF_EXPORT void gf_dm_sess_del | ( | GF_DownloadSession * | sess | ) |
void http_do_requests | ( | GF_DownloadSession * | sess | ) |
Default performing behavior
sess | The session |
|
static |
GF_EXPORT void gf_dm_url_info_init | ( | GF_URL_Info * | info | ) |
GF_EXPORT void gf_dm_url_info_del | ( | GF_URL_Info * | info | ) |
|
static |
url | The url to parse for protocol |
info | The info to fill |
char* gf_cache_get_forced_headers | ( | const DownloadedCacheEntry | entry | ) |
u32 gf_cache_get_downtime | ( | const DownloadedCacheEntry | entry | ) |
u32 gf_cache_is_done | ( | const DownloadedCacheEntry | entry | ) |
Bool gf_cache_is_deleted | ( | const DownloadedCacheEntry | entry | ) |
|
static |
GF_EXPORT GF_Err gf_dm_sess_setup_from_url | ( | GF_DownloadSession * | sess, |
const char * | url, | ||
Bool | allow_direct_reuse | ||
) |
Bool gf_dm_session_do_task | ( | GF_DownloadSession * | sess | ) |
|
static |
|
static |
GF_EXPORT GF_DownloadSession* gf_dm_sess_new_server | ( | GF_DownloadManager * | dm, |
GF_Socket * | server, | ||
void * | ssl_sock_ctx, | ||
gf_dm_user_io | user_io, | ||
void * | usr_cbk, | ||
Bool | async, | ||
GF_Err * | e | ||
) |
GF_DownloadSession* gf_dm_sess_new_subsession | ( | GF_DownloadSession * | sess, |
u32 | stream_id, | ||
void * | usr_cbk, | ||
GF_Err * | e | ||
) |
u32 gf_dm_sess_subsession_count | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_server_reset | ( | GF_DownloadSession * | sess | ) |
GF_EXPORT GF_DownloadSession* gf_dm_sess_new_simple | ( | GF_DownloadManager * | dm, |
const char * | url, | ||
u32 | dl_flags, | ||
gf_dm_user_io | user_io, | ||
void * | usr_cbk, | ||
GF_Err * | e | ||
) |
GF_EXPORT GF_DownloadSession* gf_dm_sess_new | ( | GF_DownloadManager * | dm, |
const char * | url, | ||
u32 | dl_flags, | ||
gf_dm_user_io | user_io, | ||
void * | usr_cbk, | ||
GF_Err * | e | ||
) |
DownloadedCacheEntry gf_dm_refresh_cache_entry | ( | GF_DownloadSession * | sess | ) |
GF_EXPORT const char* gf_dm_sess_mime_type | ( | GF_DownloadSession * | sess | ) |
GF_EXPORT GF_Err gf_dm_sess_set_range | ( | GF_DownloadSession * | sess, |
u64 | start_range, | ||
u64 | end_range, | ||
Bool | discontinue_cache | ||
) |
GF_EXPORT GF_DownloadManager* gf_dm_new | ( | GF_FilterSession * | fsess | ) |
GF_EXPORT void gf_dm_set_auth_callback | ( | GF_DownloadManager * | dm, |
gf_dm_get_usr_pass | get_user_password, | ||
void * | usr_cbk | ||
) |
GF_EXPORT void gf_dm_del | ( | GF_DownloadManager * | dm | ) |
|
static |
Skip ICY metadata from SHOUTCAST or ICECAST streams. Data will be skipped and parsed and sent as a GF_NETIO_Parameter to the user_io, so modules interrested by those streams may use the data
sess | The GF_DownloadSession |
data | last data received |
nbBytes | The number of bytes contained into data |
|
static |
|
static |
|
static |
|
static |
const u8* gf_cache_get_content | ( | const DownloadedCacheEntry | entry, |
u32 * | size, | ||
u32 * | max_valid_size, | ||
Bool * | was_modified | ||
) |
void gf_cache_release_content | ( | const DownloadedCacheEntry | entry | ) |
GF_EXPORT GF_Err gf_dm_sess_fetch_data | ( | GF_DownloadSession * | sess, |
char * | buffer, | ||
u32 | buffer_size, | ||
u32 * | read_size | ||
) |
GF_EXPORT GF_Err gf_dm_sess_get_stats | ( | GF_DownloadSession * | sess, |
const char ** | server, | ||
const char ** | path, | ||
u64 * | total_size, | ||
u64 * | bytes_done, | ||
u32 * | bytes_per_sec, | ||
GF_NetIOStatus * | net_status | ||
) |
GF_EXPORT const char* gf_dm_sess_get_cache_name | ( | GF_DownloadSession * | sess | ) |
GF_EXPORT void gf_dm_sess_abort | ( | GF_DownloadSession * | sess | ) |
|
static |
Sends the HTTP headers
sess | The GF_DownloadSession |
sHTTP | buffer containing the request |
|
static |
Parse the remaining part of body
sess | The session |
sHTTP | the data buffer |
|
static |
|
static |
|
static |
Waits for the response HEADERS, parse the information... and so on
sess | The session |
sHTTP | the data buffer |
|
static |
NET IO for MPD, we don't need this anymore since mime-type can be given by session
GF_EXPORT GF_Err gf_dm_wget | ( | const char * | url, |
const char * | filename, | ||
u64 | start_range, | ||
u64 | end_range, | ||
char ** | redirected_url | ||
) |
GF_EXPORT GF_Err gf_dm_wget_with_cache | ( | GF_DownloadManager * | dm, |
const char * | url, | ||
const char * | filename, | ||
u64 | start_range, | ||
u64 | end_range, | ||
char ** | redirected_url | ||
) |
GF_EXPORT const char* gf_dm_sess_get_resource_name | ( | GF_DownloadSession * | dnload | ) |
Bool gf_dm_sess_is_h2 | ( | GF_DownloadSession * | sess | ) |
u32 gf_dm_sess_get_resource_size | ( | GF_DownloadSession * | sess | ) |
GF_EXPORT const char* gf_dm_sess_get_header | ( | GF_DownloadSession * | sess, |
const char * | name | ||
) |
GF_EXPORT GF_Err gf_dm_sess_enum_headers | ( | GF_DownloadSession * | sess, |
u32 * | idx, | ||
const char ** | hdr_name, | ||
const char ** | hdr_val | ||
) |
GF_EXPORT GF_Err gf_dm_sess_get_header_sizes_and_times | ( | GF_DownloadSession * | sess, |
u32 * | req_hdr_size, | ||
u32 * | rsp_hdr_size, | ||
u32 * | connect_time, | ||
u32 * | reply_time, | ||
u32 * | download_time | ||
) |
GF_EXPORT GF_Err gf_dm_set_localcache_provider | ( | GF_DownloadManager * | dm, |
Bool(*)(void *udta, char *url, Bool is_cache_destroy) | local_cache_url_provider_cbk, | ||
void * | lc_udta | ||
) |
GF_EXPORT DownloadedCacheEntry gf_dm_add_cache_entry | ( | GF_DownloadManager * | dm, |
const char * | szURL, | ||
GF_Blob * | blob, | ||
u64 | start_range, | ||
u64 | end_range, | ||
const char * | mime, | ||
Bool | clone_memory, | ||
u32 | download_time_ms | ||
) |
GF_EXPORT GF_Err gf_dm_force_headers | ( | GF_DownloadManager * | dm, |
const DownloadedCacheEntry | entry, | ||
const char * | headers | ||
) |
u32 gf_dm_sess_async_pending | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_flush_h2 | ( | GF_DownloadSession * | sess | ) |
GF_Socket* gf_dm_sess_get_socket | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_set_sock_group | ( | GF_DownloadSession * | sess, |
GF_SockGroup * | sg | ||
) |
void gf_dm_sess_detach_async | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_set_timeout | ( | GF_DownloadSession * | sess, |
u32 | timeout | ||
) |
void gf_dm_sess_set_netcap_id | ( | GF_DownloadSession * | sess, |
const char * | netcap_id | ||
) |