mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
new ustreamer and fps max
This commit is contained in:
@@ -13,27 +13,30 @@ RUN pacman -Syu --noconfirm \
|
||||
|
||||
RUN useradd -r -c "Packer build user" -m -d /var/packer -s /sbin/nologin packer \
|
||||
&& cd /tmp \
|
||||
&& sudo -u packer git clone https://aur.archlinux.org/packer-kit.git \
|
||||
&& sudo -u packer git clone https://github.com/pi-kvm/packer-kit.git \
|
||||
&& cd packer-kit \
|
||||
&& sudo -u packer makepkg \
|
||||
&& pacman --noconfirm -U packer-kit-*.pkg.tar.xz \
|
||||
&& cd - \
|
||||
&& rm -rf /tmp/packer-kit
|
||||
|
||||
RUN pkg-install \
|
||||
RUN pkg-install -S \
|
||||
python \
|
||||
python-pip \
|
||||
python-tox \
|
||||
python-systemd \
|
||||
python-dbus \
|
||||
python-mako \
|
||||
libevent-patched \
|
||||
nginx-mainline \
|
||||
ustreamer \
|
||||
socat \
|
||||
htmlhint \
|
||||
eslint
|
||||
|
||||
ARG USTREAMER_VERSION
|
||||
ENV USTREAMER_VERSION $USTREAMER_VERSION
|
||||
RUN echo $USTREAMER_VERSION
|
||||
RUN pkg-install -S ustreamer
|
||||
|
||||
COPY testenv/requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
|
||||
@@ -26,14 +26,15 @@ kvmd:
|
||||
cap_pin: 17
|
||||
conv_pin: 18
|
||||
init_restart_after: 1
|
||||
desired_fps: 30
|
||||
max_fps: 40
|
||||
unix: /run/kvmd/ustreamer.sock
|
||||
cmd:
|
||||
- "/usr/bin/ustreamer"
|
||||
- "--device=/dev/kvmd-video"
|
||||
- "--quality={quality}"
|
||||
- "--desired-fps={desired_fps}"
|
||||
- "--width=800"
|
||||
- "--height=600"
|
||||
- "--resolution=800x600"
|
||||
- "--unix={unix}"
|
||||
- "--unix-rm"
|
||||
- "--unix-mode=0666"
|
||||
|
||||
@@ -104,14 +104,14 @@ def test_fail__valid_stream_quality(arg: Any) -> None:
|
||||
|
||||
|
||||
# =====
|
||||
@pytest.mark.parametrize("arg", ["1 ", 30])
|
||||
@pytest.mark.parametrize("arg", ["1 ", 120])
|
||||
def test_ok__valid_stream_fps(arg: Any) -> None:
|
||||
value = valid_stream_fps(arg)
|
||||
assert type(value) == int # pylint: disable=unidiomatic-typecheck
|
||||
assert value == int(str(arg).strip())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arg", ["test", "", None, 31, 1.1])
|
||||
@pytest.mark.parametrize("arg", ["test", "", None, 121, 1.1])
|
||||
def test_fail__valid_stream_fps(arg: Any) -> None:
|
||||
with pytest.raises(ValidatorError):
|
||||
print(valid_stream_fps(arg))
|
||||
|
||||
@@ -54,7 +54,7 @@ deps =
|
||||
|
||||
[testenv:eslint]
|
||||
whitelist_externals = eslint
|
||||
commands = eslint --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
|
||||
commands = eslint --cache-location=/tmp --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
|
||||
|
||||
[testenv:htmlhint]
|
||||
whitelist_externals = htmlhint
|
||||
|
||||
Reference in New Issue
Block a user