From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIxw-0006Kd-Jt for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRIxv-0007um-H3 for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIxv-0007uZ-9f for qemu-devel@nongnu.org; Tue, 31 May 2011 03:02:11 -0400 Message-ID: <4DE49265.6010300@redhat.com> Date: Tue, 31 May 2011 09:01:57 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <654825.49014.qm@web65303.mail.ac2.yahoo.com> <4DE3B020.2010904@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Webcams under KVM and Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: Peter Baitz , =?ISO-8859-1?Q?Andreas_F=E4rber?= , QEMU Developers Hi, >>> 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) Just two buffers, so capture and sending to the guest can be parallelized. More buffers don't really help and just increase latency. >> 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. Can you repost the latest version for review so we can get the bits merged? > 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. Thats fine, we can always add it later once the legal issues are sorted. > 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 Great. > 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. Using bulk certainly makes sense for a virtual device. cheers, Gerd