mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-19 16:26:30 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
848f52c69e | ||
|
|
2dddb879bc | ||
|
|
4d92dc662c |
@@ -1,7 +1,7 @@
|
||||
[bumpversion]
|
||||
commit = True
|
||||
tag = True
|
||||
current_version = 5.47
|
||||
current_version = 5.48
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)
|
||||
serialize =
|
||||
{major}.{minor}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Manpage for ustreamer-dump.
|
||||
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
||||
.TH USTREAMER-DUMP 1 "version 5.47" "January 2021"
|
||||
.TH USTREAMER-DUMP 1 "version 5.48" "January 2021"
|
||||
|
||||
.SH NAME
|
||||
ustreamer-dump \- Dump uStreamer's memory sink to file
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Manpage for ustreamer.
|
||||
.\" Open an issue or pull request to https://github.com/pikvm/ustreamer to correct errors or typos
|
||||
.TH USTREAMER 1 "version 5.47" "November 2020"
|
||||
.TH USTREAMER 1 "version 5.48" "November 2020"
|
||||
|
||||
.SH NAME
|
||||
ustreamer \- stream MJPEG video from any V4L2 device to the network
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
pkgname=ustreamer
|
||||
pkgver=5.47
|
||||
pkgver=5.48
|
||||
pkgrel=1
|
||||
pkgdesc="Lightweight and fast MJPEG-HTTP streamer"
|
||||
url="https://github.com/pikvm/ustreamer"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ustreamer
|
||||
PKG_VERSION:=5.47
|
||||
PKG_VERSION:=5.48
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ def _find_sources(suffix: str) -> list[str]:
|
||||
if __name__ == "__main__":
|
||||
setup(
|
||||
name="ustreamer",
|
||||
version="5.47",
|
||||
version="5.48",
|
||||
description="uStreamer tools",
|
||||
author="Maxim Devaev",
|
||||
author_email="mdevaev@gmail.com",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#define US_VERSION_MAJOR 5
|
||||
#define US_VERSION_MINOR 47
|
||||
#define US_VERSION_MINOR 48
|
||||
|
||||
#define US_MAKE_VERSION2(_major, _minor) #_major "." #_minor
|
||||
#define US_MAKE_VERSION1(_major, _minor) US_MAKE_VERSION2(_major, _minor)
|
||||
|
||||
@@ -123,42 +123,31 @@ static void _gpio_output_init(us_gpio_output_s *output, struct gpiod_chip *chip)
|
||||
|
||||
if (output->pin >= 0) {
|
||||
# ifdef HAVE_GPIOD2
|
||||
struct gpiod_line_settings *line_settings = NULL;
|
||||
struct gpiod_line_config *line_config = NULL;
|
||||
struct gpiod_request_config *request_config = NULL;
|
||||
|
||||
struct gpiod_line_settings *line_settings;
|
||||
assert(line_settings = gpiod_line_settings_new());
|
||||
if (gpiod_line_settings_set_direction(line_settings, GPIOD_LINE_DIRECTION_OUTPUT) < 0) {
|
||||
US_LOG_PERROR("GPIO: Can't set output direction for pin=%d as %s", output->pin, output->consumer);
|
||||
goto done;
|
||||
}
|
||||
if (gpiod_line_settings_set_output_value(line_settings, false) < 0) {
|
||||
US_LOG_PERROR("GPIO: Can't set default output value for pin=%d as %s", output->pin, output->consumer);
|
||||
goto done;
|
||||
}
|
||||
assert(!gpiod_line_settings_set_direction(line_settings, GPIOD_LINE_DIRECTION_OUTPUT));
|
||||
assert(!gpiod_line_settings_set_output_value(line_settings, false));
|
||||
|
||||
struct gpiod_line_config *line_config;
|
||||
assert(line_config = gpiod_line_config_new());
|
||||
const unsigned offset = output->pin;
|
||||
if (gpiod_line_config_add_line_settings(line_config, &offset, 1, line_settings) < 0) {
|
||||
US_LOG_PERROR("GPIO: Can't set line settings for pin=%d as %s", output->pin, output->consumer);
|
||||
goto done;
|
||||
}
|
||||
assert(!gpiod_line_config_add_line_settings(line_config, &offset, 1, line_settings));
|
||||
|
||||
struct gpiod_request_config *request_config;
|
||||
assert(request_config = gpiod_request_config_new());
|
||||
gpiod_request_config_set_consumer(request_config, output->consumer);
|
||||
|
||||
if ((output->line = gpiod_chip_request_lines(chip, request_config, line_config)) == NULL) {
|
||||
US_LOG_PERROR("GPIO: Can't request pin=%d as %s", output->pin, output->consumer);
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
US_DELETE(request_config, gpiod_request_config_free);
|
||||
US_DELETE(line_config, gpiod_line_config_free);
|
||||
US_DELETE(line_settings, gpiod_line_settings_free);
|
||||
if (output->line == NULL) {
|
||||
_gpio_output_destroy(output);
|
||||
}
|
||||
gpiod_request_config_free(request_config);
|
||||
gpiod_line_config_free(line_config);
|
||||
gpiod_line_settings_free(line_settings);
|
||||
|
||||
if (output->line == NULL) {
|
||||
_gpio_output_destroy(output);
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
|
||||
@@ -441,7 +441,14 @@ static int _m2m_encoder_compress_raw(us_m2m_encoder_s *enc, const us_frame_s *sr
|
||||
// Для не-DMA отправка буфера по факту являтся освобождением этого буфера
|
||||
bool input_released = !_RUN(dma);
|
||||
|
||||
const long double deadline_ts = us_get_now_monotonic() + 1;
|
||||
|
||||
while (true) {
|
||||
if (us_get_now_monotonic() > deadline_ts) {
|
||||
_E_LOG_ERROR("The encoder wait is too long");
|
||||
goto error;
|
||||
}
|
||||
|
||||
struct pollfd enc_poll = {_RUN(fd), POLLIN, 0};
|
||||
|
||||
_E_LOG_DEBUG("Polling encoder ...");
|
||||
|
||||
Reference in New Issue
Block a user