diff options
author | Devaev Maxim <[email protected]> | 2020-08-22 22:35:37 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-08-22 22:35:37 +0300 |
commit | f0882df330e6dcdb2b4f9c37b2ea71a9639f9746 (patch) | |
tree | 2cb0c14f71c6dfe2e371184a1d29ffc311a951af /kvmd/apps/vnc/server.py | |
parent | 7f74d7ee45a8ffc94caf87f9335fbdbf9d79c69d (diff) |
fixed VNC for capture without quality control
Diffstat (limited to 'kvmd/apps/vnc/server.py')
-rw-r--r-- | kvmd/apps/vnc/server.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py index bfe772a2..28e7db62 100644 --- a/kvmd/apps/vnc/server.py +++ b/kvmd/apps/vnc/server.py @@ -274,9 +274,11 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes async def _on_set_encodings(self) -> None: assert self.__authorized.done() assert self.__kvmd_session - get_logger(0).info("[main] %s: Applying streamer params: quality=%d%%; desired_fps=%d ...", - self._remote, self._encodings.tight_jpeg_quality, self.__desired_fps) - await self.__kvmd_session.streamer.set_params(self._encodings.tight_jpeg_quality, self.__desired_fps) + has_quality = (await self.__kvmd_session.streamer.get_state())["features"]["quality"] + quality = (self._encodings.tight_jpeg_quality if has_quality else None) + get_logger(0).info("[main] %s: Applying streamer params: quality=%s; desired_fps=%d ...", + self._remote, quality, self.__desired_fps) + await self.__kvmd_session.streamer.set_params(quality, self.__desired_fps) async def _on_fb_update_request(self) -> None: async with self.__lock: |