Re: [Linux-uvc-devel] uvcview videograbber with preview available for testing
Linux UVC driver and tools
Brought to you by:
pinchartl
From: Luc S. <lu...@sa...> - 2006-01-09 11:13:56
|
On Mon, Jan 09, 2006 at 11:04:59AM +0100, Laurent Pinchart wrote: > Hi Luc, > > > I hope that gnomemeeting is link to the jpeg library or something like that. > > I don't think it will be a problem to link to libjpeg (even if Damien would > rather avoid it if possible). Remember that the MJPEG data doesn't contain > the Huffman tables, so you need to add them manually (see the Qt patch I > posted on this list). Yes, I've made it to uncompress mjpeg data from an avi, and mov file for my gallery program (photon) written in python. I known it's not the best langage to play with bitstream, but it's working i recreate a full jpeg header from the stream. Else, i dont' known how to decode jpeg data + huffman table without the libjpeg. I'll look Qt. For now, i only do conversion for the YVY2 format. > Why did you need to modify the driver ? To support ENUM_STD. Only to not return -EINVAL. But it failed somewhere after that ... This is why i don't send the patch. Here the patch use: /mnt/linux/srcs/usb/uvc/linux-uvc>LC_ALL=C svn diff Index: uvcvideo.c =================================================================== --- uvcvideo.c (revision 8) +++ uvcvideo.c (working copy) @@ -2071,12 +2071,34 @@ return uvc_video_enable(video, 0); } - /* Analog video standards make no sense for digital cameras. */ - case VIDIOC_ENUMSTD: - case VIDIOC_QUERYSTD: + /* Analog video standards make no sense for digital cameras, but some + * application need it (mplayer for example) */ case VIDIOC_G_STD: + { + v4l2_std_id *std = arg; + *std = V4L2_STD_UNKNOWN; + return 0; + } + case VIDIOC_S_STD: + { + v4l2_std_id *std = arg; + if (*std != V4L2_STD_UNKNOWN) + return -EINVAL; + return 0; + } + case VIDIOC_ENUMSTD: + { + struct v4l2_standard *std = arg; + if (std->index != 0) + return -EINVAL; + std->id = V4L2_STD_UNKNOWN; + strncpy(std->name, "webcam", sizeof(std->name)); + return 0; + } + case VIDIOC_QUERYSTD: + case VIDIOC_OVERLAY: case VIDIOC_ENUMAUDIO: Wait ... i just receved a patch for pwc, to add these lines after the strncpy. std->frameperiod.numerator = 1; // NEW std->frameperiod.denominator = pdev->vframes; // NEW Luc |