本文介绍开源鸿蒙标准系统中的Camera主要流程调试技巧。
Open Camera日志
hilog |grep -iE "CameraApp.*createCameraInput|HCameraService::CreateCameraDevice|camera_hdi_service: OpenCamera" --color
输出:
I A00200/CameraApp: [CameraService]: createCameraInput id = lcam001 name =BACK
E C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:182} HCameraService::CreateCameraDevice MuteCamera not Supported
I C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:188} HCameraService::CreateCameraDevice before insert! cameraId: lcam001, pid = 5828, devices size = 1, cameraIds size = 0
I C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:193} HCameraService::CreateCameraDevice after insert! cameraId: lcam001, pid = 5828, devices size = 1, cameraIds size = 1
D C02500/camera_hdi_service: OpenCamera() OpenCamera entry
D C02500/camera_hdi_service: OpenCamera() OpenCamera cameraId find success.
D C02500/camera_hdi_service: OpenCamera() open camera success.
I A00200/CameraApp: [CameraService]: createCameraInput end
其中,
- /CameraApp 是应用进程的log
- /CAMERA 是Camera Service进程的log
- /camera_hdi_service 是Camera Host进程的log
CameraServie dump
hidumper -s CameraService
输出
-------------------------------[ability]-------------------------------
----------------------------------CameraService---------------------------------
-------- Summary -------
# Number of Cameras:[1]:
# Number of Active Cameras:[2]:
# Number of Camera clients:[0]:
-------- CameraDevice -------
# Camera ID:[lcam001]:
## Camera Ability List:
Camera Position:[Front]: Camera Type:[Wide-Angle]: Camera Connection Type:[Builtin]:
### Camera Available stream configuration List:
Number Stream Info: 2
Format:[RGBA_8888]: Size:[Width:640 Height:480]:
Format:[JPEG]: Size:[Width:1280 Height:960]:
## Zoom Related Info:
Available Zoom Ratio Range:[1.0000001.000000]:
## Flash Related Info:
Available Flash Modes:[ Close Open Auto Always-Open]:
## AF Related Info:
Available Focus Modes:[ Manual Continuous-Auto Auto Locked]:
## AE Related Info:
Available Exposure Modes:[ Manual Continuous-Auto Locked Auto]:
## Sensor Info Info:
## Video Stabilization Related Info:
Available Video Stabilization Modes:[ Off]:
## Video FrameRateRange Related Info:
Available FrameRateRange :
[ 5, 10 ]
## Camera Prelaunch Related Info:
## Camera Thumbnail Related Info:
-------- Clientwise Info -------