|
本帖最后由 duwu891229 于 2015-9-14 10:46 编辑
购买了s5k4ecgx摄像头,插到开发板的摄像头接口上,如何在linux下正常工作起来?
#内核采用
启动信息
#查询所有video设备
- char* _videos[] = {
- "/dev/video0", "/dev/video1", "/dev/video2",
- "/dev/video3", "/dev/video4", "/dev/video5",
- };
- static void query_video() {
- int fd, i;
- struct v4l2_capability cap;
- for (i = 0; i < ARRAY_SIZE(_videos); i++) {
- fd = open(_videos[i], O_RDWR);
- if (fd < 0) {
- printf("%s, open failed\n", _videos[i]);
- continue;
- }
- memset(&cap, 0, sizeof(cap));
- if (-1 == ioctl(fd, VIDIOC_QUERYCAP, &cap)) {
- printf("%s, VIDIOC_QUERYCAP failed\n", _videos[i]);
- } else {
- printf("%s\ncapabilities: %08x\ndriver: %s\ncard: %s\nbus_info: %s\nversion: %u.%u.%u\n\n",
- _videos[i], cap.capabilities,
- cap.driver, cap.card, cap.bus_info,
- (cap.version >> 16) & 0XFF, (cap.version >> 8) & 0XFF,
- cap.version & 0XFF);
- }
- close(fd);
- }
- }
复制代码
输出信息
- /dev/video0
- capabilities: 85000001
- driver: vivi
- card: vivi
- bus_info: vivi-000
- version: 3.4.39
- /dev/video1
- capabilities: 04001000
- driver: VIDEO CLIPPER0
- card: VIDEO CLIPPER0
- bus_info: media
- version: 1.0.0
- /dev/video2
- capabilities: 04001000
- driver: VIDEO DECIMATOR
- card: VIDEO DECIMATOR0
- bus_info: media
- version: 1.0.0
- /dev/video3
- capabilities: 04001000
- driver: VIDEO CLIPPER1
- card: VIDEO CLIPPER1
- bus_info: media
- version: 1.0.0
- /dev/video4
- capabilities: 04001000
- driver: VIDEO DECIMATOR
- card: VIDEO DECIMATOR1
- bus_info: media
- version: 1.0.0
- /dev/video5
- capabilities: 04003000
- driver: VIDEO SCALER
- card: VIDEO SCALER
- bus_info: media
- version: 1.0.0
复制代码
video0是虚拟设备,具备V4L2_CAP_VIDEO_CAPTURE的能力;
video1-4是真实设备,不具备V4L2_CAP_VIDEO_CAPTURE的能力。
这个是什么问题?
能把可以正常运的的内核和测试程序单独给我吗,你们给的X4418_A_150818.iso和X4418_B_150818没有这些东西? |
|