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
...

可以执行,但是用浏览器浏览时图像有问题---

发现上面line 8 
requested MJPG but got JPEG format instead

在源码中找到这行------在plugins/input_uvc/v4l2uvc.c的init_v4l2()函数,大概line 150 

 

    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

提供的编译好的程序和源码不是一个版本的。所以没法troubleshooting。

但问题貌似和上面那个一样,把那个if块注释掉应该可以解决。

/************************************************************************************************************************************/

以下3种方法均可。http://192.168.1.230:8080/

详见天嵌网络摄像头说明书。

借来天嵌板子WebCam的mjpg_streamer input_uvc.so output_http.so,考到micro2440的/home/plg,/mjpg-streamer/www/是以前用的。

执行如下,使用mjpg-streamer测试usb摄像头,正常。

 

[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

把uvc_stream借来,使用uvc-streamer测试usb摄像头 ,正常。

 

    [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了。

mini2440 MJPG_STREAMER 产生问题的更多相关文章

  1. DM9000驱动移植在mini2440(linux2.6.29)和FS4412(linux3.14.78)上的实现(deep dive)篇一

    关于dm9000的驱动移植分为两篇,第一篇在mini2440上实现,基于linux2.6.29,也成功在在6410上移植了一遍,和2440非常类似,第二篇在fs4412(Cortex A9)上实现,基 ...

  2. 移植tslib1.4至mini2440

    在移植tslib1.4至mini2440的过程中出现了一些问题,在解决问题的过程中也学到了不少东西.但是由于注意力不集中也导致了一些低级的错误,非常地浪费时间,以后在做事的时候必须集中注意力,宁愿慢一 ...

  3. linux-3.0内核移植到fl2440开发板(以MINI2440为模板)

    我们的fl2440开发板使用的是s3c2440的芯片,与MINI2440十分相似,因此需要改动的地方不多,移植也比较容易. 1.[weishusheng@localhost kernel]$ sudo ...

  4. 基于mini2440的Qt移植

    花了很长时间,终于把Qt移植到mini2440开发板上了,不能说完全成功,总算是完成一大步,各中过程心酸,废话不多说,下面正式讲解移植过程. 移植环境: win7系统,虚拟机是ubuntu12.04 ...

  5. 基于mini2440的Tslib的移植

    软件平台: win7系统,虚拟机ubuntu12.04 mini2440开发板 tslib是电阻式触摸屏用于校准的一个软件库,是一个开源的程序,能够为触摸屏驱动获得的采样提供诸如滤波.去抖.校准等功能 ...

  6. 基于mini2440的uboot移植(一)

    一.移植环境 虚拟机:ubuntu12.04 uboot源码:u-boot-2008.10.tar.bz2 交叉编译:arm-linux-gcc-4.4.3 简单的记录下编译uboot的过程,要想具体 ...

  7. CubieTruck上安装mjpg_streamer

    最近手头项目需要用到一个上位机,需要在上位机上实现远程访问及视频监控.其中视频监控采用了网上资料较多的mjpg_streamer进行视频处理.在使用中遇到许多坑也一并记录下来. 首先安装依赖环境和检测 ...

  8. 基于boa服务器的web控制mini2440的GPIO口

    win7 系统  虚拟机:ubuntu12.04 开发板:mini2440 上一篇已经详细的讲解了如何配置boa服务器,在这里我们就要利用boa服务器带来的便利,利用web控制开发板上的GIPO口,这 ...

  9. 基于mini2440的boa服务器移植

    win7 系统  开发板:mini2440 虚拟机:ubuntu12.04 准备工作:确保主机与开发板之间能够正常通信,即能够ping通,具体的操作课参考我上一篇随笔. 1.首先从 http://ww ...

随机推荐

  1. MySQL开发中常用的查询语句总结

    1.查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>, ...

  2. javascript中的function对象

    function对象都是Function的实例: > Object.getOwnPropertyNames(Function) [ 'length', 'name', 'arguments', ...

  3. var_dump() 打印数组不完整 解决办法

    我们用var_dump() 打印数组, 一般会出现这种情况, 就是打印出来的数组不完整 ,会有省略号. 解决方法: 在php.ini里的xdebug节点中,加入如下 xdebug.var_displa ...

  4. Android Studio中Gradle使用详解

    一)基本配置 build配置 buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools. ...

  5. Could not find class &#39;****&#39;, referenced from method #####

    找不到类,多半也是和第三方的jar包有关. 将找不到的类.在下图中的地方勾选出来.假设jar太多.有的类有冲突的话,须要明白其先后顺序. 请外一篇和第三方jar有关的异常的文章. Conversion ...

  6. google perftools分析程序性能

    Google perftools 1.功能简介 它的主要功能就是通过采样的方式,给程序中cpu的使用情况进行“画像”,通过它所输出的结果,我们可以对程序中各个函数(得到函数之间的调用关系)耗时情况一目 ...

  7. Cookie中图片的浏览记录与cookie读取servle时路径的设置(文字描述)

    public class ShowServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpSer ...

  8. apache solr简单搭建

    首先,下载位置是:http://lucene.apache.org/solr/downloads.html 官网的学习资料:http://lucene.apache.org/solr/quicksta ...

  9. Linux下如何在打开终端的时候自动配置相关环境

    参考博客“Linux启动文件.设置环境变量的位置”(http://www.2cto.com/os/201305/208251.html) 在不可取的root权限的时候可以选择编辑~/.bashrc文件 ...

  10. struts1与struts2的区别

    Struts2其实并不是一个陌生的Web框架,Struts2是以Webwork的设计思想为核心,吸收了Struts1的优点,因此,可以认为Struts2是Struts1和Webwork结合的产物. 简 ...