Android camera: Metadata\Image从HAL到framework
RequestThread
Thread for managing capture request submission to HAL device
1. waiting next batch of requests:
CaptureRequest: From App to framework
cemara3_capture_request: camera service sent to HAL
2. prepareHalRequests()
该函数里最麻烦的是获得getBuffer
HAL call into framework: processCaptureResult
camera3_capture_result数据结构:
这里最麻烦的是 returnOutputBuffers:
把fill后的buffer和consumer关联
接收mResultSignal回调java层传入的onResultAvailable函数
processCaptureResult会发送mResultSignal触发这里
Notify的处理过程
Notify的处理除了调用listener的notify还设置了time用于processCaptureResult
使怎样触发调用的sProcessCaptureResult?
在camera service 和hidl层有2个地方有sProcessCaptureResult的定义和实现是不同层实现的callback:
hidl层的sProcessCaptureResultf调用service 层的 sProcessCaptureResult进而调用到java层接口onResultReceived
hidl层的callback是怎样被调到的?
从本地实现调用到传入的回调函数