1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
Platform: RK3288
OS: Android 6.0 Kernel: 3.10.92 Kernel层: 打开UVC的宏 CONFIG_USB_VIDEO_CLASS=y 这个宏一般默认是配好的. 编译下载插上u*** camera开机之后应该会有类似如下log: [ 3.612836] u*** 3-1: New USB device found, idVendor=058f, idProduct=3822 [ 3.612857] u*** 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 [ 3.612867] u*** 3-1: Product: USB 2.0 HD Camera [ 3.614985] uvcvideo: Found UVC 1.00 device USB 2.0 HD Camera (058f:3822) [ 3.622648] input: USB 2.0 HD Camera as /devices/ff540000.u***/u***3/3-1/3-1:1.0/input/input3 查看设备是否注册成功: shell@rk3288:/ $ ls /dev/video* /dev/video0 /dev/video1 /dev/video_state video0是CIF camera, video1就是UVC Camera了. HAL层: 系统默认只支持1颗Camera, 所以第二颗即使驱动注册成功,上层也无法识别到, 因此修改如下: int camera_device_open(const hw_module_t* module, const char* name, hw_device_t** device) { ...... if (name != NULL) { cameraid = atoi(name); if(cameraid > gCamerasNumber) { LOGE("camera service provided cameraid out of bounds, " "cameraid = %d, num supported = %d", cameraid, gCamerasNumber); rv = -EINVAL; goto fail; } /*Kris, Support two cameras. {*/ #if 0 if(gCamerasOpen >= CAMERAS_SUPPORTED_SIMUL_MAX) { LOGE("maximum number(%d) of cameras already open",gCamerasOpen); rv = -EUSERS; goto fail; } #endif /*Kris, Support two cameras. }*/ ...... }这样就可以了! 注意: RK3288目前不支持高清类型的也就是说mjpeg数据格式的UVC Camera,需要用YUYV格式的. 最快的区分方法是查看HAL层log, code会读取数据格式并打印出来. 01-01 12:03:15.420 216 578 D CameraHal: CameraHal(121): it is a uvc camera! 01-01 12:03:15.420 216 578 D CameraHal: Calling process is: com.android.camera2 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(374): Camera driver: uvcvideo Driver version: 3.10.0 CameraHal version: 1.55.2 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(381): mCamDriverSupportFmt: fmt = 1448695129,index = 0 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(419): cameraCreate(419): mCamDriverPreviewFmt(YUYV) is cameraHal and camera driver is also supported!! 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(421): mCamDriverPreviewFmt = 1448695129 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(427): cameraCreate(427): Current driver is uvcvideo, v4l2 memory is V4L2_MEMORY_MMAP |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
626 浏览 0 评论
887 浏览 1 评论
784 浏览 1 评论
1997 浏览 1 评论
3242 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 23:13 , Processed in 0.657380 second(s), Total 70, Slave 54 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号