diff --git a/src/data/index.html b/src/data/index.html
index 8969dba..c749d9d 100644
--- a/src/data/index.html
+++ b/src/data/index.html
@@ -11,7 +11,7 @@
-
- /ping
+ /state
Get JSON structure with state of the server.
@@ -25,6 +25,12 @@
Get a live stream. Query params:
+ -
+ key=abc123
+ User-defined key, which is part of cookie stream_client, which allows
+ the stream client to determine its identifier and view statistics using /state.
+
+
-
extra_headers=1
Add X-UStreamer-* headers to /stream handle (like on /snapshot).
@@ -40,7 +46,7 @@
dual_final_frames=1
Enable workaround for Safari/WebKit bug when using option --drop-same-frames.
Without this option, when the frame series is completed, WebKit-based browsers
- renders the last one with a delay.
+ renders the last frame with a delay.
diff --git a/src/data/index_html.h b/src/data/index_html.h
index ce1bf60..7a4098e 100644
--- a/src/data/index_html.h
+++ b/src/data/index_html.h
@@ -38,7 +38,7 @@ const char *HTML_INDEX_PAGE = " \
\
\
- \
- /ping
\
+ /state
\
Get JSON structure with state of the server. \
\
\
@@ -52,6 +52,12 @@ const char *HTML_INDEX_PAGE = " \
Get a live stream. Query params:
\
\
\
+ - \
+ key=abc123
\
+ User-defined key, which is part of cookie stream_client, which allows
\
+ the stream client to determine its identifier and view statistics using /state. \
+ \
+
\
- \
extra_headers=1
\
Add X-UStreamer-* headers to /stream handle (like on /snapshot). \
@@ -67,7 +73,7 @@ const char *HTML_INDEX_PAGE = " \
dual_final_frames=1
\
Enable workaround for Safari/WebKit bug when using option --drop-same-frames.
\
Without this option, when the frame series is completed, WebKit-based browsers
\
- renders the last one with a delay. \
+ renders the last frame with a delay. \
\
\
\
diff --git a/src/http.c b/src/http.c
index 8336699..41a89af 100644
--- a/src/http.c
+++ b/src/http.c
@@ -51,7 +51,7 @@ static bool _http_get_param_true(struct evkeyvalq *params, const char *key);
static char *_http_get_param_uri(struct evkeyvalq *params, const char *key);
static void _http_callback_root(struct evhttp_request *request, void *arg);
-static void _http_callback_ping(struct evhttp_request *request, void *v_server);
+static void _http_callback_state(struct evhttp_request *request, void *v_server);
static void _http_callback_snapshot(struct evhttp_request *request, void *v_server);
static void _http_callback_stream(struct evhttp_request *request, void *v_server);
@@ -91,7 +91,7 @@ struct http_server_t *http_server_init(struct stream_t *stream) {
evhttp_set_allowed_methods(run->http, EVHTTP_REQ_GET|EVHTTP_REQ_HEAD);
assert(!evhttp_set_cb(run->http, "/", _http_callback_root, NULL));
- assert(!evhttp_set_cb(run->http, "/ping", _http_callback_ping, (void *)server));
+ assert(!evhttp_set_cb(run->http, "/state", _http_callback_state, (void *)server));
assert(!evhttp_set_cb(run->http, "/snapshot", _http_callback_snapshot, (void *)server));
assert(!evhttp_set_cb(run->http, "/stream", _http_callback_stream, (void *)server));
@@ -189,7 +189,7 @@ static void _http_callback_root(struct evhttp_request *request, UNUSED void *arg
evbuffer_free(buf);
}
-static void _http_callback_ping(struct evhttp_request *request, void *v_server) {
+static void _http_callback_state(struct evhttp_request *request, void *v_server) {
struct http_server_t *server = (struct http_server_t *)v_server;
struct evbuffer *buf;
@@ -199,7 +199,7 @@ static void _http_callback_ping(struct evhttp_request *request, void *v_server)
assert(evbuffer_add_printf(buf,
"{\"source\": {\"resolution\": {\"width\": %u, \"height\": %u},"
" \"online\": %s, \"quality\": %u, \"soft_fps\": %u, \"captured_fps\": %u},"
- " \"stream\": {\"queued_fps\": %u, \"clients\": %u, \"clients_stat\": {",
+ " \"stream\": {\"queued_fps\": %u, \"clients\": %u, \"clients_stat\": {",
(server->fake_width ? server->fake_width : server->run->exposed->width),
(server->fake_height ? server->fake_height : server->run->exposed->height),
bool_to_string(server->run->exposed->online),
diff --git a/src/main.c b/src/main.c
index fdcef63..d0e70e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -135,8 +135,8 @@ static void _help(struct device_t *dev, struct encoder_t *encoder, struct http_s
printf(" It can significantly reduce the outgoing traffic, but will increase\n");
printf(" the CPU loading. Don't use this option with analog signal sources\n");
printf(" or webcams, it's useless. Default: disabled.\n\n");
- printf(" --fake-width -- Override image width for /ping. Default: disabled\n\n");
- printf(" --fake-height -- Override image height for /ping. Default: disabled.\n\n");
+ printf(" --fake-width -- Override image width for /state. Default: disabled\n\n");
+ printf(" --fake-height -- Override image height for /state. Default: disabled.\n\n");
printf(" --server-timeout -- Timeout for client connections. Default: %d\n\n", server->timeout);
printf("Misc options:\n");
printf("-------------\n");