和你一起终身学习,这里是程序员Android
经典好文推荐,通过阅读本文,您将收获以下知识点:
一、多帧拍照请求概览
二、多帧拍照回帧概览
一、多帧拍照请求概览
多帧拍照请求概览如下:
1.1 APP 下发拍照请求到 Camera Framework
1.1.1 Trace关键字如下:
APP:
deliverInputEvent: app 点击事件处理
CameraUnitCamera2ImplTakePicture: app 下发拍照请求
binder transaction :通过bind 跟FWK交互
FWK:
binder reply :响应app 下发的bind
submitRequestList:Camera FWK提交拍照请求给HAL,并包含拍照帧数
captureList
submitRequestsHelper
createCaptureRequest :比如多帧会下发4 帧
queueRequestList
unpauseForNewRequests:暂停新的拍照请求
1.1.2 详细请看下面trace 截图
1.1.3 下发4帧请求createCaptureRequest
1.2 Camera Framework下发拍照请求到 camera HAL中
1.2.1 Trace关键字如下:
FWK:
sendRequestsBatch:Camera FWK 下发批处理请求
CameraHal::processBatchCaptureRequests: Camera FWK 每帧请求到HAL
HIDL::ICameraDeviceSession::processCaptureRequest_3_4::client: Camera 向Camera HAL请求一帧
binder transaction
CAM HAL:
binder reply
HIDL::ICameraDeviceSession::processCaptureRequest_3_4::server :Camera HAL接受处理Camera FWK 请求
processCaptureRequest_3_4
processCaptureRequest
submitOneRequest
onRequest_EvaluateRequest
evaluateRequest
FeatureSettingPolicy::evaluateRequest
evaluateCaptureSetting
negotiate
onRequest_ProcessEvaluatedFrame
processEvaluatedFrame
onProcessEvaluatedFrame
submitZslRequest:Camera HAL 提交拍照请求帧
makePipelineFrame
queue|requestNo:97 frameNo:97
onFrameUpdated
1.2.2 详细请看下面trace 截图
1.2.3 拍照log关键字:
control.captureIntent:2|capture req#
拍照log 如下:
01-02 09:05:10.695442 1161 1642 I mtkcam-PipelineModelSession: [submitRequest] <Default/1> requestNo:94 { repeating:0 control.aeTargetFpsRange:5,30 control.captureIntent:2 control.enableZsl:1 control.processRawEn:0 control.mode:1 control.sceneMode:0 control.videoStabilizationMode:0 edge.mode:2 }
01-02 09:05:10.695560 1161 1642 I mtkcam-FeatureSettingPolicy: [evaluateCaptureSetting] (0xb4000075a3a43020) capture req#:94
01-02 09:05:10.734815 1161 1642 I mtkcam-PipelineModelSession: [submitRequest] <Default/1> requestNo:95 { repeating:0 control.aeTargetFpsRange:5,30 control.captureIntent:2 control.enableZsl:1 control.processRawEn:0 control.mode:1 control.sceneMode:0 control.videoStabilizationMode:0 edge.mode:2 }
01-02 09:05:10.734937 1161 1642 I mtkcam-FeatureSettingPolicy: [evaluateCaptureSetting] (0xb4000075a3a43020) capture req#:95
01-02 09:05:10.770126 1161 1645 I mtkcam-PipelineModelSession: [submitRequest] <Default/1> requestNo:96 { repeating:0 control.aeTargetFpsRange:5,30 control.captureIntent:2 control.enableZsl:1 control.processRawEn:0 control.mode:1 control.sceneMode:0 control.videoStabilizationMode:0 edge.mode:2 }
01-02 09:05:10.770526 1161 1645 I mtkcam-FeatureSettingPolicy: [evaluateCaptureSetting] (0xb4000075a3a43020) capture req#:96
01-02 09:05:10.795720 1161 1645 I mtkcam-PipelineModelSession: [submitRequest] <Default/1> requestNo:97 { repeating:0 control.aeTargetFpsRange:5,30 control.captureIntent:2 control.enableZsl:1 control.processRawEn:0 control.mode:1 control.sceneMode:0 control.videoStabilizationMode:0 edge.mode:2 }
01-02 09:05:10.795846 1161 1645 I mtkcam-FeatureSettingPolicy: [evaluateCaptureSetting] (0xb4000075a3a43020) capture