diff options
author | Igor Murashkin <iam@google.com> | 2013-03-18 13:30:14 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2013-03-21 16:06:42 -0700 |
commit | 152b50fda66a1fe2b4ed96ec54da96d10f8ac37c (patch) | |
tree | a6d58f8acc748a95377ed6d24172c47dcac848a4 | |
parent | ad186ba61c77a4f978ee365ad5b063d69fd48c9a (diff) | |
download | libhardware-152b50fda66a1fe2b4ed96ec54da96d10f8ac37c.tar.gz |
camera_common.h: Add STATUS_ENUMERATING enum
Change-Id: I0986d37364a2666d493cb771fa76967aa051ca5d
-rw-r--r-- | include/hardware/camera_common.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/hardware/camera_common.h b/include/hardware/camera_common.h index 22b3f7a8..62c57402 100644 --- a/include/hardware/camera_common.h +++ b/include/hardware/camera_common.h @@ -172,6 +172,18 @@ typedef struct camera_info { * * The current status of the camera device, as provided by the HAL through the * camera_module_callbacks.camera_device_status_change() call. + * + * At module load time, the framework will assume all camera devices are in the + * CAMERA_DEVICE_STATUS_PRESENT state. The HAL should invoke + * camera_module_callbacks::camera_device_status_change to inform the framework + * of any initially NOT_PRESENT devices. + * + * Allowed transitions: + * PRESENT -> NOT_PRESENT + * NOT_PRESENT -> ENUMERATING + * NOT_PRESENT -> PRESENT + * ENUMERATING -> PRESENT + * ENUMERATING -> NOT_PRESENT */ typedef enum camera_device_status { /** @@ -187,7 +199,14 @@ typedef enum camera_device_status { * change. By default, the framework will assume all devices are in this * state. */ - CAMERA_DEVICE_STATUS_PRESENT = 1 + CAMERA_DEVICE_STATUS_PRESENT = 1, + + /** + * The camera device is connected, but it is undergoing an enumeration and + * so opening the device will return -EBUSY. Calls to get_camera_info + * must still succeed, as if the camera was in the PRESENT status. + */ + CAMERA_DEVICE_STATUS_ENUMERATING = 2, } camera_device_status_t; |