qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Webcams under KVM and Linux


From: Natalia Portillo
Subject: Re: [Qemu-devel] Webcams under KVM and Linux
Date: Mon, 30 May 2011 19:19:47 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


El 30/05/2011, a las 15:56, Gerd Hoffmann escribió:

> On 05/30/11 14:50, Natalia Portillo wrote:
>> Exactly what my webcam does is:
>> 
>> Takes a frame from ANY available V4L2 device (/dev/video0), caches it,
>> and sends it completely to the guest before requesting any other frame.
> 
> I think you can double-buffer (i.e. let the host driver fill one buffer while 
> sending the other one to the guest).  Probably gives a slightly higher frame 
> rate, but maybe at cost of added latencies.

Indeed you can infinite-buffer it, but there is really no gain, the added 
latency makes an effective lower frame rate (total number of real frames seen 
by the guest in percentage)

>> The guest sees a common USB Video Class Device webcam with no controls
>> (this can be enhanced easily), so basically you cannot change any parameter.
>> However all the webcams I tested automatically managed that in the
>> firmware with no intervention from any of the drivers (host or guest),
>> changing white balance and brightness to the adequate values.
> 
> Nice.  Patches are waiting for EHCI being merged I guess?

Patches are on RFC on June 2010 ML messages.
There are some updates I did to the emulation (internal conversion from YUV2 to 
MJPEG, gives twice the framerate when the host webcam is YUV2 only) that I have 
not sent to RFC yet.

There are also some things that can be enhanced (conversion of more strange 
RAWs like OV511's, show the guest the controls of the real webcam) easily but I 
won't do that until a legal problem about the usage of my emulation code along 
with all the rest of QEMU by a commercial vendor in violation of GPL is solved.

It works really well with USB 1.1 (up to 24fps with KVM, up to 10fps with TCG), 
but your when EHCI is merged it will allow bigger resolutions easily

The most curious and interesting thing is that, while the specification says 
there can be webcams using bulk transfers (that's what mine is doing) I've seen 
NONE in wild. All do ISO.

Peter about your exact problem you may have more luck requesting that feature 
to the corresponding linux's driver maintainer.

> cheers,
>  Gerd

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iF4EAREIAAYFAk3j38QACgkQv/wfOsykIRQfjAEAgrl7eaK6qD4urzZCyGWEYoL2
yaEJbHEDybANWSOAVDkBALyMIVjvVCHzSq3wVH/8fh2Hc6Yp235PrMHduUzdC7Xj
=pXPT
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]