前文回顾
上一篇文章,简单讲述configure_streams的过程
一、process_capture_request 流程
1.1 原文解析
* 6. The framework requests default settings for some number of use cases with
* calls to camera3_device_t->ops->construct_default_request_settings(). This
* may occur any time after step 3.
*
* 7. The framework constructs and sends the first capture request to the HAL,
* with settings based on one of the sets of default settings, and with at
* least one output stream, which has been registered earlier by the
* framework. This is sent to the HAL with
* camera3_device_t->ops->process_capture_request(). The HAL must block the
* return of this call until it is ready for the next request to be sent.
*
* >= CAMERA_DEVICE_API_VERSION_3_2:
*
* The buffer_handle_t provided in the camera3_stream_buffer_t array
* in the camera3_capture_request_t may be new and never-before-seen
* by the HAL on any given new request.
*
* 8. The framework continues to submit requests, and call
* construct_default_request_settings to get default settings buffers for
* other use cases.
*
* <= CAMERA_DEVICE_API_VERSION_3_1:
*
* The framework may call register_stream_buffers() at this time for
* not-yet-registered streams.6、配置默认请求:可能在步骤3之后的任何时间发生,framework通过调用camera_device方法ops调用camera3_device_ops的construct_default_request_settings方法配置默认请求,camera3_device_t-> ops-> construct_default_request_settings。
7、下发Capture请求:在使用默认设置中的一组设置和至少一个输出流(已由Framework较早注册),framework构造并向HAL发送第一个捕获请求。
framework调用 .1camera_device方法ops调用camera3_device_ops的process_capture_request开始下发request请求,通过camera3_device_t-> ops-> process_capture_request()发送到HAL。 在准备好发送下一个request前,HAL必须返回此调用。 API3.2->
在camera3_capture_request_t的camera3_stream_buffer_t数组中提供的buffer_handle_t可能是新的,而且在任意给的request中,HAL层都没见这个buffer_handle_t。
8、获取其他use case:framework继续提交请求,并调用Construct_default_request_settings获取默认设置缓冲区其他use cases。API3.1->framework此时可以调用 register_stream_buffers()来尚未注册的流
1.2 官网文档
《80-pc212-1_a_chi_api_specifications_for_qualcomm_spectra_2xx_camera.pdf》简单介绍process_request的过程
1.3 代码分析
//TODO,喝口水,远眺下,继续撸代码