VLC
4.0.0-dev
|
Data Structures | |
struct | httpd_host_t |
struct | httpd_url_t |
struct | httpd_client_t |
struct | httpd_file_t |
struct | httpd_handler_t |
struct | httpd_redirect_t |
struct | httpd_stream_t |
struct | httpd |
Macros | |
#define | HTTPD_CL_BUFSIZE 10000 |
Variables | |
static struct httpd | httpd = { { .value = ATOMIC_VAR_INIT(0), .recursion = ATOMIC_VAR_INIT(0), .owner = ATOMIC_VAR_INIT(NULL), } , { &httpd.hosts , &httpd.hosts } } |
struct { | |
const char name [16] | |
int i_type | |
int i_proto | |
} | msg_type [] |
#define HTTPD_CL_BUFSIZE 10000 |
Referenced by httpd_ClientInit(), and httpd_StreamCallBack().
anonymous enum |
|
static |
References httpd_stream_t::i_buffer_pos, httpd_stream_t::i_buffer_size, and httpd_stream_t::p_buffer.
Referenced by httpd_StreamSend().
|
static |
References httpd_client_t::answer, httpd_MsgClean(), httpd_client_t::node, httpd_client_t::p_buffer, httpd_client_t::query, httpd_client_t::sock, vlc_list_remove(), and vlc_tls_Close().
Referenced by httpd_HostDelete(), httpd_UrlDelete(), and httpdLoop().
|
static |
References httpd_client_t::answer, httpd_client_t::b_stream_mode, HTTPD_CL_BUFSIZE, HTTPD_CLIENT_RECEIVING, httpd_MsgInit(), httpd_client_t::i_activity_date, httpd_client_t::i_activity_timeout, httpd_client_t::i_buffer, httpd_client_t::i_buffer_size, httpd_client_t::i_keyframe_wait_to_pass, httpd_client_t::i_state, httpd_client_t::p_buffer, httpd_client_t::query, VLC_TICK_FROM_SEC, and xmalloc().
Referenced by httpd_ClientNew().
char* httpd_ClientIP | ( | const httpd_client_t * | cl, |
char * | ip, | ||
int * | port | ||
) |
References net_GetPeerAddress(), httpd_client_t::sock, and vlc_tls_GetFD().
Referenced by httpd_HandlerCallBack().
|
static |
References httpd_ClientInit(), httpd_client_t::sock, and httpd_client_t::url.
Referenced by httpdLoop().
|
static |
References HTTPD_CLIENT_DEAD, HTTPD_CLIENT_RECEIVE_DONE, HTTPD_MSG_ANSWER, HTTPD_MSG_NONE, httpd_MsgAdd(), httpd_NetRecv(), httpd_NetSend(), HTTPD_PROTO_HTTP, HTTPD_PROTO_HTTP0, HTTPD_PROTO_NONE, HTTPD_PROTO_RTSP, httpd_client_t::i_activity_timeout, httpd_message_t::i_body, httpd_client_t::i_buffer, httpd_client_t::i_buffer_size, httpd_message_t::i_proto, httpd_client_t::i_state, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, msg_type, name, p, httpd_message_t::p_body, httpd_client_t::p_buffer, httpd_message_t::psz_args, httpd_message_t::psz_url, httpd_client_t::query, strcasecmp(), strdup(), and vlc_assert_unreachable.
Referenced by httpdLoop().
|
static |
References httpd_client_t::answer, httpd_url_t::catch, httpd_url_t::cb, HTTPD_CLIENT_DEAD, HTTPD_CLIENT_SEND_DONE, httpd_MsgClean(), httpd_NetSend(), HTTPD_PROTO_HTTP, httpd_ReasonFromCode(), httpd_message_t::i_body, httpd_message_t::i_body_offset, httpd_client_t::i_buffer, httpd_client_t::i_buffer_size, httpd_message_t::i_headers, httpd_message_t::i_proto, httpd_client_t::i_state, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, httpd_header::name, p, httpd_message_t::p_body, httpd_client_t::p_buffer, httpd_message_t::p_headers, httpd_url_t::p_sys, httpd_client_t::query, httpd_client_t::url, httpd_header::value, and xmalloc().
Referenced by httpdLoop().
|
static |
References HTTPD_CLIENT_DEAD, HTTPD_CLIENT_RECEIVING, HTTPD_CLIENT_TLS_HS_IN, HTTPD_CLIENT_TLS_HS_OUT, httpd_client_t::i_state, httpd_host_t::p_tls, httpd_client_t::sock, and vlc_tls_SessionHandshake().
Referenced by httpdLoop().
|
static |
References HTTPD_MSG_ANSWER, HTTPD_MSG_HEAD, HTTPD_MSG_POST, httpd_MsgAdd(), httpd_MsgGet(), HTTPD_PROTO_HTTP, httpd_message_t::i_body, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, httpd_file_t::mime, httpd_message_t::p_body, httpd_file_t::p_sys, httpd_file_t::pf_fill, httpd_message_t::psz_args, httpd_client_t::query, and VLC_SUCCESS.
Referenced by httpd_FileNew().
httpd_file_sys_t* httpd_FileDelete | ( | httpd_file_t * | file | ) |
References httpd_UrlDelete(), httpd_file_t::p_sys, and httpd_file_t::url.
httpd_file_t* httpd_FileNew | ( | httpd_host_t * | host, |
const char * | psz_url, | ||
const char * | psz_mime, | ||
const char * | psz_user, | ||
const char * | psz_password, | ||
httpd_file_callback_t | pf_fill, | ||
httpd_file_sys_t * | p_sys | ||
) |
|
static |
References httpd_ClientIP(), HTTPD_MSG_ANSWER, HTTPD_MSG_HEAD, HTTPD_PROTO_NONE, httpd_ReasonFromCode(), httpd_message_t::i_body, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_type, NI_MAXNUMERICHOST, p, httpd_message_t::p_body, httpd_handler_t::p_sys, httpd_handler_t::pf_fill, httpd_message_t::psz_args, httpd_message_t::psz_url, VLC_SUCCESS, xmalloc(), and xrealloc().
Referenced by httpd_HandlerNew().
void* httpd_HandlerDelete | ( | httpd_handler_t * | handler | ) |
References httpd_UrlDelete(), httpd_handler_t::p_sys, and httpd_handler_t::url.
httpd_handler_t* httpd_HandlerNew | ( | httpd_host_t * | host, |
const char * | psz_url, | ||
const char * | psz_user, | ||
const char * | psz_password, | ||
httpd_handler_callback_t | pf_fill, | ||
void * | p_sys | ||
) |
|
static |
References httpd_host_t::client_count, httpd_host_t::clients, httpd_host_t::fds, httpd::hosts, httpd_HostThread(), httpd_host_t::lock, msg_Err, httpd::mutex, net_ListenClose(), net_ListenTCP, httpd_host_t::nfd, httpd_host_t::node, httpd_host_t::p_tls, httpd_host_t::port, httpd_host_t::ref, httpd_host_t::thread, httpd_host_t::urls, var_InheritInteger(), var_InheritString(), vlc_clone(), vlc_cond_init(), vlc_custom_create, vlc_list_append(), vlc_list_foreach, vlc_list_init(), vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_delete, VLC_THREAD_PRIORITY_LOW, vlc_tls_ServerDelete(), and httpd_host_t::wait.
Referenced by httpd_StreamDelete(), vlc_http_HostNew(), vlc_https_HostNew(), and vlc_rtsp_HostNew().
void httpd_HostDelete | ( | httpd_host_t * | host | ) |
References httpd_host_t::clients, httpd_host_t::fds, httpd_ClientDestroy(), msg_Dbg, msg_Warn, httpd::mutex, net_ListenClose(), httpd_host_t::node, httpd_host_t::p_tls, httpd_host_t::ref, httpd_host_t::thread, httpd_host_t::urls, vlc_cancel(), vlc_join(), vlc_list_foreach, vlc_list_is_empty(), vlc_list_remove(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_delete, and vlc_tls_ServerDelete().
|
static |
References httpdLoop(), and httpd_host_t::ref.
Referenced by httpd_HostCreate(), and httpd_StreamDelete().
|
static |
References asprintf(), httpd_ReasonFromCode(), and vlc_xml_encode().
Referenced by httpd_RedirectCallBack(), and httpdLoop().
void httpd_MsgAdd | ( | httpd_message_t * | msg, |
const char * | name, | ||
const char * | psz_value, | ||
... | |||
) |
References httpd_message_t::i_headers, httpd_header::name, httpd_message_t::p_headers, strdup(), us_vasprintf(), and httpd_header::value.
Referenced by httpd_ClientRecv(), httpd_FileCallBack(), httpd_RedirectCallBack(), httpd_StreamCallBack(), and httpdLoop().
|
static |
const char* httpd_MsgGet | ( | const httpd_message_t * | msg, |
const char * | name | ||
) |
References httpd_message_t::i_headers, httpd_header::name, httpd_message_t::p_headers, strcasecmp(), and httpd_header::value.
Referenced by httpd_FileCallBack(), httpd_RedirectCallBack(), and httpdLoop().
|
static |
References httpd_message_t::cl, HTTPD_MSG_NONE, HTTPD_PROTO_NONE, httpd_message_t::i_body, httpd_message_t::i_body_offset, httpd_message_t::i_headers, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, httpd_message_t::p_body, httpd_message_t::p_headers, httpd_message_t::psz_args, and httpd_message_t::psz_url.
Referenced by httpd_ClientInit(), httpd_MsgClean(), and httpdLoop().
|
static |
References vlc_tls::ops, p, vlc_tls_operations::readv, and httpd_client_t::sock.
Referenced by httpd_ClientRecv().
|
static |
References vlc_tls::ops, httpd_client_t::sock, and vlc_tls_operations::writev.
Referenced by httpd_ClientRecv(), and httpd_ClientSend().
|
static |
References p.
Referenced by httpd_ClientSend(), httpd_HandlerCallBack(), and httpd_HtmlError().
|
static |
References httpd_redirect_t::dst, httpd_HtmlError(), HTTPD_MSG_ANSWER, httpd_MsgAdd(), httpd_MsgGet(), HTTPD_PROTO_HTTP, httpd_message_t::i_body, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, httpd_message_t::p_body, httpd_client_t::query, and VLC_SUCCESS.
Referenced by httpd_RedirectNew().
void httpd_RedirectDelete | ( | httpd_redirect_t * | rdir | ) |
References httpd_UrlDelete(), and httpd_redirect_t::url.
httpd_redirect_t* httpd_RedirectNew | ( | httpd_host_t * | host, |
const char * | psz_url_dst, | ||
const char * | psz_url_src | ||
) |
char* httpd_ServerIP | ( | const httpd_client_t * | cl, |
char * | ip, | ||
int * | port | ||
) |
References net_GetSockAddress(), httpd_client_t::sock, and vlc_tls_GetFD().
|
static |
References httpd_stream_t::b_has_keyframes, httpd_client_t::b_stream_mode, HTTPD_CL_BUFSIZE, HTTPD_MSG_ANSWER, HTTPD_MSG_HEAD, httpd_MsgAdd(), HTTPD_PROTO_HTTP, httpd_message_t::i_body, httpd_message_t::i_body_offset, httpd_stream_t::i_buffer_last_pos, httpd_stream_t::i_buffer_pos, httpd_stream_t::i_buffer_size, httpd_stream_t::i_header, httpd_message_t::i_headers, httpd_stream_t::i_http_headers, httpd_client_t::i_keyframe_wait_to_pass, httpd_stream_t::i_last_keyframe_seen_pos, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, httpd_stream_t::lock, httpd_header::name, httpd_message_t::p_body, httpd_stream_t::p_buffer, httpd_stream_t::p_header, httpd_message_t::p_headers, httpd_stream_t::p_http_headers, httpd_stream_t::psz_mime, strcasecmp(), httpd_header::value, VLC_EGENERIC, vlc_mrand48(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, and xmalloc().
Referenced by httpd_StreamNew().
void httpd_StreamDelete | ( | httpd_stream_t * | stream | ) |
int httpd_StreamHeader | ( | httpd_stream_t * | stream, |
uint8_t * | p_data, | ||
int | i_data | ||
) |
httpd_stream_t* httpd_StreamNew | ( | httpd_host_t * | host, |
const char * | psz_url, | ||
const char * | psz_mime, | ||
const char * | psz_user, | ||
const char * | psz_password | ||
) |
References httpd_stream_t::b_has_keyframes, HTTPD_MSG_GET, HTTPD_MSG_HEAD, HTTPD_MSG_POST, httpd_StreamCallBack(), httpd_UrlCatch(), httpd_UrlDelete(), httpd_UrlNew(), httpd_stream_t::i_buffer_last_pos, httpd_stream_t::i_buffer_pos, httpd_stream_t::i_buffer_size, httpd_stream_t::i_header, httpd_stream_t::i_http_headers, httpd_stream_t::i_last_keyframe_seen_pos, httpd_stream_t::lock, httpd_stream_t::p_buffer, httpd_stream_t::p_header, httpd_stream_t::p_http_headers, httpd_stream_t::psz_mime, strdup(), httpd_stream_t::url, vlc_mime_Ext2Mime(), and vlc_mutex_init().
int httpd_StreamSend | ( | httpd_stream_t * | stream, |
const block_t * | p_block | ||
) |
References httpd_stream_t::b_has_keyframes, BLOCK_FLAG_TYPE_I, httpd_AppendData(), block_t::i_buffer, httpd_stream_t::i_buffer_last_pos, httpd_stream_t::i_buffer_pos, block_t::i_flags, httpd_stream_t::i_last_keyframe_seen_pos, httpd_stream_t::lock, block_t::p_buffer, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
int httpd_StreamSetHTTPHeaders | ( | httpd_stream_t * | p_stream, |
const httpd_header * | p_headers, | ||
size_t | i_headers | ||
) |
int httpd_UrlCatch | ( | httpd_url_t * | url, |
int | i_msg, | ||
httpd_callback_t | cb, | ||
httpd_callback_sys_t * | p_sys | ||
) |
References httpd_url_t::catch, httpd_url_t::cb, httpd_url_t::lock, httpd_url_t::p_sys, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by httpd_FileNew(), httpd_HandlerNew(), httpd_RedirectNew(), and httpd_StreamNew().
void httpd_UrlDelete | ( | httpd_url_t * | url | ) |
References httpd_host_t::client_count, httpd_host_t::clients, httpd_url_t::host, httpd_ClientDestroy(), httpd_host_t::lock, msg_Warn, httpd_url_t::node, httpd_host_t::node, httpd_url_t::psz_password, httpd_url_t::psz_url, httpd_url_t::psz_user, httpd_client_t::url, vlc_list_foreach, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by httpd_FileDelete(), httpd_HandlerDelete(), httpd_RedirectDelete(), httpd_StreamDelete(), and httpd_StreamNew().
httpd_url_t* httpd_UrlNew | ( | httpd_host_t * | host, |
const char * | psz_url, | ||
const char * | psz_user, | ||
const char * | psz_password | ||
) |
References httpd_url_t::catch, httpd_url_t::cb, httpd_url_t::host, HTTPD_MSG_MAX, httpd_host_t::lock, httpd_url_t::lock, msg_Warn, httpd_url_t::node, httpd_host_t::node, httpd_url_t::p_sys, httpd_url_t::psz_password, httpd_url_t::psz_url, httpd_url_t::psz_user, strdup(), unlikely, httpd_host_t::urls, vlc_cond_signal(), vlc_list_append(), vlc_list_foreach, vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), and httpd_host_t::wait.
Referenced by httpd_FileNew(), httpd_HandlerNew(), httpd_RedirectNew(), and httpd_StreamNew().
|
static |
References vlc_b64_decode().
Referenced by httpdLoop().
|
static |
References httpd_client_t::answer, ARRAY_SIZE, httpd_client_t::b_stream_mode, httpd_url_t::catch, httpd_url_t::cb, pollfd::events, pollfd::fd, HTTPD_CLIENT_DEAD, HTTPD_CLIENT_RECEIVE_DONE, HTTPD_CLIENT_RECEIVING, HTTPD_CLIENT_SEND_DONE, HTTPD_CLIENT_SENDING, HTTPD_CLIENT_TLS_HS_IN, HTTPD_CLIENT_TLS_HS_OUT, HTTPD_CLIENT_WAITING, httpd_ClientDestroy(), httpd_ClientNew(), httpd_ClientRecv(), httpd_ClientSend(), httpd_ClientTlsHandshake(), httpd_HtmlError(), HTTPD_MSG_ANSWER, HTTPD_MSG_NONE, HTTPD_MSG_OPTIONS, httpd_MsgAdd(), httpd_MsgClean(), httpd_MsgGet(), httpd_MsgInit(), HTTPD_PROTO_HTTP, HTTPD_PROTO_NONE, HTTPD_PROTO_RTSP, httpdAuthOk(), httpd_client_t::i_activity_date, httpd_client_t::i_activity_timeout, httpd_message_t::i_body, httpd_message_t::i_body_offset, httpd_client_t::i_buffer, httpd_client_t::i_buffer_size, httpd_message_t::i_proto, httpd_client_t::i_state, httpd_message_t::i_status, httpd_message_t::i_type, httpd_message_t::i_version, msg_Err, mutex_cleanup_push, httpd_host_t::nfd, httpd_client_t::node, httpd_host_t::node, p, httpd_message_t::p_body, httpd_client_t::p_buffer, httpd_url_t::p_sys, poll(), POLLIN, POLLOUT, httpd_url_t::psz_password, httpd_message_t::psz_url, httpd_url_t::psz_url, httpd_url_t::psz_user, httpd_client_t::query, pollfd::revents, httpd_client_t::sock, strcasecmp(), unlikely, httpd_client_t::url, vlc_accept(), vlc_cleanup_pop, vlc_close(), vlc_cond_wait(), vlc_list_append(), vlc_list_foreach, vlc_list_is_empty(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_restorecancel(), vlc_savecancel(), vlc_strerror_c(), vlc_tick_now(), vlc_tls_GetFD(), vlc_tls_GetPollFD(), vlc_tls_ServerSessionCreate(), vlc_tls_SessionDelete(), vlc_tls_SocketOpen(), and xmalloc().
Referenced by httpd_HostThread().
httpd_host_t* vlc_http_HostNew | ( | vlc_object_t * | p_this | ) |
References httpd_HostCreate().
httpd_host_t* vlc_https_HostNew | ( | vlc_object_t * | obj | ) |
References httpd_HostCreate(), msg_Err, var_InheritString(), and vlc_tls_ServerCreate().
httpd_host_t* vlc_rtsp_HostNew | ( | vlc_object_t * | p_this | ) |
References httpd_HostCreate().
|
static |
int i_proto |
int i_type |
const { ... } msg_type[] |
Referenced by httpd_ClientRecv(), and vlc_Log().
const char name[16] |
Referenced by aout_FiltersNewWithClock(), aout_PauseDefault(), AppendRemapFilter(), cmp_entity(), config_ChainParse(), config_GetSysPath(), config_LoadCmdLine(), demux_IsPathExtension(), Destroy(), es_format_category_to_string(), filter_AddProxyCallbacks(), filter_chain_AppendFromString(), filter_chain_AppendInner(), filter_DelProxyCallbacks(), getaddrinfo(), hpack_decode(), hpack_decode_hdr_index(), hpack_decode_hdr_indexed(), hpack_decode_hdr_noindex(), hpack_encode(), httpd_ClientRecv(), httpd_StreamSetHTTPHeaders(), input_ControlPushEsHelper(), libvlc_InternalActionsInit(), SelectClockSource(), sout_StreamChainNew(), stream_FilterChainNew(), stream_HasExtension(), system_ConfigureDbus(), ThreadChangeFilters(), var_InheritAddress(), vlc_decoder_device_Create(), vlc_getaddrinfo_i11e(), vlc_http_msg_h2_headers(), vlc_http_msg_headers(), vlc_keycode2str(), vlc_module_load(), vlc_player_aout_ToggleMute(), vlc_player_input_GetTrackVector(), vlc_plugin_desc_cb(), and vlc_strfplayer().