Android Hardware Abstraction Layer
|const camera_metadata_t *||result|
|const camera3_stream_buffer_t *||output_buffers|
The result of a single capture/reprocess by the camera HAL device. This is sent to the framework asynchronously with process_capture_result(), in response to a single capture request sent to the HAL with process_capture_request(). Multiple process_capture_result() calls may be performed by the HAL for each request. Each call, all with the same frame number, may contain some subset of the output buffers, and/or the result metadata. The metadata may only be provided once for a given frame number; all other calls must set the result metadata to NULL.
The result structure contains the output metadata from this capture, and the set of output buffers that have been/will be filled for this capture. Each output buffer may come with a release sync fence that the framework will wait on before reading, in case the buffer has not yet been filled by the HAL.
The number of output buffers returned in this result structure. Must be less than or equal to the matching capture request's count. If this is less than the buffer count in the capture request, at least one more call to process_capture_result with the same frame_number must be made, to return the remaining output buffers to the framework. This may only be zero if the structure includes valid result metadata.
|const camera3_stream_buffer_t* output_buffers|
The handles for the output stream buffers for this capture. They may not yet be filled at the time the HAL calls process_capture_result(); the framework will wait on the release sync fences provided by the HAL before reading the buffers.
The HAL must set the stream buffer's release sync fence to a valid sync fd, or to -1 if the buffer has already been filled.
If the HAL encounters an error while processing the buffer, and the buffer is not filled, the buffer's status field must be set to CAMERA3_BUFFER_STATUS_ERROR. If the HAL did not wait on the acquire fence before encountering the error, the acquire fence should be copied into the release fence, to allow the framework to wait on the fence before reusing the buffer.
The acquire fence must be set to -1 for all output buffers. If num_output_buffers is zero, this may be NULL. In that case, at least one more process_capture_result call must be made by the HAL to provide the output buffers.
|const camera_metadata_t* result|
The result metadata for this capture. This contains information about the final capture parameters, the state of the capture and post-processing hardware, the state of the 3A algorithms, if enabled, and the output of any enabled statistics units.
Only one call to process_capture_result() with a given frame_number may include the result metadata. All other calls for the same frame_number must set this to NULL.
If there was an error producing the result metadata, result must be an empty metadata buffer, and notify() must be called with ERROR_RESULT.