From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMmIL-0007Nw-Hw for qemu-devel@nongnu.org; Thu, 10 Jun 2010 14:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMm5d-0005cW-95 for qemu-devel@nongnu.org; Thu, 10 Jun 2010 14:02:54 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:31218) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMm5d-0005bn-4h for qemu-devel@nongnu.org; Thu, 10 Jun 2010 14:02:53 -0400 Message-ID: <4C1128E1.6010900@cisco.com> Date: Thu, 10 Jun 2010 12:03:13 -0600 From: "David S. Ahern" MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation. References: <5DF2F2B3-77C9-499E-B357-282EBE5503F1@claunia.com> In-Reply-To: <5DF2F2B3-77C9-499E-B357-282EBE5503F1@claunia.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: qemu-devel Developers On 06/08/10 09:34, Natalia Portillo wrote: > Hi, > > This currently adds an emulated USB webcam compliant with USB Video Class Specification 1.0a. > > It only works on Linux guests and feeds the emulated device using a Video4Linux 2 host device, as long as it supports 320x240 MJPEG format. > > This is a Request for Comments as surely code needs some cleaning or style. > > You can see it working here: > http://www.youtube.com/watch?v=fzGYvjZzx6E with Linux guest > http://www.youtube.com/watch?v=_Yo9TWPDXCo with Windows XP Home guest > > To add the device use -device usb-uvc-webcam,device= > > Regards, > Natalia Portillo > Attempting to try out your patches, but it's failing with the following: usb-uvc: Init called usb-uvc: Trying to open /dev/video0 .usb-uvc: Device opened correctly. usb-uvc: Querying capabilities. usb-uvc: Device driver: uvcvideo usb-uvc: Device name: Laptop_Integrated_Webcam_0.3M usb-uvc: Device bus: usb-0000:00:1a.7-6 usb-uvc: Driver version: 0.1.0 usb-uvc: Device capabilities: 0x04000001 usb-uvc: Enumerating video inputs. usb-uvc: Setting video input to index 0 usb-uvc: Video input correctly set. usb-uvc: Trying to set 320x240 MJPEG. qemu-system-x86_64: -device usb-uvc-webcam,device=/dev/video0: Invalid format. Using ekiga for example I know that 320x240 is ok. I know very little about the v4l (or video in general). Can you provide some pointers? Also, I tried a PWC camera which is not a V4L2_INPUT_TYPE_CAMERA and noticed that video_input_index is used uninitialized in usb_uvc_initfn David