summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-11-25 06:37:32 +0300
committerMaxim Devaev <[email protected]>2021-11-25 06:37:32 +0300
commitb27b4f14919ef45195b4378f78a09a9983e3fd53 (patch)
treebfb2f94baf00283ae06188a9c758392067761fc7
parent1551f34bf67c0989ca1c7658adb4996c081bbd31 (diff)
changed h264 range to actual values
-rw-r--r--kvmd/apps/__init__.py4
-rw-r--r--kvmd/validators/kvm.py2
-rw-r--r--testenv/tests/validators/test_kvm.py2
-rw-r--r--web/share/js/kvm/stream.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index ca9bf374..6d23585d 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -426,8 +426,8 @@ def _get_config_scheme() -> Dict:
"h264_bitrate": {
"default": Option(0, type=valid_stream_h264_bitrate, if_empty=0, unpack_as="h264_bitrate"),
- "min": Option(100, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_min"),
- "max": Option(16000, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_max"),
+ "min": Option(25, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_min"),
+ "max": Option(25000, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_max"),
},
"h264_gop": {
diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py
index 17614e12..347f468b 100644
--- a/kvmd/validators/kvm.py
+++ b/kvmd/validators/kvm.py
@@ -77,7 +77,7 @@ def valid_stream_resolution(arg: Any) -> str:
def valid_stream_h264_bitrate(arg: Any) -> int:
- return int(valid_number(arg, min=100, max=16000, name="stream H264 bitrate"))
+ return int(valid_number(arg, min=25, max=25000, name="stream H264 bitrate"))
def valid_stream_h264_gop(arg: Any) -> int:
diff --git a/testenv/tests/validators/test_kvm.py b/testenv/tests/validators/test_kvm.py
index 55317950..3c122af2 100644
--- a/testenv/tests/validators/test_kvm.py
+++ b/testenv/tests/validators/test_kvm.py
@@ -131,7 +131,7 @@ def test_fail__valid_stream_resolution(arg: Any) -> None:
# =====
[email protected]("arg", ["100", " 16000 ", 5000])
[email protected]("arg", ["25", " 25000 ", 5000])
def test_ok__valid_stream_h264_bitrate(arg: Any) -> None:
value = valid_stream_h264_bitrate(arg)
assert type(value) == int # pylint: disable=unidiomatic-typecheck
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index c2784d73..b5c897bd 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -432,7 +432,7 @@ export function Streamer() {
});
tools.slider.setOnUpDelayed($("stream-quality-slider"), 1000, (value) => __sendParam("quality", value));
- tools.slider.setParams($("stream-h264-bitrate-slider"), 100, 16000, 100, 5000, function(value) {
+ tools.slider.setParams($("stream-h264-bitrate-slider"), 25, 25000, 25, 5000, function(value) {
$("stream-h264-bitrate-value").innerHTML = value;
});
tools.slider.setOnUpDelayed($("stream-h264-bitrate-slider"), 1000, (value) => __sendParam("h264_bitrate", value));