Android Hardware Abstraction Layer
Data Fields
camera3_stream_buffer Struct Reference

#include <camera3.h>

Data Fields

camera3_stream_tstream
 
buffer_handle_t * buffer
 
int status
 
int acquire_fence
 
int release_fence
 

Detailed Description

camera3_stream_buffer_t:

A single buffer from a camera3 stream. It includes a handle to its parent stream, the handle to the gralloc buffer itself, and sync fences

The buffer does not specify whether it is to be used for input or output; that is determined by its parent stream type and how the buffer is passed to the HAL device.

Definition at line 1224 of file camera3.h.

Field Documentation

int acquire_fence

The acquire sync fence for this buffer. The HAL must wait on this fence fd before attempting to read from or write to this buffer.

The framework may be set to -1 to indicate that no waiting is necessary for this buffer.

When the HAL returns an output buffer to the framework with process_capture_result(), the acquire_fence must be set to -1. If the HAL never waits on the acquire_fence due to an error in filling a buffer, when calling process_capture_result() the HAL must set the release_fence of the buffer to be the acquire_fence passed to it by the framework. This will allow the framework to wait on the fence before reusing the buffer.

For input buffers, the HAL must not change the acquire_fence field during the process_capture_request() call.

Definition at line 1261 of file camera3.h.

buffer_handle_t* buffer

The native handle to the buffer

Definition at line 1233 of file camera3.h.

int release_fence

The release sync fence for this buffer. The HAL must set this fence when returning buffers to the framework, or write -1 to indicate that no waiting is required for this buffer.

For the input buffer, the release fence must be set by the process_capture_request() call. For the output buffers, the fences must be set in the output_buffers array passed to process_capture_result().

Definition at line 1273 of file camera3.h.

int status

Current state of the buffer, one of the camera3_buffer_status_t values. The framework will not pass buffers to the HAL that are in an error state. In case a buffer could not be filled by the HAL, it must have its status set to CAMERA3_BUFFER_STATUS_ERROR when returned to the framework with process_capture_result().

Definition at line 1242 of file camera3.h.

The handle of the stream this buffer is associated with

Definition at line 1228 of file camera3.h.


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