pc端编译
源码:mjpg-streamer-mini2440-read-only.tar.gz
这里要想编译顺利,有3件事要做
1、修改源文件,将videodev.h改为videodev2.h 即 #include 改为#include 相关的源文件如下
Dynctrl.c (mjpg-streamer-mini2440-read-only\plugins\input_uvc)
Input_file.c (mjpg-streamer-mini2440-read-only\plugins\input_file)
Input_testpicture.c (mjpg-streamer-mini2440-read-only\plugins\input_testpicture)
Input_uvc.c (mjpg-streamer-mini2440-read-only\plugins\input_uvc)
Mjpg_streamer.c (mjpg-streamer-mini2440-read-only)
Output_autofocus.c (mjpg-streamer-mini2440-read-only\plugins\output_autofocus)
Output_file.c (mjpg-streamer-mini2440-read-only\plugins\output_file)
Output_http.c (mjpg-streamer-mini2440-read-only\plugins\output_http)
S3c2410.h (mjpg-streamer-mini2440-read-only\plugins\input_s3c2410)
Spcav4l.h (mjpg-streamer-mini2440-read-only\plugins\input_gspcav1)
Utils.c (mjpg-streamer-mini2440-read-only\plugins\input_gspcav1)
Utils.c (mjpg-streamer-mini2440-read-only\plugins\input_s3c2410)
Uvcvideo.h (mjpg-streamer-mini2440-read-only\plugins\input_uvc)
V4l2uvc.h (mjpg-streamer-mini2440-read-only\plugins\input_uvc)
2、修改Makefile
sed -i 's/$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(APP_BINARY)/$(CC) $(CFLAGS) $(OBJECTS) $(LFLAGS) -o $(APP_BINARY)/g' Makefile
3、安装必要的库
apt-get install libjpeg62-dev imagemagick libv4l-dev
这样就可顺利make了
测试:分2步
1、执行 ./start_uvc.sh,结果如下
./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
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
2、打开网页
就可以看到摄像头视频了
花了我4小时才搞好啊,4小时啊,开发板端的移植还在进行中,编译通过了,问题出在驱动不帮我创建/dev/video0设备节点上
阅读(2599) | 评论(0) | 转发(0) |