camera2_stream_ops Struct Reference
#include <
camera2.h
>
Data Fields |
|
int(* | dequeue_buffer )(const struct camera2_stream_ops *w, buffer_handle_t **buffer) |
int(* | enqueue_buffer )(const struct camera2_stream_ops *w, int64_t timestamp, buffer_handle_t *buffer) |
int(* | cancel_buffer )(const struct camera2_stream_ops *w, buffer_handle_t *buffer) |
int(* | set_crop )(const struct camera2_stream_ops *w, int left, int top, int right, int bottom) |
Detailed Description
Output image stream queue interface. A set of these methods is provided to the HAL device in allocate_stream(), and are used to interact with the gralloc buffer queue for that stream. They may not be called until after allocate_stream returns.
Field Documentation
int(* cancel_buffer)(const struct camera2_stream_ops *w, buffer_handle_t *buffer) |
int(* dequeue_buffer)(const struct camera2_stream_ops *w, buffer_handle_t **buffer) |
Get a buffer to fill from the queue. The size and format of the buffer are fixed for a given stream (defined in allocate_stream), and the stride should be queried from the platform gralloc module. The gralloc buffer will have been allocated based on the usage flags provided by allocate_stream, and will be locked for use.
int(* enqueue_buffer)(const struct camera2_stream_ops *w, int64_t timestamp, buffer_handle_t *buffer) |
Push a filled buffer to the stream to be used by the consumer.
The timestamp represents the time at start of exposure of the first row of the image; it must be from a monotonic clock, and is measured in nanoseconds. The timestamps do not need to be comparable between different cameras, or consecutive instances of the same camera. However, they must be comparable between streams from the same camera. If one capture produces buffers for multiple streams, each stream must have the same timestamp for that buffer, and that timestamp must match the timestamp in the output frame metadata.
int(* set_crop)(const struct camera2_stream_ops *w, int left, int top, int right, int bottom) |
The documentation for this struct was generated from the following file:
- hardware/libhardware/include/hardware/ camera2.h