diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-08-24 12:32:17 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2012-08-27 10:30:04 -0700 |
commit | b8b6439598ecc5faecfce8d43f3418b057714b4c (patch) | |
tree | 4600264eca6bd2b8e9d253f2e826586e54115a1d /include/hardware/camera_common.h | |
parent | 43a2bbb9de4f51754b7b131fc282aa2f9115c09e (diff) | |
download | hardware_libhardware-b8b6439598ecc5faecfce8d43f3418b057714b4c.zip hardware_libhardware-b8b6439598ecc5faecfce8d43f3418b057714b4c.tar.gz hardware_libhardware-b8b6439598ecc5faecfce8d43f3418b057714b4c.tar.bz2 |
Camera2: Make static_camera_characteristics const.
Disallow modification to static characteristics structure, and clarify
ownership and lifetime of the structure.
Also update test code accordingly.
Bug: 6243944
Change-Id: I6921d6889937212867efb99aa3881ab3ffc4f6f9
Diffstat (limited to 'include/hardware/camera_common.h')
-rw-r--r-- | include/hardware/camera_common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/hardware/camera_common.h b/include/hardware/camera_common.h index 5459b6c..5697bda 100644 --- a/include/hardware/camera_common.h +++ b/include/hardware/camera_common.h @@ -135,7 +135,9 @@ struct camera_info { /** * The camera's fixed characteristics, which include all camera metadata in - * the android.*.info.* sections. + * the android.*.info.* sections. This should be a sorted metadata buffer, + * and may not be modified or freed by the caller. The pointer should remain + * valid for the lifetime of the camera module. * * Version information (based on camera_module_t.common.module_api_version): * @@ -150,7 +152,7 @@ struct camera_info { * otherwise. * */ - camera_metadata_t *static_camera_characteristics; + const camera_metadata_t *static_camera_characteristics; }; typedef struct camera_module { |