标签:
usb摄像头芯片是中芯微的zc0301pl,
http://www.vimicro.com.cn/product/pdf/ZC301PL-1107-V10-EN.pdf
[root@FriendlyARM bin-song]# usb 1-1.2: new full speed USB device using s3c2410-ohci and address 10 usb 1-1.2: New USB device found, idVendor=0ac8, idProduct=301b usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-1.2: Product: PC Camera usb 1-1.2: Manufacturer: Vimicro Corp. usb 1-1.2: configuration #1 chosen from 1 choice gspca: probing 0ac8:301b zc3xx: probe 2wr ov vga 0x0000 zc3xx: probe sensor -> 0011 zc3xx: Find Sensor HV7131R(c) gspca: probe ok
/************************************************************************************************************************************/
执行,,如下---使用google code上的mjpg-streamer for mini2440,如前面4篇
FriendlyARM bin13]# ./start_uvc.sh MJPG Streamer Version.: 2.0 DBG(input_uvc.c, input_init(), 133): argv[0]=UVC webcam grabber i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 i: Format............: MJPG requested MJPG but got JPEG format instead//格式 DBG(dynctrl.c, initDynCtrls(), 139): adding control for 0 DBG(dynctrl.c, initDynCtrls(), 143): uvcioc ctrl add error: errno=22 (retval=-1) DBG(dynctrl.c, initDynCtrls(), 139): adding control for 1 ...
if(vd->fmt.fmt.pix.pixelformat!=vd->formatIn) { char fourcc1[5]={0,0,0,0,0}; char fourcc2[5]={0,0,0,0,0}; memmove(fourcc1,(char*)&vd->formatIn,4); memmove(fourcc2,(char*)&vd->fmt.fmt.pix.pixelformat,4); fprintf(stderr, " requested %s but got %s format instead\n",fourcc1,fourcc2); vd->formatIn = vd->fmt.fmt.pix.pixelformat; }
将这个if块注释掉就正常啦。。。
秀一张很模糊很美的图片----是摄像头差劲,10元一个。
/************************************************************************************************************************************/
如果使用友善提供的编译好的程序,考到板子上执行会有如下问题
[root@FriendlyARM /mjpg-streamer]# ./start_uvc.sh MJPG Streamer Version.: 2.0 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 i: Format............: MJPEG Pixel format is unavailable, using JPEG should never arrive exit fatal !! i: init_VideoIn failed [root@FriendlyARM /mjpg-streamer]# ./start_uvc_yuv.sh MJPG Streamer Version.: 2.0 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 i: Format............: YUV i: JPEG Quality......: 80 Pixel format is unavailable, using JPEG should never arrive exit fatal !! i: init_VideoIn failed
[root@FriendlyARM plg]# ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w /mjpg-streamer/www/" MJPG Streamer Version.: 2.0 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 i: Format............: MJPEG o: www-folder-path...: /mjpg-streamer/www/ o: HTTP TCP port.....: 8080 o: username:password.: disabled o: commands..........: enabled zc3xx: probe 2wr ov vga 0x0000
[root@FriendlyARM plg]# ./uvc_stream Using V4L2 device.....: /dev/video0 Resolution............: 640 x 480 frames per second.....: 5 TCP port..............: 8080 motor control TCP port: 8081 zc3xx: probe 2wr ov vga 0x0000
把input_cmoscamera.so借来,使用mjpg-streamer测试cmos摄像头了,正常。
[root@FriendlyARM plg]# ./mjpg_streamer -i "./input_cmoscamera.so" -o "./output_http.so -w /mjpg-streamer/www/" MJPG Streamer Version.: 2.0 i: Using CMOS Camera device.: /dev/camera i: Desired Resolution: 640 x 512 i: Frames Per Second.: 5 i: Format............: YUV i: JPEG Quality......: 80 o: www-folder-path...: /mjpg-streamer/www/ o: HTTP TCP port.....: 8080 o: username:password.: disabled o: commands..........: enabled
由于天嵌提供的这方面的资料全一些,所以后面就分析天嵌的WebCam了。
标签:
原文地址:http://www.cnblogs.com/aibowen/p/4586771.html