[Spice-devel] Discuss about camera redirection in SPICE

Gerd Hoffmann kraxel at redhat.com
Mon Jan 17 06:29:49 UTC 2022


  Hi,

> Camera redirection through the USB redirection protocol seems feasible. But
> I have several concerns:
> 1, UVC started to support H.264 and VP8 since version 1.5, old version OS
> has no support(Link https://en.wikipedia.org/wiki/USB_video_device_class).
> 
> 2, Even guest side supports UVC 1.5, the camera App still has a chance to
> select which format to use. We can control this from hypervisor side.

The camera could offer vp8 as only supported codec ...

But, yes, using usb redirection will loose some flexibility because you
can't recode the video frames then.

> 3, I noticed that USB emulation uses a lot of CPU, so I also have a plan to
> introduce virtio camera to reduce the CPU utilization.

uhci and ehci are pretty bad indeed.  xhci should behave noticeable better.

> So from the point of my view, I prefer a common camera redirection
> protocol(event a hard work to do, but I can support it for a long time).

I think you can take some ideas from the audio protocol (start/stop
stream, ...).  Define controls (brighness etc), probably best to follow
uvc or v4l2 here.  Negotiate video format capabilities, so there is the
option that server and client agree on some future codec when supported
on both ends.

take care,
  Gerd



More information about the Spice-devel mailing list