summaryrefslogtreecommitdiffstats
path: root/include/hardware/camera3.h
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2015-03-06 13:22:03 -0800
committerEino-Ville Talvala <etalvala@google.com>2015-03-09 12:54:15 -0700
commit453c790395b24f6ea046a457ed005683fda829b7 (patch)
treeac05d0dfb9afef903f1e26fe5fac7654f409085f /include/hardware/camera3.h
parentce295acf75b35a588feabe77af96c42aa73b2e8d (diff)
downloadhardware_libhardware-453c790395b24f6ea046a457ed005683fda829b7.zip
hardware_libhardware-453c790395b24f6ea046a457ed005683fda829b7.tar.gz
hardware_libhardware-453c790395b24f6ea046a457ed005683fda829b7.tar.bz2
Camera3: Add dataspace to camera HAL device stream configuration
The dataspace field communicates extra context about the requested stream configuration. For most graphics formats, the dataspace indicates the desired colorspace out of the output buffers. For some formats, the dataspace may indicate that depth output is requested instead. Change-Id: I6746d9097b4dc36af0a63ca88df75f32a77db90b
Diffstat (limited to 'include/hardware/camera3.h')
-rw-r--r--include/hardware/camera3.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/hardware/camera3.h b/include/hardware/camera3.h
index 5fcbf0f..2c47ef6 100644
--- a/include/hardware/camera3.h
+++ b/include/hardware/camera3.h
@@ -128,6 +128,11 @@
* 3.3: Minor revision of expanded-capability HAL:
*
* - OPAQUE and YUV reprocessing API updates.
+ *
+ * - Basic support for depth output buffers
+ *
+ * - Addition of data_space field to camera3_stream_t.
+ *
*/
/**
@@ -1482,6 +1487,35 @@ typedef struct camera3_stream {
*/
void *priv;
+ /**
+ * A field that describes the contents of the buffer. The format and buffer
+ * dimensions define the memory layout and structure of the stream buffers,
+ * while dataSpace defines the meaning of the data within the buffer.
+ *
+ * For most formats, dataSpace defines the color space of the image data.
+ * In addition, for some formats, dataSpace indicates whether image- or
+ * depth-based data is requested. See system/core/include/system/graphics.h
+ * for details of formats and valid dataSpace values for each format.
+ *
+ * Version information:
+ *
+ * < CAMERA_DEVICE_API_VERSION_3_3:
+ *
+ * Not defined and should not be accessed. dataSpace should be assumed to
+ * be HAL_DATASPACE_UNKNOWN, and the appropriate color space, etc, should
+ * be determined from the usage flags and the format.
+ *
+ * >= CAMERA_DEVICE_API_VERSION_3_3:
+ *
+ * Always set by the camera service. HAL must use this dataSpace to
+ * configure the stream to the correct colorspace, or to select between
+ * color and depth outputs if supported.
+ */
+ android_dataspace_t data_space;
+
+ /* reserved for future use */
+ void *reserved[8];
+
} camera3_stream_t;
/**