VLC 4.0.0-dev
|
HTTP/RTSP server API. More...
Go to the source code of this file.
Data Structures | |
struct | httpd_header |
struct | httpd_message_t |
Typedefs | |
typedef struct httpd_host_t | httpd_host_t |
typedef struct httpd_client_t | httpd_client_t |
typedef struct httpd_message_t | httpd_message_t |
typedef struct httpd_url_t | httpd_url_t |
typedef struct httpd_callback_sys_t | httpd_callback_sys_t |
typedef int(* | httpd_callback_t) (httpd_callback_sys_t *, httpd_client_t *, httpd_message_t *answer, const httpd_message_t *query) |
typedef struct httpd_file_t | httpd_file_t |
typedef struct httpd_file_sys_t | httpd_file_sys_t |
typedef int(* | httpd_file_callback_t) (httpd_file_sys_t *, httpd_file_t *, uint8_t *psz_request, uint8_t **pp_data, int *pi_data) |
typedef struct httpd_handler_t | httpd_handler_t |
typedef int(* | httpd_handler_callback_t) (void *, httpd_handler_t *, char *psz_url, uint8_t *psz_request, int i_type, uint8_t *p_in, int i_in, char *psz_remote_addr, char *psz_remote_host, uint8_t **pp_data, int *pi_data) |
typedef struct httpd_redirect_t | httpd_redirect_t |
typedef struct httpd_stream_t | httpd_stream_t |
Enumerations | |
enum | { HTTPD_MSG_NONE , HTTPD_MSG_ANSWER , HTTPD_MSG_GET , HTTPD_MSG_HEAD , HTTPD_MSG_POST , HTTPD_MSG_OPTIONS , HTTPD_MSG_DESCRIBE , HTTPD_MSG_SETUP , HTTPD_MSG_PLAY , HTTPD_MSG_PAUSE , HTTPD_MSG_GETPARAMETER , HTTPD_MSG_TEARDOWN , HTTPD_MSG_MAX } |
enum | { HTTPD_PROTO_NONE , HTTPD_PROTO_HTTP , HTTPD_PROTO_RTSP , HTTPD_PROTO_HTTP0 } |
HTTP/RTSP server API.
typedef struct httpd_callback_sys_t httpd_callback_sys_t |
typedef int(* httpd_callback_t) (httpd_callback_sys_t *, httpd_client_t *, httpd_message_t *answer, const httpd_message_t *query) |
typedef struct httpd_client_t httpd_client_t |
typedef int(* httpd_file_callback_t) (httpd_file_sys_t *, httpd_file_t *, uint8_t *psz_request, uint8_t **pp_data, int *pi_data) |
typedef struct httpd_file_sys_t httpd_file_sys_t |
typedef struct httpd_file_t httpd_file_t |
typedef int(* httpd_handler_callback_t) (void *, httpd_handler_t *, char *psz_url, uint8_t *psz_request, int i_type, uint8_t *p_in, int i_in, char *psz_remote_addr, char *psz_remote_host, uint8_t **pp_data, int *pi_data) |
typedef struct httpd_handler_t httpd_handler_t |
typedef struct httpd_host_t httpd_host_t |
typedef struct httpd_message_t httpd_message_t |
typedef struct httpd_redirect_t httpd_redirect_t |
typedef struct httpd_stream_t httpd_stream_t |
typedef struct httpd_url_t httpd_url_t |
anonymous enum |
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().
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 | ||
) |
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 | ||
) |
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().
void httpd_MsgAdd | ( | httpd_message_t * | msg, |
const char * | psz_name, | ||
const char * | psz_value, | ||
... | |||
) |
References httpd_message_t::i_headers, httpd_header::name, name, httpd_message_t::p_headers, psz_value, strdup(), httpd_header::value, and vlc_vasprintf_c().
Referenced by httpd_ClientRecv(), httpd_FileCallBack(), httpd_RedirectCallBack(), httpd_StreamCallBack(), and httpdLoop().
const char * httpd_MsgGet | ( | const httpd_message_t * | msg, |
const char * | psz_name | ||
) |
References httpd_message_t::i_headers, httpd_header::name, name, httpd_message_t::p_headers, strcasecmp(), and httpd_header::value.
Referenced by httpd_FileCallBack(), httpd_RedirectCallBack(), and httpdLoop().
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().
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, psz_mime, 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(), vlc_frame_t::i_buffer, httpd_stream_t::i_buffer_last_pos, httpd_stream_t::i_buffer_pos, vlc_frame_t::i_flags, httpd_stream_t::i_last_keyframe_seen_pos, httpd_stream_t::lock, vlc_frame_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_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_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_list_append(), vlc_list_foreach, vlc_mutex_init(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by httpd_FileNew(), httpd_HandlerNew(), httpd_RedirectNew(), and httpd_StreamNew().
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(), and var_InheritInteger().