![]() |
libgpac
Documentation of the core library of GPAC
|
#include <gpac/internal/media_dev.h>
#include <gpac/constants.h>
#include <gpac/maths.h>
#include <gpac/filters.h>
#include <gpac/ietf.h>
#include <gpac/config_file.h>
#include <gpac/base_coding.h>
#include <gpac/network.h>
Data Structures | |
struct | HTTP_DIRInfo |
struct | GF_HTTPOutCtx |
struct | GF_HTTPOutInput |
struct | HTTByteRange |
struct | GF_HTTPOutSession |
struct | GF_HTTPFileIO |
struct | HTTP_DirEnum |
Macros | |
#define | OFFS(_n) #_n, offsetof(GF_HTTPOutCtx, _n) |
Enumerations | |
enum | { MODE_DEFAULT =0 , MODE_PUSH , MODE_SOURCE } |
enum | { CORS_AUTO =0 , CORS_OFF , CORS_ON } |
enum | { HTTP_PUT_HEADER_ENCODING =0 , HTTP_PUT_HEADER_MIME , HTTP_PUT_HEADER_RANGE , HTTP_PUT_HEADER_DONE } |
Functions | |
GF_DownloadSession * | gf_dm_sess_new_server (GF_DownloadManager *dm, GF_Socket *server, void *ssl_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 *) |
GF_Socket * | gf_dm_sess_get_socket (GF_DownloadSession *) |
GF_Err | gf_dm_sess_send (GF_DownloadSession *sess, u8 *data, u32 size) |
void | gf_dm_sess_clear_headers (GF_DownloadSession *sess) |
void | gf_dm_sess_set_header (GF_DownloadSession *sess, const char *name, const char *value) |
GF_Err | gf_dm_sess_flush_async (GF_DownloadSession *sess, Bool no_select) |
u32 | gf_dm_sess_async_pending (GF_DownloadSession *sess) |
GF_Err | gf_dm_sess_send_reply (GF_DownloadSession *sess, u32 reply_code, const char *response_body, Bool no_body) |
void | gf_dm_sess_server_reset (GF_DownloadSession *sess) |
Bool | gf_dm_sess_is_h2 (GF_DownloadSession *sess) |
void | gf_dm_sess_flush_h2 (GF_DownloadSession *sess) |
void | gf_dm_sess_set_sock_group (GF_DownloadSession *sess, GF_SockGroup *sg) |
static void | httpio_del (GF_HTTPFileIO *hio) |
static GF_Err | httpio_seek (GF_FileIO *fileio, u64 offset, s32 whence) |
static u32 | httpio_read (GF_FileIO *fileio, u8 *buffer, u32 bytes) |
static u32 | httpio_write (GF_FileIO *fileio, u8 *buffer, u32 bytes) |
static s64 | httpio_tell (GF_FileIO *fileio) |
static Bool | httpio_eof (GF_FileIO *fileio) |
static GF_FileIO * | httpio_open (GF_FileIO *fileio_ref, const char *url, const char *mode, GF_Err *out_err) |
static void | httpout_close_session (GF_HTTPOutSession *sess) |
static void | log_request_done (GF_HTTPOutSession *sess) |
static Bool | httpout_sess_flush_close (GF_HTTPOutSession *sess, Bool close_session) |
static void | httpout_format_date (u64 time, char szDate[200], Bool for_listing) |
static Bool | httpout_dir_file_enum (void *cbck, char *item_name, char *item_path, GF_FileEnumInfo *file_info, Bool is_dir) |
static Bool | httpout_dir_enum (void *cbck, char *item_name, char *item_path, GF_FileEnumInfo *file_info) |
static Bool | httpout_file_enum (void *cbck, char *item_name, char *item_path, GF_FileEnumInfo *file_info) |
static char * | httpout_create_listing (GF_HTTPOutCtx *ctx, char *full_path, HTTP_DIRInfo *di) |
static void | httpout_set_local_path (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in) |
static Bool | httpout_sess_parse_range (GF_HTTPOutSession *sess, char *range) |
static Bool | httpout_do_log (GF_HTTPOutSession *sess, u32 method) |
static const char * | get_method_name (u32 method) |
GF_Err | httpout_new_subsession (GF_HTTPOutSession *sess, u32 stream_id) |
static u32 | httpout_auth_check (HTTP_DIRInfo *di, const char *auth_header, Bool for_write) |
static void | httpout_sess_io (void *usr_cbk, GF_NETIO_Parameter *parameter) |
static void | httpout_in_io_ex (void *usr_cbk, GF_NETIO_Parameter *parameter, Bool is_llhls) |
static void | httpout_in_io (void *usr_cbk, GF_NETIO_Parameter *parameter) |
static void | httpout_in_io_llhls (void *usr_cbk, GF_NETIO_Parameter *parameter) |
static GF_Err | httpout_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove) |
static void | httpout_check_connection (GF_HTTPOutSession *sess) |
static void | httpout_check_new_session (GF_HTTPOutCtx *ctx) |
static GF_Err | httpout_initialize (GF_Filter *filter) |
static void | httpout_del_session (GF_HTTPOutSession *s) |
static void | httpout_check_mem_path (GF_HTTPOutSession *sess, GF_HTTPOutInput *in) |
static void | httpout_close_hls_chunk (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in, Bool final_flush) |
static void | httpout_finalize (GF_Filter *filter) |
static GF_Err | httpout_sess_data_upload (GF_HTTPOutSession *sess, const u8 *data, u32 size) |
static void | httpout_process_session (GF_Filter *filter, GF_HTTPOutCtx *ctx, GF_HTTPOutSession *sess) |
static Bool | httpout_close_upload (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in, Bool for_llhls) |
static Bool | httpout_open_input (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in, const char *name, Bool is_delete, Bool is_static) |
static void | httpout_input_in_error (GF_HTTPOutInput *in) |
static void | httpout_close_input (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in) |
static void | httpout_close_input_llhls (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in) |
static Bool | httpout_open_input_llhls (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in, char *dst) |
u32 | httpout_write_input (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in, const u8 *pck_data, u32 pck_size, Bool file_start) |
static Bool | httpout_input_write_ready (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in) |
static void | httpin_send_seg_info (GF_HTTPOutInput *in) |
static void | httpout_prune_files (GF_HTTPOutCtx *ctx, GF_HTTPOutInput *in) |
static void | httpout_process_inputs (GF_HTTPOutCtx *ctx) |
static GF_Err | httpout_process (GF_Filter *filter) |
static Bool | httpout_process_event (GF_Filter *filter, const GF_FilterEvent *evt) |
static GF_FilterProbeScore | httpout_probe_url (const char *url, const char *mime) |
static Bool | httpout_use_alias (GF_Filter *filter, const char *url, const char *mime) |
const GF_FilterRegister * | httpout_register (GF_FilterSession *session) |
Variables | |
static const GF_FilterCapability | HTTPOutCaps [] |
static const GF_FilterArgs | HTTPOutArgs [] |
GF_FilterRegister | HTTPOutRegister |
struct HTTP_DIRInfo |
struct GF_HTTPOutCtx |
Data Fields | ||
---|---|---|
char * | dst | |
char * | user_agent | |
char * | ifce | |
char * | cache_control | |
char * | ext | |
char * | mime | |
char * | wdir | |
char * | cert | |
char * | pkey | |
char * | reqlog | |
GF_PropStringList | rdirs | |
Bool | close | |
Bool | hold | |
Bool | quit | |
Bool | post | |
Bool | dlist | |
Bool | ice | |
Bool | reopen | |
Bool | blockio | |
u32 | port | |
u32 | block_size | |
u32 | maxc | |
u32 | maxp | |
u32 | timeout | |
u32 | hmode | |
u32 | sutc | |
u32 | cors | |
u32 | max_client_errors | |
u32 | max_async_buf | |
s32 | max_cache_segs | |
GF_Filter * | filter | |
GF_Socket * | server_sock | |
GF_List * | sessions | |
GF_List * | active_sessions | |
GF_List * | inputs | |
s32 | next_wake_us | |
char * | ip | |
Bool | done | |
struct __httpout_input * | dst_in | |
GF_SockGroup * | sg | |
Bool | no_etag | |
u32 | nb_connections | |
Bool | had_connections | |
GF_FilterCapability | in_caps[2] | |
char | szExt[10] | |
Bool | single_mode | |
void * | ssl_ctx | |
u64 | req_id | |
Bool | log_record | |
const char * | mem_url | |
GF_FileIO * | mem_fileio | |
u32 | nb_sess_flush_pending | |
GF_List * | directories | |
Bool | has_read_dir | |
Bool | has_write_dir |
struct GF_HTTPOutInput |
Data Fields | ||
---|---|---|
GF_HTTPOutCtx * | ctx | |
GF_FilterPid * | ipid | |
char * | path | |
Bool | dash_mode | |
char * | mime | |
u32 | nb_dest | |
Bool | hold | |
Bool | is_open | |
Bool | done | |
Bool | is_delete | |
Bool | patch_blocks | |
GF_List * | file_deletes | |
GF_DownloadSession * | upload | |
GF_Socket * | upload_sock | |
Bool | is_h2 | |
u32 | cur_header | |
u64 | offset_at_seg_start | |
u64 | nb_write | |
u64 | write_start_range | |
u64 | write_end_range | |
char | range_hdr[100] | |
char * | local_path | |
FILE * | resource | |
FILE * | hls_chunk | |
char * | hls_chunk_path | |
char * | hls_chunk_local_path | |
u8 * | tunein_data | |
u32 | tunein_data_size | |
Bool | force_dst_name | |
Bool | in_error | |
u32 | max_segs | |
GF_List * | past_files | |
GF_List * | mem_files | |
Bool | is_manifest | |
GF_DownloadSession * | llhls_upload | |
u32 | llhls_cur_header | |
Bool | llhls_is_open | |
char * | llhls_url | |
Bool | flush_close | |
Bool | flush_close_llhls | |
Bool | flush_open | |
Bool | flush_llhls_open |
struct GF_HTTPOutSession |
Data Fields | ||
---|---|---|
GF_HTTPOutCtx * | ctx | |
GF_Socket * | socket | |
GF_DownloadSession * | http_sess | |
char | peer_address[GF_MAX_IP_NAME_LEN] | |
Bool | headers_done | |
Double | start_range | |
FILE * | resource | |
char * | path | |
char * | mime | |
u64 | file_size | |
u64 | file_pos | |
u64 | nb_bytes | |
u64 | bytes_in_req | |
u8 * | buffer | |
Bool | done | |
u32 | flush_close | |
u64 | last_file_modif | |
u64 | req_start_time | |
u64 | last_active_time | |
Bool | file_in_progress | |
Bool | use_chunk_transfer | |
u32 | put_in_progress | |
u32 | upload_type | |
u64 | content_length | |
GF_FilterPid * | opid | |
Bool | reconfigure_output | |
GF_HTTPOutInput * | in_source | |
Bool | send_init_data | |
Bool | in_source_is_ll_hls_chunk | |
u32 | nb_ranges | |
u32 | alloc_ranges | |
u32 | range_idx | |
HTTByteRange * | ranges | |
Bool | do_log | |
u64 | req_id | |
u32 | method_type | |
u32 | reply_code | |
u32 | nb_consecutive_errors | |
Bool | is_h2 | |
Bool | sub_sess_pending | |
Bool | canceled | |
Bool | force_destroy | |
HTTP_DIRInfo * | dir_desc |
struct GF_HTTPFileIO |
struct HTTP_DirEnum |
Data Fields | ||
---|---|---|
HTTP_DIRInfo * | di | |
char ** | listing |
#define OFFS | ( | _n | ) | #_n, offsetof(GF_HTTPOutCtx, _n) |
anonymous enum |
GF_DownloadSession * gf_dm_sess_new_server | ( | GF_DownloadManager * | dm, |
GF_Socket * | server, | ||
void * | ssl_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 | ) |
GF_Socket * gf_dm_sess_get_socket | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_clear_headers | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_set_header | ( | GF_DownloadSession * | sess, |
const char * | name, | ||
const char * | value | ||
) |
u32 gf_dm_sess_async_pending | ( | GF_DownloadSession * | sess | ) |
GF_Err gf_dm_sess_send_reply | ( | GF_DownloadSession * | sess, |
u32 | reply_code, | ||
const char * | response_body, | ||
Bool | no_body | ||
) |
void gf_dm_sess_server_reset | ( | GF_DownloadSession * | sess | ) |
Bool gf_dm_sess_is_h2 | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_flush_h2 | ( | GF_DownloadSession * | sess | ) |
void gf_dm_sess_set_sock_group | ( | GF_DownloadSession * | sess, |
GF_SockGroup * | sg | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
GF_Err httpout_new_subsession | ( | GF_HTTPOutSession * | sess, |
u32 | stream_id | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
u32 httpout_write_input | ( | GF_HTTPOutCtx * | ctx, |
GF_HTTPOutInput * | in, | ||
const u8 * | pck_data, | ||
u32 | pck_size, | ||
Bool | file_start | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const GF_FilterRegister * httpout_register | ( | GF_FilterSession * | session | ) |
|
static |
|
static |
GF_FilterRegister HTTPOutRegister |