LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: zzyongchao

FC5下按北南南北大哥的方法装摄像头驱动的问题-求高手帮忙

[复制链接]
发表于 2007-2-11 10:49:14 | 显示全部楼层
能否先贴个原贴。让大家follow一下。可能是linux下玩摄像头的本来就少吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-12 08:29:33 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-12 14:05:23 | 显示全部楼层
在2.6.20的内核中编译有如下警告:
[root@localhost gspcav1-20070110]# make
make -C /lib/modules/`uname -r`/build SUBDIRS=/root/gspcav1-20070110 CC=cc modul es
make[1]: Entering directory `/usr/src/linux-2.6.20'
  CC [M]  /root/gspcav1-20070110/gspca_core.o
/root/gspcav1-20070110/gspca_core.c: 在函数 ‘spca50x_create_sysfs’ 中:
/root/gspcav1-20070110/gspca_core.c:2615: 警告:忽略声明有 warn_unused_result 属 性的 ‘video_device_create_file’ 的返回值
/root/gspcav1-20070110/gspca_core.c:2616: 警告:忽略声明有 warn_unused_result 属 性的 ‘video_device_create_file’ 的返回值
/root/gspcav1-20070110/gspca_core.c:2617: 警告:忽略声明有 warn_unused_result 属 性的 ‘video_device_create_file’ 的返回值
  CC [M]  /root/gspcav1-20070110/decoder/gspcadecoder.o
  LD [M]  /root/gspcav1-20070110/gspca.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/gspcav1-20070110/gspca.mod.o
  LD [M]  /root/gspcav1-20070110/gspca.ko
make[1]: Leaving directory `/usr/src/linux-2.6.20'

[root@localhost gspcav1-20070110]# modprobe gspca
[root@localhost gspcav1-20070110]# lsmod |grep gspca
gspca                 631760  0
videodev               30080  2 gspca,zc0301

[root@localhost gspcav1-20070110]# ls -lh /dev/video0
crw------- 1 root root 81, 0 02-12 14:12 /dev/video0
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-12 14:42:29 | 显示全部楼层
现在不死机了,却什么都看不到,一片黑。哈哈哈哈!
[root@localhost ~]# spcaview -d /dev/video0 -f jpg -s 320x240
Spcaview version: 1.1.7 date: 06:11:2006 (C) mxhaard@magic.fr
size width: 320 height: 240
Initializing SDL.
SDL initialized.
bpp 3 format 21
Using video device /dev/video0.
Initializing v4l.
**************** PROBING CAMERA *********************
Camera found: Generic Vimicro 303b
Bridge found: ZC301-2
Bridge find ZC301-2 number 13
StreamId: JPEG Camera
quality 1 autoexpo 1 Timeframe 0 lightfreq 50
Bridge find ZC301-2 number 13
Available Resolutions width 640  heigth 480 native
Available Resolutions width 352  heigth 288 decoded
Available Resolutions width 320  heigth 240 native *
Available Resolutions width 176  heigth 144 decoded
unable to probe size !!
*****************************************************
grabbing method default MMAP asked
VIDIOCGMBUF size 2457616  frames 2  offets[0]=0 offsets[1]=1228808
VIDIOCGPICT
brightnes=32768 hue=0 color=0 contrast=32768 whiteness=0
depth=8 palette=4
VIDIOCSPICT
brightness=32768 hue=0 color=0 contrast=32768 whiteness=0
depth=24 palette=21
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-12 17:24:51 | 显示全部楼层
那位大哥成功了,帮帮小弟。
把这个信息[root@localhost ~]# spcaview -d /dev/video0 -f jpg -s 320x240贴出来对比一下也行。
多谢了!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-13 20:19:24 | 显示全部楼层
这样执行的结果是:
[root@localhost ~]# spcaview -d /dev/video0
Spcaview version: 1.1.7 date: 06:11:2006 (C) mxhaard@magic.fr
Initializing SDL.
SDL initialized.
bpp 3 format 15
Using video device /dev/video0.
Initializing v4l.
**************** PROBING CAMERA *********************
Camera found: Generic Vimicro 303b
Bridge found: ZC301-2
Bridge find ZC301-2 number 13
StreamId: JPEG Camera
quality 1 autoexpo 1 Timeframe 0 lightfreq 50
Bridge find ZC301-2 number 13
Available Resolutions width 640  heigth 480 native
Available Resolutions width 352  heigth 288 decoded
Available Resolutions width 320  heigth 240 native *
Available Resolutions width 176  heigth 144 decoded
unable to probe size !!
*****************************************************
grabbing method default MMAP asked
VIDIOCGMBUF size 2457616  frames 2  offets[0]=0 offsets[1]=1228808
VIDIOCGPICT
brightnes=32768 hue=0 color=0 contrast=32768 whiteness=0
depth=12 palette=4
VIDIOCSPICT
brightness=32768 hue=0 color=0 contrast=32768 whiteness=0
depth=24 palette=15


Used 18331ms for 230 images => 79ms/image 12fps.
Quiting SDL.
Decoded frames:230 Average decode time: 1.000000
unmapping
closing
closed
Destroy Picture thread ...
Quiting....
拍下的照片全是黑的,请问是驱动的问题,还是采集软件的问题。
回复 支持 反对

使用道具 举报

发表于 2007-2-14 14:19:50 | 显示全部楼层
http://www.magiclinux.org/dev/2.1alpha/SRPMS/
加载/sbin/modprobe gspca
如果/dev/video0存在
/sbin/lsmod 必须有video0 和gspca
直接spcaview就可
回复 支持 反对

使用道具 举报

发表于 2007-5-9 09:42:19 | 显示全部楼层
我的和16楼的兄弟差不多,先是可以看到图片,过几秒钟就黑屏。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表