From 83184952f6f8d834481cd06aee42474c74bb304c Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Thu, 28 Jan 2021 08:12:04 +0300 Subject: h264_bitrate streamer param --- kvmd/validators/kvm.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kvmd/validators') 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")) -- cgit v1.2.3