Custom Qt SPICE viewer
This merge request implements #8 (closed): a basic Qt SPICE viewer. This allows users to interact with a VM through input (mouse, keyboard, etc...) as well as see its display and receive audio. As planned, this is rendered onto a KDE-native window and virt-viewer is no longer required as a dependency.
Note: Previous VMs configured in Karton will not have audio. You can either add a device in the XML file for create a new one with this branch.
- Uses virsh CLI (dom display) to get libvirt SPICE URI. This is my current solution as I had set Karton VMs to have autoport for graphics, thus the SPICE port is assigned dynamically on VM launch
- Implemented SPICE client to connect to a port and render VM graphics on QQuickItem
- Implemented keyboard press and mouse click, hover, scroll forwarding
- Uses QEMU-generated scancode table for converting evdev to PC XT
- Added audio device support to libvirt domain XML generator
- Implemented SPICE audio handling, writing to QAudioSink
- Added full-screen button, and proper resizing/scaling of display
Previously worked in here. This is a new branch after rebasing.
TODO:
-
mouse input -
keyboard input -
use qemu input table -
scroll input -
resizable viewer -
drag input -
support switching between display & multiple active displays, properly find correct vm to show -
audio -
inactive window fix for multiple instances
After:
- optimize rendering with gl-scanout
- investigate bad text rendering
- microphone input (record channel)
- webcam
- shared file folder
- shared clipboard
- usb passthrough
Edited by Derek Lin