* [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation.
@ 2010-06-08 15:34 Natalia Portillo
2010-06-10 18:03 ` David S. Ahern
0 siblings, 1 reply; 5+ messages in thread
From: Natalia Portillo @ 2010-06-08 15:34 UTC (permalink / raw)
To: qemu-devel Developers
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=<path to v4l2 device>
Regards,
Natalia Portillo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation.
2010-06-08 15:34 [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation Natalia Portillo
@ 2010-06-10 18:03 ` David S. Ahern
2010-06-10 18:26 ` Natalia Portillo
0 siblings, 1 reply; 5+ messages in thread
From: David S. Ahern @ 2010-06-10 18:03 UTC (permalink / raw)
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=<path to v4l2 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation.
2010-06-10 18:03 ` David S. Ahern
@ 2010-06-10 18:26 ` Natalia Portillo
2010-06-10 18:36 ` David S. Ahern
0 siblings, 1 reply; 5+ messages in thread
From: Natalia Portillo @ 2010-06-10 18:26 UTC (permalink / raw)
To: David S. Ahern; +Cc: qemu-devel Developers
Hi David,
> 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.
As for now only cameras that allow MJPEG format will work.
Check your camera specifications (lsusb -v works if your real camera is UVC, check driver's source otherwise).
Cameras with RAW frames (YUYV and NV12 formats) do not work, yet. I'm on it.
>
> 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
It's a webcam?
Could you give me more information?
Manufacturer, model, linux's module name.
All webcams SHOULD (and MUST) implement V4L2_INPUT_TYPE_CAMERA.
Not the same for video cameras or capture devices (PAL/NTSC, DVB/ATSC).
Regards,
Natalia Portillo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation.
2010-06-10 18:26 ` Natalia Portillo
@ 2010-06-10 18:36 ` David S. Ahern
2010-06-10 18:47 ` Natalia Portillo
0 siblings, 1 reply; 5+ messages in thread
From: David S. Ahern @ 2010-06-10 18:36 UTC (permalink / raw)
To: Natalia Portillo; +Cc: qemu-devel Developers
On 06/10/10 12:26, Natalia Portillo wrote:
> Hi David,
>
>> 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.
>
> As for now only cameras that allow MJPEG format will work.
> Check your camera specifications (lsusb -v works if your real camera is UVC, check driver's source otherwise).
> Cameras with RAW frames (YUYV and NV12 formats) do not work, yet. I'm on it.
Trying to guess the relevant descriptors:
VideoStreaming Interface Descriptor:
bLength 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 768000
dwMaxBitRate 4608000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
>
>>
>> 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
> It's a webcam?
> Could you give me more information?
> Manufacturer, model, linux's module name.
usb 7-1: new full speed USB device using uhci_hcd and address 3
usb 7-1: New USB device found, idVendor=046d, idProduct=08b6
usb 7-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
pwc: Logitech/Cisco VT Camera webcam detected.
David
>
> All webcams SHOULD (and MUST) implement V4L2_INPUT_TYPE_CAMERA.
> Not the same for video cameras or capture devices (PAL/NTSC, DVB/ATSC).
>
> Regards,
> Natalia Portillo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation.
2010-06-10 18:36 ` David S. Ahern
@ 2010-06-10 18:47 ` Natalia Portillo
0 siblings, 0 replies; 5+ messages in thread
From: Natalia Portillo @ 2010-06-10 18:47 UTC (permalink / raw)
To: David S. Ahern; +Cc: qemu-devel Developers
Hi,
> Trying to guess the relevant descriptors:
>
> VideoStreaming Interface Descriptor:
> bLength 50
> bDescriptorType 36
> bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
> bFrameIndex 3
> bmCapabilities 0x00
> Still image unsupported
> wWidth 320
> wHeight 240
> dwMinBitRate 768000
> dwMaxBitRate 4608000
> dwMaxVideoFrameBufferSize 153600
> dwDefaultFrameInterval 333333
> bFrameIntervalType 6
> dwFrameInterval( 0) 333333
> dwFrameInterval( 1) 400000
> dwFrameInterval( 2) 500000
> dwFrameInterval( 3) 666666
> dwFrameInterval( 4) 1000000
> dwFrameInterval( 5) 2000000
>
> VideoStreaming Interface Descriptor:
> bLength 6
> bDescriptorType 36
> bDescriptorSubtype 13 (COLORFORMAT)
> bColorPrimaries 1 (BT.709,sRGB)
> bTransferCharacteristics 1 (BT.709)
> bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Unless there is any FRAME_MJPEG in the descriptor, the camera is as now, unsupported yet.
I'm working on supported cameras FRAME_UNCOMPRESSED.
>>
>>>
>>> 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
>> It's a webcam?
>> Could you give me more information?
>> Manufacturer, model, linux's module name.
>
> usb 7-1: new full speed USB device using uhci_hcd and address 3
> usb 7-1: New USB device found, idVendor=046d, idProduct=08b6
> usb 7-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> pwc: Logitech/Cisco VT Camera webcam detected.
The only thing I'm able to found about it is that the driver is Video4Linux 1.0 not 2.0.
Do you have manufacturer and model?
Do you have idea of that input type v4l2 defines for it?
May you give me SSH access to a machine with that cam installed to test and implement?
Regards,
Natalia Portillo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-10 18:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-08 15:34 [Qemu-devel] [RFC PATCH 0/2] Add USB Video Class device emulation Natalia Portillo
2010-06-10 18:03 ` David S. Ahern
2010-06-10 18:26 ` Natalia Portillo
2010-06-10 18:36 ` David S. Ahern
2010-06-10 18:47 ` Natalia Portillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).