Camera(一):查看Camera设备详细信息
一.查看是否存在camera外设,设备节点
ls /dev/video*
二.adb 查看camera 详细信息
2.1.adb shell dumpsys media.camera 2.2.adb 查看camera 过滤信息 查看某一项参数,使用过滤命令grep(linux), windows下可使用findstr来过滤 dumpsys media.camera |grep picture-size //Camera preview 相关信息 picture-size: 1920x1080 picture-size-values: 640x480,1920x1080,1600x1080,1280x720,640x360,352x288,176x144,160x120,848x480,320x240 2.3.adb 保存camera信息 adb shell dumpsys media.camera > C:\Users\Administrator\Desktop\camera.txt
adb shell dumpsys media.camera Camera module HAL API version: 0x3 Camera module API version: 0x1 Camera module name: RK29_ICS_CameraHal_Module Camera module author: RockChip Number of camera devices: 1 //Camera个数 双目:2 单个:1 识别不到:0 Vendor tags left unimplemented. Camera 0 static information: Facing: BACK Orientation: 0 //Camera预览方向:对应设置里面的“摄像头方向”,这里相当于读取 Device version: 0x100 Device is open. Client instance dump: Client[0] (0xb86d2b18) PID: 1360 Latest set parameters: CameraParameters::dump: mMap.size = 50 antibanding: off antibanding-values: off,50hz,60hz,auto exposure-compensation: 0 exposure-compensation-step: 1 focal-length: 35 focus-distances: 0.3,50,Infinity focus-mode: fixed focus-mode-values: fixed horizontal-view-angle: 10 jpeg-quality: 90 jpeg-thumbnail-height: 128 jpeg-thumbnail-quality: 50 jpeg-thumbnail-size-values: 0x0,160x128 jpeg-thumbnail-width: 160 max-exposure-compensation: 3 max-num-detected-faces-hw: 0 max-num-detected-faces-sw: 0 max-num-focus-areas: 0 max-num-metering-areas: 0 max-zoom: 40 min-exposure-compensation: -3 picture-format: jpeg //Camera preview 相关信息 picture-format-values: jpeg picture-size: 1920x1080 //预览分辨率 picture-size-values: 640x480,1920x1080,1600x1080,1280x720,640x360,352x288,176x144,160x120,848x480,320x240 preferred-preview-size-for-video: 1280x720 preview-format: yuv420sp preview-format-values: yuv420sp,yuv420p preview-fps-range: 10000,15000 preview-fps-range-values: (10000,15000) preview-frame-rate: 15 preview-frame-rate-values: 15,10 preview-size: 1920x1080 preview-size-values: 640x480,1920x1080,1600x1080,1280x720,640x360,352x288,176x144,160x120,848x480,320x240 recording-hint: false rk-continous-pic-num: 1 rk-previwe-h-force: 0 rk-previwe-w-force: 0 rotation: 0 vertical-view-angle: 10 video-frame-format: yuv420sp video-size: 1280x720 video-size-values: 176x144,320x240,352x288,640x480,1280x720,1920x1080 video-snapshot-supported: true video-stabilization-supported: false whitebalance: auto whitebalance-values: auto,incandescent,fluorescent,daylight,cloudy-daylight zoom: 0 zoom-ratios: 100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,255,260,265,270,275,280,285,290,295,300, zoom-supported: true Camera traces (0): No camera traces collected.
二.Camera Hardware 一些常见的问题
1.1. 多个摄像头带宽限制 cameraStream(543): VIDIOC_STREAMON Failed ,err: No space left on device
01-06 18:04:44.534 244 1521 D CameraHal: cameraSetSize(514): cameraSetSize(514):IN, w = 640,h = 480 01-06 18:04:44.552 244 1521 D CameraHal: cameraStream(536): cameraStream(536):on = 1 01-06 18:04:45.100 244 1521 E CameraHal: cameraStream(543): cameraStream(543): VIDIOC_STREAMON Failed ,err: No space left on device 01-06 18:04:45.100 244 1521 D CameraHal: startPreview(255): startPreview(255):OUT 01-06 18:04:45.102 244 1521 D CameraHal: commandThread(1013): commandThread(1013): CMD_PREVIEW_START out 01-06 18:04:45.102 244 1521 D CameraHal: commandThread(1045): commandThread(1045):receive CMD_SET_PREVIEW_WINDOW
1.2.摄像头协议错误 usb线材可能有问题 cameraStream(543): VIDIOC_STREAMON Failed ,err: Protocol error