summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-01-28 08:12:04 +0300
committerDevaev Maxim <[email protected]>2021-01-28 08:12:04 +0300
commit83184952f6f8d834481cd06aee42474c74bb304c (patch)
treea2b7b0e2edf852d806c274c3557b6ea2b89a1e2a /kvmd/validators
parent83f9406fa0c8e5ba2ceb384a2e3c7c6ed5557296 (diff)
h264_bitrate streamer param
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/kvm.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py
index 19209be9..e8f14f6a 100644
--- a/kvmd/validators/kvm.py
+++ b/kvmd/validators/kvm.py
@@ -74,3 +74,7 @@ def valid_stream_resolution(arg: Any) -> str:
width = int(valid_number(parts[0], min=1, name=f"{name} (width)"))
height = int(valid_number(parts[1], min=1, name=f"{name} (height)"))
return f"{width}x{height}"
+
+
+def valid_stream_h264_bitrate(arg: Any) -> int:
+ return int(valid_number(arg, min=100, max=16000, name="stream H264 bitrate"))