服务器端摄像头采集程序
方丈的寺院 Java领域优质创作者 博客专家认证 2013-05-04 07:12:25 基于web服务器的usb摄像头采集程序,在移植摄像头采集程序,参考网上的教程:移植servfox包
1.解压,将Makefile.arm改为Makefile
2.make,成功后下载到ARM板,
3.servfox –d /dev/video0 –s 320x240 –w 7070使用此命令
servfox version: 1.1.3 date: 11:12:2005 (C) mxhaard@magic.fr
wrong spca5xx device
Not a JPEG webcam sorry Abort
提示上述错误,
修改spcav4l.c
注销掉有关JPEG的说明
/* Only jpeg webcam allowed */
/*if(vd->cameratype != JPEG) {
exit_fatal ("Not a JPEG webcam sorry Abort !");
}*/
if(debug) printf ("StreamId: %d Camera/n", vd->cameratype);
/* probe all available palette and size Not need on the FOX always jpeg
if (probePalette(vd ) < 0) {
exit_fatal ("could't probe video palette Abort !");
}
if (probeSize(vd ) < 0) {
exit_fatal ("could't probe video size Abort !");
}
err = check_palettesize(vd);
if(debug) printf (" Format asked %d check %d/n",vd->formatIn, err);
*/
vd->videopict.palette = vd->formatIn;
vd->videopict.depth = GetDepth (vd->formatIn);
vd->bppIn = GetDepth (vd->formatIn);
//vd->framesizeIn = (vd->hdrwidth * vd->hdrheight * vd->bppIn) >> 3; // here alloc the output ringbuffer
vd->framesizeIn = (vd->hdrwidth * vd->hdrheight >> 2 ); // here alloc the output ringbuffer jpeg only
erreur = SetVideoPict (vd);
erreur = GetVideoPict (vd);
/* if (vd->formatIn != vd->videopict.palette ||
vd->bppIn != vd->videopict.depth)
exit_fatal ("could't set video palette Abort !");
if (erreur < 0)
exit_fatal ("could't set video palette Abort !");*/
4.下载到板子上,执行servfox –d /dev/video0 –s 320x240 –w 7070
servfox version: 1.1.3 date: 11:12:2005 (C) mxhaard@magic.fr
wrong spca5xx device
Illegal instruction
可是这时候却报了Illegal instruction 错误,冥思苦想,不知道是是什么原因。
求指教