mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-28 04:36:33 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d76c5da4de | ||
|
|
4c07d047b4 |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 0.8
|
current_version = 0.9
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
|
|||||||
2
PKGBUILD
2
PKGBUILD
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname=ustreamer
|
pkgname=ustreamer
|
||||||
pkgver=0.8
|
pkgver=0.9
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
||||||
url="https://github.com/pi-kvm/ustreamer"
|
url="https://github.com/pi-kvm/ustreamer"
|
||||||
|
|||||||
@@ -21,4 +21,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION "0.8"
|
#define VERSION "0.9"
|
||||||
|
|||||||
@@ -168,10 +168,10 @@ static void _http_callback_ping(struct evhttp_request *request, void *v_server)
|
|||||||
assert(evbuffer_add_printf(buf,
|
assert(evbuffer_add_printf(buf,
|
||||||
"{\"stream\": {\"resolution\":"
|
"{\"stream\": {\"resolution\":"
|
||||||
" {\"width\": %u, \"height\": %u},"
|
" {\"width\": %u, \"height\": %u},"
|
||||||
" \"online\": %s}}",
|
" \"fps\": %u, \"online\": %s}}",
|
||||||
(server->fake_width ? server->fake_width : server->run->exposed->width),
|
(server->fake_width ? server->fake_width : server->run->exposed->width),
|
||||||
(server->fake_height ? server->fake_height : server->run->exposed->height),
|
(server->fake_height ? server->fake_height : server->run->exposed->height),
|
||||||
(server->run->exposed->online ? "true" : "false")
|
server->run->exposed->fps, (server->run->exposed->online ? "true" : "false")
|
||||||
));
|
));
|
||||||
ADD_HEADER("Content-Type", "application/json");
|
ADD_HEADER("Content-Type", "application/json");
|
||||||
evhttp_send_reply(request, HTTP_OK, "OK", buf);
|
evhttp_send_reply(request, HTTP_OK, "OK", buf);
|
||||||
@@ -379,6 +379,7 @@ void _expose_new_picture(struct http_server_t *server) {
|
|||||||
server->run->exposed->picture.size = server->run->stream->picture.size;
|
server->run->exposed->picture.size = server->run->stream->picture.size;
|
||||||
server->run->exposed->width = server->run->stream->width;
|
server->run->exposed->width = server->run->stream->width;
|
||||||
server->run->exposed->height = server->run->stream->height;
|
server->run->exposed->height = server->run->stream->height;
|
||||||
|
server->run->exposed->fps = server->run->stream->fps;
|
||||||
server->run->exposed->online = true;
|
server->run->exposed->online = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +398,7 @@ void _expose_blank_picture(struct http_server_t *server) {
|
|||||||
server->run->exposed->picture.size = BLANK_JPG_SIZE;
|
server->run->exposed->picture.size = BLANK_JPG_SIZE;
|
||||||
server->run->exposed->width = BLANK_JPG_WIDTH;
|
server->run->exposed->width = BLANK_JPG_WIDTH;
|
||||||
server->run->exposed->height = BLANK_JPG_HEIGHT;
|
server->run->exposed->height = BLANK_JPG_HEIGHT;
|
||||||
|
server->run->exposed->fps = 0;
|
||||||
server->run->exposed->online = false;
|
server->run->exposed->online = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ struct exposed_t {
|
|||||||
struct picture_t picture;
|
struct picture_t picture;
|
||||||
unsigned width;
|
unsigned width;
|
||||||
unsigned height;
|
unsigned height;
|
||||||
|
unsigned fps;
|
||||||
bool online;
|
bool online;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
13
src/stream.c
13
src/stream.c
@@ -197,14 +197,13 @@ void stream_loop(struct stream_t *stream) {
|
|||||||
}
|
}
|
||||||
fluency_passed = 0;
|
fluency_passed = 0;
|
||||||
|
|
||||||
if (log_level >= LOG_LEVEL_PERF) {
|
if ((long long)now != fps_second) {
|
||||||
if ((long long)now != fps_second) {
|
LOG_PERF("Oldest worker complete, encoding FPS = %u", fps);
|
||||||
LOG_PERF("Oldest worker complete, encoding FPS = %u", fps);
|
stream->fps = fps;
|
||||||
fps = 0;
|
fps = 0;
|
||||||
fps_second = (long long)now;
|
fps_second = (long long)now;
|
||||||
}
|
|
||||||
++fps;
|
|
||||||
}
|
}
|
||||||
|
++fps;
|
||||||
|
|
||||||
long double fluency_delay = _stream_get_fluency_delay(stream->dev, &pool);
|
long double fluency_delay = _stream_get_fluency_delay(stream->dev, &pool);
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ struct stream_t {
|
|||||||
struct picture_t picture;
|
struct picture_t picture;
|
||||||
unsigned width;
|
unsigned width;
|
||||||
unsigned height;
|
unsigned height;
|
||||||
|
unsigned fps;
|
||||||
bool updated;
|
bool updated;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
struct device_t *dev;
|
struct device_t *dev;
|
||||||
|
|||||||
Reference in New Issue
Block a user