OSDN Git Service

Camera2: Add CAMERA2_HAL_PIXEL_FORMAT_ZSL temporarily.
authorEino-Ville Talvala <etalvala@google.com>
Thu, 13 Sep 2012 23:32:14 +0000 (16:32 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Thu, 13 Sep 2012 23:32:14 +0000 (16:32 -0700)
Until all HAL implementations move to the new gralloc format selection
scheme, define FORMAT_ZSL for indicating ZSL streams.

Bug: 6243944
Change-Id: I90249beaaca5da80c9464eedd6aa9d3648bb56cc

include/hardware/camera2.h

index 8b789ec..e6b99b7 100644 (file)
@@ -97,10 +97,20 @@ typedef struct camera2_stream_ops {
 } camera2_stream_ops_t;
 
 /**
- * Temporary definition during transition. TODO: Remove once HALs no longer
- * reference this */
+ * Temporary definition during transition.
+ *
+ * These formats will be removed and replaced with
+ * HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED.  To maximize forward compatibility,
+ * HAL implementations are strongly recommended to treat FORMAT_OPAQUE and
+ * FORMAT_ZSL as equivalent to HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, and
+ * return HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED in the format_actual output
+ * parameter of allocate_stream, allowing the gralloc module to select the
+ * specific format based on the usage flags from the camera and the stream
+ * consumer.
+ */
 enum {
-    CAMERA2_HAL_PIXEL_FORMAT_OPAQUE = HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
+    CAMERA2_HAL_PIXEL_FORMAT_OPAQUE = HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
+    CAMERA2_HAL_PIXEL_FORMAT_ZSL = -1
 };
 
 /**