Android Hardware Abstraction Layer
Data Fields
camera3_capture_result Struct Reference

#include <camera3.h>

Data Fields

uint32_t frame_number
const camera_metadata_tresult
uint32_t num_output_buffers
const camera3_stream_buffer_toutput_buffers

Detailed Description


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.

Definition at line 1639 of file camera3.h.

Field Documentation

uint32_t frame_number

The frame number is an incrementing integer set by the framework in the submitted request to uniquely identify this capture. It is also used to identify the request in asynchronous notifications sent to camera3_callback_ops_t.notify().

Definition at line 1646 of file camera3.h.

uint32_t num_output_buffers

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.

Definition at line 1671 of file camera3.h.

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.

Definition at line 1694 of file camera3.h.

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.

Definition at line 1661 of file camera3.h.

The documentation for this struct was generated from the following file: