|
|
|
|
@@ -296,7 +296,7 @@ static void _http_callback_snapshot(struct evhttp_request *request, void *v_serv
|
|
|
|
|
assert(!evbuffer_add(buf, (const void *)EXPOSED(picture.data), EXPOSED(picture.size)));
|
|
|
|
|
|
|
|
|
|
ADD_HEADER("Access-Control-Allow-Origin:", "*");
|
|
|
|
|
ADD_HEADER("Cache-Control", "no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0");
|
|
|
|
|
ADD_HEADER("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate, pre-check=0, post-check=0, max-age=0");
|
|
|
|
|
ADD_HEADER("Pragma", "no-cache");
|
|
|
|
|
ADD_HEADER("Expires", "Mon, 3 Jan 2000 12:34:56 GMT");
|
|
|
|
|
|
|
|
|
|
@@ -309,6 +309,7 @@ static void _http_callback_snapshot(struct evhttp_request *request, void *v_serv
|
|
|
|
|
ADD_TIME_HEADER("X-Timestamp", get_now_real());
|
|
|
|
|
|
|
|
|
|
ADD_HEADER("X-UStreamer-Online", bool_to_string(EXPOSED(online)));
|
|
|
|
|
ADD_UNSIGNED_HEADER("X-UStreamer-Dropped", EXPOSED(dropped));
|
|
|
|
|
ADD_UNSIGNED_HEADER("X-UStreamer-Width", EXPOSED(width));
|
|
|
|
|
ADD_UNSIGNED_HEADER("X-UStreamer-Height", EXPOSED(height));
|
|
|
|
|
ADD_TIME_HEADER("X-UStreamer-Grab-Time", EXPOSED(picture.grab_time));
|
|
|
|
|
@@ -446,7 +447,7 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
|
|
|
|
assert(evbuffer_add_printf(buf,
|
|
|
|
|
"HTTP/1.0 200 OK" RN
|
|
|
|
|
"Access-Control-Allow-Origin: *" RN
|
|
|
|
|
"Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0" RN
|
|
|
|
|
"Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate, pre-check=0, post-check=0, max-age=0" RN
|
|
|
|
|
"Pragma: no-cache" RN
|
|
|
|
|
"Expires: Mon, 3 Jan 2000 12:34:56 GMT" RN
|
|
|
|
|
"Set-Cookie: stream_client=%s/%s; path=/; max-age=30" RN
|
|
|
|
|
@@ -479,6 +480,7 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
|
|
|
|
if (client->extra_headers) {
|
|
|
|
|
assert(evbuffer_add_printf(buf,
|
|
|
|
|
"X-UStreamer-Online: %s" RN
|
|
|
|
|
"X-UStreamer-Dropped: %u" RN
|
|
|
|
|
"X-UStreamer-Width: %u" RN
|
|
|
|
|
"X-UStreamer-Height: %u" RN
|
|
|
|
|
"X-UStreamer-Client-FPS: %u" RN
|
|
|
|
|
@@ -491,6 +493,7 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
|
|
|
|
"X-UStreamer-Send-Time: %.06Lf" RN
|
|
|
|
|
RN,
|
|
|
|
|
bool_to_string(EXPOSED(online)),
|
|
|
|
|
EXPOSED(dropped),
|
|
|
|
|
EXPOSED(width),
|
|
|
|
|
EXPOSED(height),
|
|
|
|
|
client->fps,
|
|
|
|
|
|