如何利用vidcat測試MC2410E開發板與USB網路攝影機的串連
發現servfox不支援OV511晶片,只支援中芯微的
這裡採用的是網眼3000進行測試。
1、首先配置核心make menuconfig
(1)進入Multimedia devices ---> 選中video for Linux後退出;
(2)進入USB Suppot, 在 ---USB Multimedia devices中選中
USB OV511 Camera Support後退出。
然後make zImage
2、燒錄kernel
進入vivi,輸入load flash kernel x進行kernel的燒錄。
3、啟動Linux
燒錄結束後輸入boot啟動Linux。如果此時網眼3000已經插入USB主介面,則啟動資訊中出現:
ov511.c: USB 0v511+ camera found;
ov511.c:......................
..............................
4、運行vidcat
shell啟動後,輸入命令列ln -s /dev/v4l/video0 /dev/video(或者在rcS檔案中加入這一條)
然後輸入:vidcat -s 640x480 -p c > test.jpg
運行完成後,即可查看test.jpg來觀察抓圖的效果。
2、移植成功webcam_server-0.50
./configure,修改./Makefile和src/Makefile,把CC=gcc修改成CC=/opt/host/armv4l/bin/armv4l-unknown-linux-gcc
方便交叉編譯……
make,出錯,提示:
webcam_server.c: In function `main':
webcam_server.c:584: parse error before `struct'
webcam_server.c:587: `fg' undeclared (first use in this function)
webcam_server.c:587: (Each undeclared identifier is reported only once
webcam_server.c:587: for each function it appears in.)
webcam_server.c:588: `bg' undeclared (first use in this function)
webcam_server.c:589: `trans' undeclared (first use in this function)
make[1]: *** [webcam_server.o] 錯誤 1
make[1]: Leaving directory `/home/zlc/ARM/webcam_server-0.50/src'
make: *** [all-recursive] 錯誤 1
看起來好象是某變數沒定義,修改webcam_server.c的那幾個struct定義到main頂部即可,再次 make,成功。
移植入開發板,運行之,開啟瀏覽器,http://192.168.0.15:8888/
能查看到瞬間的圖片,但是,不能看到流暢的視頻流,需要不斷重新整理更新圖片,還是個問題。