Implement optional per-frame CRC calculation to save bandwidth

Current implementation is very CPU-efficient as it's not processing
JPEG-encoded data received from V4L2 at all.

This patch implements an optional mode where for each frame that's about
to be sent a CRC32 is calculated and if this client has already received
it before, the transmission is skipped. This of course adds some
noticeable CPU load (proportional to the frame rate requested and the
encoded JPEG size); on AST2500 it's taking about 10 % CPU when showing a
relatively complex GUI login screen with 15 FPS.

Reducing required bandwidth to 0 for static images helps a lot when
using IP KVM via poor connections, e.g. provided by cellular network
operators or some hotels, so can be beneficial for certain common
usecases.

The next optimisation to try is to dynamically alter the frame rate,
automatically ramping it up as soon as the changes start happening and
lowering after a period of inactivity; it's not yet clear if V4L2 allows
this.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Change-Id: I74b887cf83b5c8676f5792412805de08e1a54f32
4 files changed
tree: d39bec6d838d980b3b589325c45e5b636e6edb11
  1. create_usbhid.sh
  2. ikvm_args.cpp
  3. ikvm_args.hpp
  4. ikvm_input.cpp
  5. ikvm_input.hpp
  6. ikvm_manager.cpp
  7. ikvm_manager.hpp
  8. ikvm_server.cpp
  9. ikvm_server.hpp
  10. ikvm_video.cpp
  11. ikvm_video.hpp
  12. LICENSE
  13. MAINTAINERS
  14. meson.build
  15. obmc-ikvm.cpp
  16. README.md
  17. scancodes.hpp
  18. start-ipkvm.service
README.md

OpenBMC IpKVM Server

The obmc-ikvm application is a VNC server that provides access to the host graphics output. The application interfaces with the video device on the BMC that captures the host graphics, and then serves that video data on the RFB (remote framebuffer, also known as VNC) protocol. The application also interfaces with the BMC USB gadget device to pass HID events from the BMC to the host, allowing the user to interact with the host system.

Usage

Once the host is running and an appropriate HID gadget device is instantiated on the BMC, the application can be started with the following command: obmc-ikvm -v <video device path> -i <HID gadget device path>

For example:

obmc-ikvm -v /dev/video0 -i /dev/hidg0