作者:yuweixian4230@163.com
博客:yuweixian4230.blog.chinaunix.net
参考资料:http://blog.21ic.com/user1/4132/archives/2010/80028.html
tq摄像头移植手册
从这里了解 mjpg-streamer 资料
http://sourceforge.net/apps/mediawiki/mjpg-streamer/index.php?title=Main_Page
1.下载 mjpg-streamer.tar.gz 2.77MB
http://mjpg-streamer.svn.sourceforge.net/viewvc/mjpg-streamer.tar.gz?view=tar
2.解压,并进入目录
一共有 这么多目录
-
ywx@yuweixian:~/yu/root-application/mjpg-streamer$
ls
-
doc mjpg-streamer udp_client
-
mjpeg-client mjpg-streamer-experimental uvc-streamer
- ywx@yuweixian:~/yu/root-application/mjpg-streamer$
uvc-streamer : 目录下提供了 uvc-streamer的可执行目录
mjpeg-client:: 分别有 linux和windows 的客户端
其中windows的客户端viewer.exe ,我们首先测试。
viewer.exe 在/home/mjpg-streamer/mjpeg-client/bin/win32_upx
3. 进入 mjpg-streamer/mjpg-streamer$
修改顶层makefile及plugins目录中的各级makefile将所有
CC=gcc 修改为 CC=arm-linux-gcc
修改顶层Makefile 文件,修改输入输出 插件
-
# define the name of the program
-
APP_BINARY = mjpg_streamer
-
-
# define the names and targets of the plugins
-
PLUGINS = input_uvc.so
-
PLUGINS += output_file.so
-
PLUGINS += output_udp.so
-
PLUGINS += output_http.so
-
PLUGINS += input_testpicture.so
-
PLUGINS += output_autofocus.so
-
PLUGINS += input_gspcav1.so
-
PLUGINS += input_file.so
##这是自己修改,
-
PLUGINS += output_rtsp.so
## 修改
-
-
#PLUGINS += output_ptp2.so # commented out because it depends on libgphoto
-
#PLUGINS += input_control.so # commented out because the output_http does
it's job
- #PLUGINS += input_http.so
-
-
PLUGINS += output_viewer.so
# commented out because it depends on SDL ##修改
4. make 编译 在mjpg-streamer/mjpg-streamer,生成了
input*.so output*.so 和 mjpg_streamr 可执行文件
输入和输出 分别一一对应的
-
ywx@yuweixian:~/yu/root-application/mjpg-streamer/mjpg-streamer$
ls
-
CHANGELOG Makefile output_file.so README utils.o
input_file.so mjpg_streamer output_http.so scripts www
input_gspcav1.so mjpg_streamer.c output_rtsp.so start.sh
input_testpicture.so mjpg_streamer.h output_udp.so TODO
input_uvc.so mjpg_streamer.o output_viewer.so utils.c
LICENSE output_autofocus.so plugins utils.h
- ywx@yuweixian:~/yu/root-application/mjpg-streamer/mjpg-streamer$
5.进入mjpg-streamer/uvc-streamer$
修改 Makefile 中 CC=gcc 为 CC= arm-linux-gcc
然后make 编译
在当前目录下生成了 uvc_stream 可执行文件
6.拷贝文件
1.复制mjpg-streamer/mjpg-streamer的 *.so文件到
开发板文件系统 /lib/
2. 复制 mjpg-streamer/mjpg-streamer 的
mjpg-streamer 可执行程序 到开发板文件系统 /sbin/
3. 复制mjpg-streamer/uvc-streamer 的 uvc-streamer
可执行程序到 开发板文件系统 /sbin/下
4.复制 mjpeg-client 目录到 windows 系统下,包含了 viewer.exe