summaryrefslogtreecommitdiff
path: root/include/android/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'include/android/metadata')
-rw-r--r--include/android/metadata/camera_metadata_hidden.h100
-rw-r--r--include/android/metadata/system/camera_metadata.h580
-rw-r--r--include/android/metadata/system/camera_metadata_tags.h1005
-rw-r--r--include/android/metadata/system/camera_vendor_tags.h158
4 files changed, 1843 insertions, 0 deletions
diff --git a/include/android/metadata/camera_metadata_hidden.h b/include/android/metadata/camera_metadata_hidden.h
new file mode 100644
index 00000000..31f1ad19
--- /dev/null
+++ b/include/android/metadata/camera_metadata_hidden.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H
+#define SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H
+
+#include <system/camera_vendor_tags.h>
+
+/**
+ * Error codes returned by vendor tags ops operations. These are intended
+ * to be used by all framework code that uses the return values from the
+ * vendor operations object.
+ */
+#define VENDOR_SECTION_NAME_ERR NULL
+#define VENDOR_TAG_NAME_ERR NULL
+#define VENDOR_TAG_COUNT_ERR (-1)
+#define VENDOR_TAG_TYPE_ERR (-1)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/** **These are private functions for use only by the camera framework.** **/
+
+/**
+ * Set the global vendor tag operations object used to define vendor tag
+ * structure when parsing camera metadata with functions defined in
+ * system/media/camera/include/camera_metadata.h.
+ */
+ANDROID_API
+int set_camera_metadata_vendor_ops(const vendor_tag_ops_t *query_ops);
+
+/**
+ * Set the global vendor tag cache operations object used to define vendor tag
+ * structure when parsing camera metadata with functions defined in
+ * system/media/camera/include/camera_metadata.h.
+ */
+ANDROID_API
+int set_camera_metadata_vendor_cache_ops(
+ const struct vendor_tag_cache_ops *query_cache_ops);
+
+/**
+ * Set the vendor id for a particular metadata buffer.
+ */
+ANDROID_API
+void set_camera_metadata_vendor_id(camera_metadata_t *meta,
+ metadata_vendor_id_t id);
+
+/**
+ * Retrieve the vendor id for a particular metadata buffer.
+ */
+ANDROID_API
+metadata_vendor_id_t get_camera_metadata_vendor_id(
+ const camera_metadata_t *meta);
+
+/**
+ * Retrieve the type of a tag. Returns -1 if no such tag is defined.
+ */
+ANDROID_API
+int get_local_camera_metadata_tag_type_vendor_id(uint32_t tag,
+ metadata_vendor_id_t id);
+
+/**
+ * Retrieve the name of a tag. Returns NULL if no such tag is defined.
+ */
+ANDROID_API
+const char *get_local_camera_metadata_tag_name_vendor_id(uint32_t tag,
+ metadata_vendor_id_t id);
+
+/**
+ * Retrieve the name of a tag section. Returns NULL if no such tag is defined.
+ */
+ANDROID_API
+const char *get_local_camera_metadata_section_name_vendor_id(uint32_t tag,
+ metadata_vendor_id_t id);
+
+/**
+ * Retrieve the type of a tag. Returns -1 if no such tag is defined.
+ */
+ANDROID_API
+int get_local_camera_metadata_tag_type_vendor_id(uint32_t tag,
+ metadata_vendor_id_t id);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* SYSTEM_MEDIA_PRIVATE_INCLUDE_CAMERA_METADATA_HIDDEN_H */
diff --git a/include/android/metadata/system/camera_metadata.h b/include/android/metadata/system/camera_metadata.h
new file mode 100644
index 00000000..46e7ac00
--- /dev/null
+++ b/include/android/metadata/system/camera_metadata.h
@@ -0,0 +1,580 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_METADATA_H
+#define SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_METADATA_H
+
+#include <string.h>
+#include <stdint.h>
+#include <cutils/compiler.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Tag hierarchy and enum definitions for camera_metadata_entry
+ * =============================================================================
+ */
+
+/**
+ * Main enum definitions are in a separate file to make it easy to
+ * maintain
+ */
+#include "camera_metadata_tags.h"
+
+/**
+ * Enum range for each top-level category
+ */
+ANDROID_API
+extern unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2];
+ANDROID_API
+extern const char *camera_metadata_section_names[ANDROID_SECTION_COUNT];
+
+/**
+ * Type definitions for camera_metadata_entry
+ * =============================================================================
+ */
+enum {
+ // Unsigned 8-bit integer (uint8_t)
+ TYPE_BYTE = 0,
+ // Signed 32-bit integer (int32_t)
+ TYPE_INT32 = 1,
+ // 32-bit float (float)
+ TYPE_FLOAT = 2,
+ // Signed 64-bit integer (int64_t)
+ TYPE_INT64 = 3,
+ // 64-bit float (double)
+ TYPE_DOUBLE = 4,
+ // A 64-bit fraction (camera_metadata_rational_t)
+ TYPE_RATIONAL = 5,
+ // Number of type fields
+ NUM_TYPES
+};
+
+typedef struct camera_metadata_rational {
+ int32_t numerator;
+ int32_t denominator;
+} camera_metadata_rational_t;
+
+/**
+ * A reference to a metadata entry in a buffer.
+ *
+ * The data union pointers point to the real data in the buffer, and can be
+ * modified in-place if the count does not need to change. The count is the
+ * number of entries in data of the entry's type, not a count of bytes.
+ */
+typedef struct camera_metadata_entry {
+ size_t index;
+ uint32_t tag;
+ uint8_t type;
+ size_t count;
+ union {
+ uint8_t *u8;
+ int32_t *i32;
+ float *f;
+ int64_t *i64;
+ double *d;
+ camera_metadata_rational_t *r;
+ } data;
+} camera_metadata_entry_t;
+
+/**
+ * A read-only reference to a metadata entry in a buffer. Identical to
+ * camera_metadata_entry in layout
+ */
+typedef struct camera_metadata_ro_entry {
+ size_t index;
+ uint32_t tag;
+ uint8_t type;
+ size_t count;
+ union {
+ const uint8_t *u8;
+ const int32_t *i32;
+ const float *f;
+ const int64_t *i64;
+ const double *d;
+ const camera_metadata_rational_t *r;
+ } data;
+} camera_metadata_ro_entry_t;
+
+/**
+ * Size in bytes of each entry type
+ */
+ANDROID_API
+extern const size_t camera_metadata_type_size[NUM_TYPES];
+
+/**
+ * Human-readable name of each entry type
+ */
+ANDROID_API
+extern const char* camera_metadata_type_names[NUM_TYPES];
+
+/**
+ * Main definitions for the metadata entry and array structures
+ * =============================================================================
+ */
+
+/**
+ * A packet of metadata. This is a list of metadata entries, each of which has
+ * an integer tag to identify its meaning, 'type' and 'count' field, and the
+ * data, which contains a 'count' number of entries of type 'type'. The packet
+ * has a fixed capacity for entries and for extra data. A new entry uses up one
+ * entry slot, and possibly some amount of data capacity; the function
+ * calculate_camera_metadata_entry_data_size() provides the amount of data
+ * capacity that would be used up by an entry.
+ *
+ * Entries are not sorted by default, and are not forced to be unique - multiple
+ * entries with the same tag are allowed. The packet will not dynamically resize
+ * when full.
+ *
+ * The packet is contiguous in memory, with size in bytes given by
+ * get_camera_metadata_size(). Therefore, it can be copied safely with memcpy()
+ * to a buffer of sufficient size. The copy_camera_metadata() function is
+ * intended for eliminating unused capacity in the destination packet.
+ */
+struct camera_metadata;
+typedef struct camera_metadata camera_metadata_t;
+
+/**
+ * Functions for manipulating camera metadata
+ * =============================================================================
+ *
+ * NOTE: Unless otherwise specified, functions that return type "int"
+ * return 0 on success, and non-0 value on error.
+ */
+
+/**
+ * Allocate a new camera_metadata structure, with some initial space for entries
+ * and extra data. The entry_capacity is measured in entry counts, and
+ * data_capacity in bytes. The resulting structure is all contiguous in memory,
+ * and can be freed with free_camera_metadata().
+ */
+ANDROID_API
+camera_metadata_t *allocate_camera_metadata(size_t entry_capacity,
+ size_t data_capacity);
+
+/**
+ * Get the required alignment of a packet of camera metadata, which is the
+ * maximal alignment of the embedded camera_metadata, camera_metadata_buffer_entry,
+ * and camera_metadata_data.
+ */
+ANDROID_API
+size_t get_camera_metadata_alignment();
+
+/**
+ * Allocate a new camera_metadata structure of size src_size. Copy the data,
+ * ignoring alignment, and then attempt validation. If validation
+ * fails, free the memory and return NULL. Otherwise return the pointer.
+ *
+ * The resulting pointer can be freed with free_camera_metadata().
+ */
+ANDROID_API
+camera_metadata_t *allocate_copy_camera_metadata_checked(
+ const camera_metadata_t *src,
+ size_t src_size);
+
+/**
+ * Place a camera metadata structure into an existing buffer. Returns NULL if
+ * the buffer is too small for the requested number of reserved entries and
+ * bytes of data. The entry_capacity is measured in entry counts, and
+ * data_capacity in bytes. If the buffer is larger than the required space,
+ * unused space will be left at the end. If successful, returns a pointer to the
+ * metadata header placed at the start of the buffer. It is the caller's
+ * responsibility to free the original buffer; do not call
+ * free_camera_metadata() with the returned pointer.
+ */
+ANDROID_API
+camera_metadata_t *place_camera_metadata(void *dst, size_t dst_size,
+ size_t entry_capacity,
+ size_t data_capacity);
+
+/**
+ * Free a camera_metadata structure. Should only be used with structures
+ * allocated with allocate_camera_metadata().
+ */
+ANDROID_API
+void free_camera_metadata(camera_metadata_t *metadata);
+
+/**
+ * Calculate the buffer size needed for a metadata structure of entry_count
+ * metadata entries, needing a total of data_count bytes of extra data storage.
+ */
+ANDROID_API
+size_t calculate_camera_metadata_size(size_t entry_count,
+ size_t data_count);
+
+/**
+ * Get current size of entire metadata structure in bytes, including reserved
+ * but unused space.
+ */
+ANDROID_API
+size_t get_camera_metadata_size(const camera_metadata_t *metadata);
+
+/**
+ * Get size of entire metadata buffer in bytes, not including reserved but
+ * unused space. This is the amount of space needed by copy_camera_metadata for
+ * its dst buffer.
+ */
+ANDROID_API
+size_t get_camera_metadata_compact_size(const camera_metadata_t *metadata);
+
+/**
+ * Get the current number of entries in the metadata packet.
+ *
+ * metadata packet must be valid, which can be checked before the call with
+ * validate_camera_metadata_structure().
+ */
+ANDROID_API
+size_t get_camera_metadata_entry_count(const camera_metadata_t *metadata);
+
+/**
+ * Get the maximum number of entries that could fit in the metadata packet.
+ */
+ANDROID_API
+size_t get_camera_metadata_entry_capacity(const camera_metadata_t *metadata);
+
+/**
+ * Get the current count of bytes used for value storage in the metadata packet.
+ */
+ANDROID_API
+size_t get_camera_metadata_data_count(const camera_metadata_t *metadata);
+
+/**
+ * Get the maximum count of bytes that could be used for value storage in the
+ * metadata packet.
+ */
+ANDROID_API
+size_t get_camera_metadata_data_capacity(const camera_metadata_t *metadata);
+
+/**
+ * Copy a metadata structure to a memory buffer, compacting it along the
+ * way. That is, in the copied structure, entry_count == entry_capacity, and
+ * data_count == data_capacity.
+ *
+ * If dst_size > get_camera_metadata_compact_size(), the unused bytes are at the
+ * end of the buffer. If dst_size < get_camera_metadata_compact_size(), returns
+ * NULL. Otherwise returns a pointer to the metadata structure header placed at
+ * the start of dst.
+ *
+ * Since the buffer was not allocated by allocate_camera_metadata, the caller is
+ * responsible for freeing the underlying buffer when needed; do not call
+ * free_camera_metadata.
+ */
+ANDROID_API
+camera_metadata_t *copy_camera_metadata(void *dst, size_t dst_size,
+ const camera_metadata_t *src);
+
+
+// Non-zero return values for validate_camera_metadata_structure
+enum {
+ CAMERA_METADATA_VALIDATION_ERROR = 1,
+ CAMERA_METADATA_VALIDATION_SHIFTED = 2,
+};
+
+/**
+ * Validate that a metadata is structurally sane. That is, its internal
+ * state is such that we won't get buffer overflows or run into other
+ * 'impossible' issues when calling the other API functions.
+ *
+ * This is useful in particular after copying the binary metadata blob
+ * from an untrusted source, since passing this check means the data is at least
+ * consistent.
+ *
+ * The expected_size argument is optional.
+ *
+ * Returns 0: on success
+ * CAMERA_METADATA_VALIDATION_ERROR: on error
+ * CAMERA_METADATA_VALIDATION_SHIFTED: when the data is not properly aligned, but can be
+ * used as input of clone_camera_metadata and the returned metadata will be valid.
+ *
+ */
+ANDROID_API
+int validate_camera_metadata_structure(const camera_metadata_t *metadata,
+ const size_t *expected_size);
+
+/**
+ * Append camera metadata in src to an existing metadata structure in dst. This
+ * does not resize the destination structure, so if it is too small, a non-zero
+ * value is returned. On success, 0 is returned. Appending onto a sorted
+ * structure results in a non-sorted combined structure.
+ */
+ANDROID_API
+int append_camera_metadata(camera_metadata_t *dst, const camera_metadata_t *src);
+
+/**
+ * Clone an existing metadata buffer, compacting along the way. This is
+ * equivalent to allocating a new buffer of the minimum needed size, then
+ * appending the buffer to be cloned into the new buffer. The resulting buffer
+ * can be freed with free_camera_metadata(). Returns NULL if cloning failed.
+ */
+ANDROID_API
+camera_metadata_t *clone_camera_metadata(const camera_metadata_t *src);
+
+/**
+ * Calculate the number of bytes of extra data a given metadata entry will take
+ * up. That is, if entry of 'type' with a payload of 'data_count' values is
+ * added, how much will the value returned by get_camera_metadata_data_count()
+ * be increased? This value may be zero, if no extra data storage is needed.
+ */
+ANDROID_API
+size_t calculate_camera_metadata_entry_data_size(uint8_t type,
+ size_t data_count);
+
+/**
+ * Add a metadata entry to a metadata structure. Returns 0 if the addition
+ * succeeded. Returns a non-zero value if there is insufficient reserved space
+ * left to add the entry, or if the tag is unknown. data_count is the number of
+ * entries in the data array of the tag's type, not a count of
+ * bytes. Vendor-defined tags can not be added using this method, unless
+ * set_vendor_tag_query_ops() has been called first. Entries are always added to
+ * the end of the structure (highest index), so after addition, a
+ * previously-sorted array will be marked as unsorted.
+ *
+ * Returns 0 on success. A non-0 value is returned on error.
+ */
+ANDROID_API
+int add_camera_metadata_entry(camera_metadata_t *dst,
+ uint32_t tag,
+ const void *data,
+ size_t data_count);
+
+/**
+ * Sort the metadata buffer for fast searching. If already marked as sorted,
+ * does nothing. Adding or appending entries to the buffer will place the buffer
+ * back into an unsorted state.
+ *
+ * Returns 0 on success. A non-0 value is returned on error.
+ */
+ANDROID_API
+int sort_camera_metadata(camera_metadata_t *dst);
+
+/**
+ * Get metadata entry at position index in the metadata buffer.
+ * Index must be less than entry count, which is returned by
+ * get_camera_metadata_entry_count().
+ *
+ * src and index are inputs; the passed-in entry is updated with the details of
+ * the entry. The data pointer points to the real data in the buffer, and can be
+ * updated as long as the data count does not change.
+ *
+ * Returns 0 on success. A non-0 value is returned on error.
+ */
+ANDROID_API
+int get_camera_metadata_entry(camera_metadata_t *src,
+ size_t index,
+ camera_metadata_entry_t *entry);
+
+/**
+ * Get metadata entry at position index, but disallow editing the data.
+ */
+ANDROID_API
+int get_camera_metadata_ro_entry(const camera_metadata_t *src,
+ size_t index,
+ camera_metadata_ro_entry_t *entry);
+
+/**
+ * Find an entry with given tag value. If not found, returns -ENOENT. Otherwise,
+ * returns entry contents like get_camera_metadata_entry.
+ *
+ * If multiple entries with the same tag exist, does not have any guarantees on
+ * which is returned. To speed up searching for tags, sort the metadata
+ * structure first by calling sort_camera_metadata().
+ */
+ANDROID_API
+int find_camera_metadata_entry(camera_metadata_t *src,
+ uint32_t tag,
+ camera_metadata_entry_t *entry);
+
+/**
+ * Find an entry with given tag value, but disallow editing the data
+ */
+ANDROID_API
+int find_camera_metadata_ro_entry(const camera_metadata_t *src,
+ uint32_t tag,
+ camera_metadata_ro_entry_t *entry);
+
+/**
+ * Delete an entry at given index. This is an expensive operation, since it
+ * requires repacking entries and possibly entry data. This also invalidates any
+ * existing camera_metadata_entry.data pointers to this buffer. Sorting is
+ * maintained.
+ */
+ANDROID_API
+int delete_camera_metadata_entry(camera_metadata_t *dst,
+ size_t index);
+
+/**
+ * Updates a metadata entry with new data. If the data size is changing, may
+ * need to adjust the data array, making this an O(N) operation. If the data
+ * size is the same or still fits in the entry space, this is O(1). Maintains
+ * sorting, but invalidates camera_metadata_entry instances that point to the
+ * updated entry. If a non-NULL value is passed in to entry, the entry structure
+ * is updated to match the new buffer state. Returns a non-zero value if there
+ * is no room for the new data in the buffer.
+ */
+ANDROID_API
+int update_camera_metadata_entry(camera_metadata_t *dst,
+ size_t index,
+ const void *data,
+ size_t data_count,
+ camera_metadata_entry_t *updated_entry);
+
+/**
+ * Retrieve human-readable name of section the tag is in. Returns NULL if
+ * no such tag is defined. Returns NULL for tags in the vendor section, unless
+ * set_vendor_tag_query_ops() has been used.
+ */
+ANDROID_API
+const char *get_camera_metadata_section_name(uint32_t tag);
+
+/**
+ * Retrieve human-readable name of tag (not including section). Returns NULL if
+ * no such tag is defined. Returns NULL for tags in the vendor section, unless
+ * set_vendor_tag_query_ops() has been used.
+ */
+ANDROID_API
+const char *get_camera_metadata_tag_name(uint32_t tag);
+
+/**
+ * Retrieve the type of a tag. Returns -1 if no such tag is defined. Returns -1
+ * for tags in the vendor section, unless set_vendor_tag_query_ops() has been
+ * used.
+ */
+ANDROID_API
+int get_camera_metadata_tag_type(uint32_t tag);
+
+/**
+ * Retrieve human-readable name of section the tag is in. Returns NULL if
+ * no such tag is defined.
+ */
+ANDROID_API
+const char *get_local_camera_metadata_section_name(uint32_t tag,
+ const camera_metadata_t *meta);
+
+/**
+ * Retrieve human-readable name of tag (not including section). Returns NULL if
+ * no such tag is defined.
+ */
+ANDROID_API
+const char *get_local_camera_metadata_tag_name(uint32_t tag,
+ const camera_metadata_t *meta);
+
+/**
+ * Retrieve the type of a tag. Returns -1 if no such tag is defined.
+ */
+ANDROID_API
+int get_local_camera_metadata_tag_type(uint32_t tag,
+ const camera_metadata_t *meta);
+
+/**
+ * Set up vendor-specific tag query methods. These are needed to properly add
+ * entries with vendor-specified tags and to use the
+ * get_camera_metadata_section_name, _tag_name, and _tag_type methods with
+ * vendor tags. Returns 0 on success.
+ *
+ * **DEPRECATED** - Please use vendor_tag_ops defined in camera_vendor_tags.h
+ * instead.
+ */
+typedef struct vendor_tag_query_ops vendor_tag_query_ops_t;
+struct vendor_tag_query_ops {
+ /**
+ * Get vendor section name for a vendor-specified entry tag. Only called for
+ * tags >= 0x80000000. The section name must start with the name of the
+ * vendor in the Java package style. For example, CameraZoom inc must prefix
+ * their sections with "com.camerazoom." Must return NULL if the tag is
+ * outside the bounds of vendor-defined sections.
+ */
+ const char *(*get_camera_vendor_section_name)(
+ const vendor_tag_query_ops_t *v,
+ uint32_t tag);
+ /**
+ * Get tag name for a vendor-specified entry tag. Only called for tags >=
+ * 0x80000000. Must return NULL if the tag is outside the bounds of
+ * vendor-defined sections.
+ */
+ const char *(*get_camera_vendor_tag_name)(
+ const vendor_tag_query_ops_t *v,
+ uint32_t tag);
+ /**
+ * Get tag type for a vendor-specified entry tag. Only called for tags >=
+ * 0x80000000. Must return -1 if the tag is outside the bounds of
+ * vendor-defined sections.
+ */
+ int (*get_camera_vendor_tag_type)(
+ const vendor_tag_query_ops_t *v,
+ uint32_t tag);
+ /**
+ * Get the number of vendor tags supported on this platform. Used to
+ * calculate the size of buffer needed for holding the array of all tags
+ * returned by get_camera_vendor_tags().
+ */
+ int (*get_camera_vendor_tag_count)(
+ const vendor_tag_query_ops_t *v);
+ /**
+ * Fill an array with all the supported vendor tags on this platform.
+ * get_camera_vendor_tag_count() returns the number of tags supported, and
+ * tag_array should be allocated with enough space to hold all of the tags.
+ */
+ void (*get_camera_vendor_tags)(
+ const vendor_tag_query_ops_t *v,
+ uint32_t *tag_array);
+};
+
+/**
+ * **DEPRECATED** - This should only be used by the camera framework. Camera
+ * metadata will transition to using vendor_tag_ops defined in
+ * camera_vendor_tags.h instead.
+ */
+ANDROID_API
+int set_camera_metadata_vendor_tag_ops(const vendor_tag_query_ops_t *query_ops);
+
+/**
+ * Print fields in the metadata to the log.
+ * verbosity = 0: Only tag entry information
+ * verbosity = 1: Tag entry information plus at most 16 data values
+ * verbosity = 2: All information
+ */
+ANDROID_API
+void dump_camera_metadata(const camera_metadata_t *metadata,
+ int fd,
+ int verbosity);
+
+/**
+ * Print fields in the metadata to the log; adds indentation parameter, which
+ * specifies the number of spaces to insert before each line of the dump
+ */
+ANDROID_API
+void dump_indented_camera_metadata(const camera_metadata_t *metadata,
+ int fd,
+ int verbosity,
+ int indentation);
+
+/**
+ * Prints the specified tag value as a string. Only works for enum tags.
+ * Returns 0 on success, -1 on failure.
+ */
+ANDROID_API
+int camera_metadata_enum_snprint(uint32_t tag,
+ uint32_t value,
+ char *dst,
+ size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/android/metadata/system/camera_metadata_tags.h b/include/android/metadata/system/camera_metadata_tags.h
new file mode 100644
index 00000000..adf18b8f
--- /dev/null
+++ b/include/android/metadata/system/camera_metadata_tags.h
@@ -0,0 +1,1005 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * !! Do not include this file directly !!
+ *
+ * Include camera_metadata.h instead.
+ */
+
+/**
+ * ! Do not edit this file directly !
+ *
+ * Generated automatically from camera_metadata_tags.mako
+ */
+
+/** TODO: Nearly every enum in this file needs a description */
+
+/**
+ * Top level hierarchy definitions for camera metadata. *_INFO sections are for
+ * the static metadata that can be retrived without opening the camera device.
+ * New sections must be added right before ANDROID_SECTION_COUNT to maintain
+ * existing enumerations.
+ */
+typedef enum camera_metadata_section {
+ ANDROID_COLOR_CORRECTION,
+ ANDROID_CONTROL,
+ ANDROID_DEMOSAIC,
+ ANDROID_EDGE,
+ ANDROID_FLASH,
+ ANDROID_FLASH_INFO,
+ ANDROID_HOT_PIXEL,
+ ANDROID_JPEG,
+ ANDROID_LENS,
+ ANDROID_LENS_INFO,
+ ANDROID_NOISE_REDUCTION,
+ ANDROID_QUIRKS,
+ ANDROID_REQUEST,
+ ANDROID_SCALER,
+ ANDROID_SENSOR,
+ ANDROID_SENSOR_INFO,
+ ANDROID_SHADING,
+ ANDROID_STATISTICS,
+ ANDROID_STATISTICS_INFO,
+ ANDROID_TONEMAP,
+ ANDROID_LED,
+ ANDROID_INFO,
+ ANDROID_BLACK_LEVEL,
+ ANDROID_SYNC,
+ ANDROID_REPROCESS,
+ ANDROID_DEPTH,
+ ANDROID_LOGICAL_MULTI_CAMERA,
+ ANDROID_DISTORTION_CORRECTION,
+ ANDROID_SECTION_COUNT,
+
+ VENDOR_SECTION = 0x8000
+} camera_metadata_section_t;
+
+/**
+ * Hierarchy positions in enum space. All vendor extension tags must be
+ * defined with tag >= VENDOR_SECTION_START
+ */
+typedef enum camera_metadata_section_start {
+ ANDROID_COLOR_CORRECTION_START = ANDROID_COLOR_CORRECTION << 16,
+ ANDROID_CONTROL_START = ANDROID_CONTROL << 16,
+ ANDROID_DEMOSAIC_START = ANDROID_DEMOSAIC << 16,
+ ANDROID_EDGE_START = ANDROID_EDGE << 16,
+ ANDROID_FLASH_START = ANDROID_FLASH << 16,
+ ANDROID_FLASH_INFO_START = ANDROID_FLASH_INFO << 16,
+ ANDROID_HOT_PIXEL_START = ANDROID_HOT_PIXEL << 16,
+ ANDROID_JPEG_START = ANDROID_JPEG << 16,
+ ANDROID_LENS_START = ANDROID_LENS << 16,
+ ANDROID_LENS_INFO_START = ANDROID_LENS_INFO << 16,
+ ANDROID_NOISE_REDUCTION_START = ANDROID_NOISE_REDUCTION << 16,
+ ANDROID_QUIRKS_START = ANDROID_QUIRKS << 16,
+ ANDROID_REQUEST_START = ANDROID_REQUEST << 16,
+ ANDROID_SCALER_START = ANDROID_SCALER << 16,
+ ANDROID_SENSOR_START = ANDROID_SENSOR << 16,
+ ANDROID_SENSOR_INFO_START = ANDROID_SENSOR_INFO << 16,
+ ANDROID_SHADING_START = ANDROID_SHADING << 16,
+ ANDROID_STATISTICS_START = ANDROID_STATISTICS << 16,
+ ANDROID_STATISTICS_INFO_START = ANDROID_STATISTICS_INFO << 16,
+ ANDROID_TONEMAP_START = ANDROID_TONEMAP << 16,
+ ANDROID_LED_START = ANDROID_LED << 16,
+ ANDROID_INFO_START = ANDROID_INFO << 16,
+ ANDROID_BLACK_LEVEL_START = ANDROID_BLACK_LEVEL << 16,
+ ANDROID_SYNC_START = ANDROID_SYNC << 16,
+ ANDROID_REPROCESS_START = ANDROID_REPROCESS << 16,
+ ANDROID_DEPTH_START = ANDROID_DEPTH << 16,
+ ANDROID_LOGICAL_MULTI_CAMERA_START
+ = ANDROID_LOGICAL_MULTI_CAMERA
+ << 16,
+ ANDROID_DISTORTION_CORRECTION_START
+ = ANDROID_DISTORTION_CORRECTION
+ << 16,
+ VENDOR_SECTION_START = VENDOR_SECTION << 16
+} camera_metadata_section_start_t;
+
+/**
+ * Main enum for defining camera metadata tags. New entries must always go
+ * before the section _END tag to preserve existing enumeration values. In
+ * addition, the name and type of the tag needs to be added to
+ * system/media/camera/src/camera_metadata_tag_info.c
+ */
+typedef enum camera_metadata_tag {
+ ANDROID_COLOR_CORRECTION_MODE = // enum | public | HIDL v3.2
+ ANDROID_COLOR_CORRECTION_START,
+ ANDROID_COLOR_CORRECTION_TRANSFORM, // rational[] | public | HIDL v3.2
+ ANDROID_COLOR_CORRECTION_GAINS, // float[] | public | HIDL v3.2
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE, // enum | public | HIDL v3.2
+ ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
+ // byte[] | public | HIDL v3.2
+ ANDROID_COLOR_CORRECTION_END,
+
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE = // enum | public | HIDL v3.2
+ ANDROID_CONTROL_START,
+ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION, // int32 | public | HIDL v3.2
+ ANDROID_CONTROL_AE_LOCK, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AE_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AE_REGIONS, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_TARGET_FPS_RANGE, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AF_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AF_REGIONS, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_AF_TRIGGER, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AWB_LOCK, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AWB_REGIONS, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_AVAILABLE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_COMPENSATION_RANGE, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_AE_COMPENSATION_STEP, // rational | public | HIDL v3.2
+ ANDROID_CONTROL_AF_AVAILABLE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AVAILABLE_EFFECTS, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AVAILABLE_SCENE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
+ // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_AWB_AVAILABLE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_MAX_REGIONS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_OVERRIDES, // byte[] | system | HIDL v3.2
+ ANDROID_CONTROL_AE_PRECAPTURE_ID, // int32 | system | HIDL v3.2
+ ANDROID_CONTROL_AE_STATE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AF_STATE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AF_TRIGGER_ID, // int32 | system | HIDL v3.2
+ ANDROID_CONTROL_AWB_STATE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS,
+ // int32[] | hidden | HIDL v3.2
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AVAILABLE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE, // int32[] | public | HIDL v3.2
+ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST, // int32 | public | HIDL v3.2
+ ANDROID_CONTROL_ENABLE_ZSL, // enum | public | HIDL v3.2
+ ANDROID_CONTROL_AF_SCENE_CHANGE, // enum | public | HIDL v3.3
+ ANDROID_CONTROL_END,
+
+ ANDROID_DEMOSAIC_MODE = // enum | system | HIDL v3.2
+ ANDROID_DEMOSAIC_START,
+ ANDROID_DEMOSAIC_END,
+
+ ANDROID_EDGE_MODE = // enum | public | HIDL v3.2
+ ANDROID_EDGE_START,
+ ANDROID_EDGE_STRENGTH, // byte | system | HIDL v3.2
+ ANDROID_EDGE_AVAILABLE_EDGE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_EDGE_END,
+
+ ANDROID_FLASH_FIRING_POWER = // byte | system | HIDL v3.2
+ ANDROID_FLASH_START,
+ ANDROID_FLASH_FIRING_TIME, // int64 | system | HIDL v3.2
+ ANDROID_FLASH_MODE, // enum | public | HIDL v3.2
+ ANDROID_FLASH_COLOR_TEMPERATURE, // byte | system | HIDL v3.2
+ ANDROID_FLASH_MAX_ENERGY, // byte | system | HIDL v3.2
+ ANDROID_FLASH_STATE, // enum | public | HIDL v3.2
+ ANDROID_FLASH_END,
+
+ ANDROID_FLASH_INFO_AVAILABLE = // enum | public | HIDL v3.2
+ ANDROID_FLASH_INFO_START,
+ ANDROID_FLASH_INFO_CHARGE_DURATION, // int64 | system | HIDL v3.2
+ ANDROID_FLASH_INFO_END,
+
+ ANDROID_HOT_PIXEL_MODE = // enum | public | HIDL v3.2
+ ANDROID_HOT_PIXEL_START,
+ ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_HOT_PIXEL_END,
+
+ ANDROID_JPEG_GPS_COORDINATES = // double[] | ndk_public | HIDL v3.2
+ ANDROID_JPEG_START,
+ ANDROID_JPEG_GPS_PROCESSING_METHOD, // byte | ndk_public | HIDL v3.2
+ ANDROID_JPEG_GPS_TIMESTAMP, // int64 | ndk_public | HIDL v3.2
+ ANDROID_JPEG_ORIENTATION, // int32 | public | HIDL v3.2
+ ANDROID_JPEG_QUALITY, // byte | public | HIDL v3.2
+ ANDROID_JPEG_THUMBNAIL_QUALITY, // byte | public | HIDL v3.2
+ ANDROID_JPEG_THUMBNAIL_SIZE, // int32[] | public | HIDL v3.2
+ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES, // int32[] | public | HIDL v3.2
+ ANDROID_JPEG_MAX_SIZE, // int32 | system | HIDL v3.2
+ ANDROID_JPEG_SIZE, // int32 | system | HIDL v3.2
+ ANDROID_JPEG_END,
+
+ ANDROID_LENS_APERTURE = // float | public | HIDL v3.2
+ ANDROID_LENS_START,
+ ANDROID_LENS_FILTER_DENSITY, // float | public | HIDL v3.2
+ ANDROID_LENS_FOCAL_LENGTH, // float | public | HIDL v3.2
+ ANDROID_LENS_FOCUS_DISTANCE, // float | public | HIDL v3.2
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE, // enum | public | HIDL v3.2
+ ANDROID_LENS_FACING, // enum | public | HIDL v3.2
+ ANDROID_LENS_POSE_ROTATION, // float[] | public | HIDL v3.2
+ ANDROID_LENS_POSE_TRANSLATION, // float[] | public | HIDL v3.2
+ ANDROID_LENS_FOCUS_RANGE, // float[] | public | HIDL v3.2
+ ANDROID_LENS_STATE, // enum | public | HIDL v3.2
+ ANDROID_LENS_INTRINSIC_CALIBRATION, // float[] | public | HIDL v3.2
+ ANDROID_LENS_RADIAL_DISTORTION, // float[] | public | HIDL v3.2
+ ANDROID_LENS_POSE_REFERENCE, // enum | public | HIDL v3.3
+ ANDROID_LENS_DISTORTION, // float[] | public | HIDL v3.3
+ ANDROID_LENS_END,
+
+ ANDROID_LENS_INFO_AVAILABLE_APERTURES = // float[] | public | HIDL v3.2
+ ANDROID_LENS_INFO_START,
+ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES, // float[] | public | HIDL v3.2
+ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS, // float[] | public | HIDL v3.2
+ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,// byte[] | public | HIDL v3.2
+ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE, // float | public | HIDL v3.2
+ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE, // float | public | HIDL v3.2
+ ANDROID_LENS_INFO_SHADING_MAP_SIZE, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION, // enum | public | HIDL v3.2
+ ANDROID_LENS_INFO_END,
+
+ ANDROID_NOISE_REDUCTION_MODE = // enum | public | HIDL v3.2
+ ANDROID_NOISE_REDUCTION_START,
+ ANDROID_NOISE_REDUCTION_STRENGTH, // byte | system | HIDL v3.2
+ ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES,
+ // byte[] | public | HIDL v3.2
+ ANDROID_NOISE_REDUCTION_END,
+
+ ANDROID_QUIRKS_METERING_CROP_REGION = // byte | system | HIDL v3.2
+ ANDROID_QUIRKS_START,
+ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO, // byte | system | HIDL v3.2
+ ANDROID_QUIRKS_USE_ZSL_FORMAT, // byte | system | HIDL v3.2
+ ANDROID_QUIRKS_USE_PARTIAL_RESULT, // byte | hidden | HIDL v3.2
+ ANDROID_QUIRKS_PARTIAL_RESULT, // enum | hidden | HIDL v3.2
+ ANDROID_QUIRKS_END,
+
+ ANDROID_REQUEST_FRAME_COUNT = // int32 | hidden | HIDL v3.2
+ ANDROID_REQUEST_START,
+ ANDROID_REQUEST_ID, // int32 | hidden | HIDL v3.2
+ ANDROID_REQUEST_INPUT_STREAMS, // int32[] | system | HIDL v3.2
+ ANDROID_REQUEST_METADATA_MODE, // enum | system | HIDL v3.2
+ ANDROID_REQUEST_OUTPUT_STREAMS, // int32[] | system | HIDL v3.2
+ ANDROID_REQUEST_TYPE, // enum | system | HIDL v3.2
+ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS, // int32[] | system | HIDL v3.2
+ ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS, // int32 | java_public | HIDL v3.2
+ ANDROID_REQUEST_PIPELINE_DEPTH, // byte | public | HIDL v3.2
+ ANDROID_REQUEST_PIPELINE_MAX_DEPTH, // byte | public | HIDL v3.2
+ ANDROID_REQUEST_PARTIAL_RESULT_COUNT, // int32 | public | HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES, // enum[] | public | HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_RESULT_KEYS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_SESSION_KEYS, // int32[] | ndk_public | HIDL v3.3
+ ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS,
+ // int32[] | hidden | HIDL v3.3
+ ANDROID_REQUEST_END,
+
+ ANDROID_SCALER_CROP_REGION = // int32[] | public | HIDL v3.2
+ ANDROID_SCALER_START,
+ ANDROID_SCALER_AVAILABLE_FORMATS, // enum[] | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS, // int64[] | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_JPEG_SIZES, // int32[] | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, // float | public | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS, // int64[] | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, // int32[] | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS, // int64[] | system | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_RAW_SIZES, // int32[] | system | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP,// int32 | hidden | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, // enum[] | ndk_public | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, // int64[] | ndk_public | HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_STALL_DURATIONS, // int64[] | ndk_public | HIDL v3.2
+ ANDROID_SCALER_CROPPING_TYPE, // enum | public | HIDL v3.2
+ ANDROID_SCALER_END,
+
+ ANDROID_SENSOR_EXPOSURE_TIME = // int64 | public | HIDL v3.2
+ ANDROID_SENSOR_START,
+ ANDROID_SENSOR_FRAME_DURATION, // int64 | public | HIDL v3.2
+ ANDROID_SENSOR_SENSITIVITY, // int32 | public | HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1, // enum | public | HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT2, // byte | public | HIDL v3.2
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM1, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM2, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_COLOR_TRANSFORM1, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_COLOR_TRANSFORM2, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_FORWARD_MATRIX1, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_FORWARD_MATRIX2, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_BASE_GAIN_FACTOR, // rational | system | HIDL v3.2
+ ANDROID_SENSOR_BLACK_LEVEL_PATTERN, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY, // int32 | public | HIDL v3.2
+ ANDROID_SENSOR_ORIENTATION, // int32 | public | HIDL v3.2
+ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS, // int32[] | system | HIDL v3.2
+ ANDROID_SENSOR_TIMESTAMP, // int64 | public | HIDL v3.2
+ ANDROID_SENSOR_TEMPERATURE, // float | system | HIDL v3.2
+ ANDROID_SENSOR_NEUTRAL_COLOR_POINT, // rational[] | public | HIDL v3.2
+ ANDROID_SENSOR_NOISE_PROFILE, // double[] | public | HIDL v3.2
+ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP, // float[] | system | HIDL v3.2
+ ANDROID_SENSOR_PROFILE_TONE_CURVE, // float[] | system | HIDL v3.2
+ ANDROID_SENSOR_GREEN_SPLIT, // float | public | HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_DATA, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE, // enum | public | HIDL v3.2
+ ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_ROLLING_SHUTTER_SKEW, // int64 | public | HIDL v3.2
+ ANDROID_SENSOR_OPTICAL_BLACK_REGIONS, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL, // float[] | public | HIDL v3.2
+ ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL, // int32 | public | HIDL v3.2
+ ANDROID_SENSOR_OPAQUE_RAW_SIZE, // int32[] | system | HIDL v3.2
+ ANDROID_SENSOR_END,
+
+ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_START,
+ ANDROID_SENSOR_INFO_SENSITIVITY_RANGE, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, // enum | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, // int64[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION, // int64 | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_PHYSICAL_SIZE, // float[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_WHITE_LEVEL, // int32 | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE, // enum | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED, // enum | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
+ // int32[] | public | HIDL v3.2
+ ANDROID_SENSOR_INFO_END,
+
+ ANDROID_SHADING_MODE = // enum | public | HIDL v3.2
+ ANDROID_SHADING_START,
+ ANDROID_SHADING_STRENGTH, // byte | system | HIDL v3.2
+ ANDROID_SHADING_AVAILABLE_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_SHADING_END,
+
+ ANDROID_STATISTICS_FACE_DETECT_MODE = // enum | public | HIDL v3.2
+ ANDROID_STATISTICS_START,
+ ANDROID_STATISTICS_HISTOGRAM_MODE, // enum | system | HIDL v3.2
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE, // enum | system | HIDL v3.2
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE, // enum | public | HIDL v3.2
+ ANDROID_STATISTICS_FACE_IDS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_STATISTICS_FACE_LANDMARKS, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_STATISTICS_FACE_RECTANGLES, // int32[] | ndk_public | HIDL v3.2
+ ANDROID_STATISTICS_FACE_SCORES, // byte[] | ndk_public | HIDL v3.2
+ ANDROID_STATISTICS_HISTOGRAM, // int32[] | system | HIDL v3.2
+ ANDROID_STATISTICS_SHARPNESS_MAP, // int32[] | system | HIDL v3.2
+ ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP, // byte | java_public | HIDL v3.2
+ ANDROID_STATISTICS_LENS_SHADING_MAP, // float[] | ndk_public | HIDL v3.2
+ ANDROID_STATISTICS_PREDICTED_COLOR_GAINS, // float[] | hidden | HIDL v3.2
+ ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM, // rational[] | hidden | HIDL v3.2
+ ANDROID_STATISTICS_SCENE_FLICKER, // enum | public | HIDL v3.2
+ ANDROID_STATISTICS_HOT_PIXEL_MAP, // int32[] | public | HIDL v3.2
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, // enum | public | HIDL v3.2
+ ANDROID_STATISTICS_OIS_DATA_MODE, // enum | public | HIDL v3.3
+ ANDROID_STATISTICS_OIS_TIMESTAMPS, // int64[] | ndk_public | HIDL v3.3
+ ANDROID_STATISTICS_OIS_X_SHIFTS, // float[] | ndk_public | HIDL v3.3
+ ANDROID_STATISTICS_OIS_Y_SHIFTS, // float[] | ndk_public | HIDL v3.3
+ ANDROID_STATISTICS_END,
+
+ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
+ // byte[] | public | HIDL v3.2
+ ANDROID_STATISTICS_INFO_START,
+ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT, // int32 | system | HIDL v3.2
+ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT, // int32 | public | HIDL v3.2
+ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT, // int32 | system | HIDL v3.2
+ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE, // int32 | system | HIDL v3.2
+ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE, // int32[] | system | HIDL v3.2
+ ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES,
+ // byte[] | public | HIDL v3.2
+ ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES,
+ // byte[] | public | HIDL v3.2
+ ANDROID_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES, // byte[] | public | HIDL v3.3
+ ANDROID_STATISTICS_INFO_END,
+
+ ANDROID_TONEMAP_CURVE_BLUE = // float[] | ndk_public | HIDL v3.2
+ ANDROID_TONEMAP_START,
+ ANDROID_TONEMAP_CURVE_GREEN, // float[] | ndk_public | HIDL v3.2
+ ANDROID_TONEMAP_CURVE_RED, // float[] | ndk_public | HIDL v3.2
+ ANDROID_TONEMAP_MODE, // enum | public | HIDL v3.2
+ ANDROID_TONEMAP_MAX_CURVE_POINTS, // int32 | public | HIDL v3.2
+ ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES, // byte[] | public | HIDL v3.2
+ ANDROID_TONEMAP_GAMMA, // float | public | HIDL v3.2
+ ANDROID_TONEMAP_PRESET_CURVE, // enum | public | HIDL v3.2
+ ANDROID_TONEMAP_END,
+
+ ANDROID_LED_TRANSMIT = // enum | hidden | HIDL v3.2
+ ANDROID_LED_START,
+ ANDROID_LED_AVAILABLE_LEDS, // enum[] | hidden | HIDL v3.2
+ ANDROID_LED_END,
+
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL = // enum | public | HIDL v3.2
+ ANDROID_INFO_START,
+ ANDROID_INFO_VERSION, // byte | public | HIDL v3.3
+ ANDROID_INFO_END,
+
+ ANDROID_BLACK_LEVEL_LOCK = // enum | public | HIDL v3.2
+ ANDROID_BLACK_LEVEL_START,
+ ANDROID_BLACK_LEVEL_END,
+
+ ANDROID_SYNC_FRAME_NUMBER = // enum | ndk_public | HIDL v3.2
+ ANDROID_SYNC_START,
+ ANDROID_SYNC_MAX_LATENCY, // enum | public | HIDL v3.2
+ ANDROID_SYNC_END,
+
+ ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = // float | java_public | HIDL v3.2
+ ANDROID_REPROCESS_START,
+ ANDROID_REPROCESS_MAX_CAPTURE_STALL, // int32 | java_public | HIDL v3.2
+ ANDROID_REPROCESS_END,
+
+ ANDROID_DEPTH_MAX_DEPTH_SAMPLES = // int32 | system | HIDL v3.2
+ ANDROID_DEPTH_START,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS,
+ // enum[] | ndk_public | HIDL v3.2
+ ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS,// int64[] | ndk_public | HIDL v3.2
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS, // int64[] | ndk_public | HIDL v3.2
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE, // enum | public | HIDL v3.2
+ ANDROID_DEPTH_END,
+
+ ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = // byte[] | hidden | HIDL v3.3
+ ANDROID_LOGICAL_MULTI_CAMERA_START,
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE, // enum | public | HIDL v3.3
+ ANDROID_LOGICAL_MULTI_CAMERA_END,
+
+ ANDROID_DISTORTION_CORRECTION_MODE = // enum | public | HIDL v3.3
+ ANDROID_DISTORTION_CORRECTION_START,
+ ANDROID_DISTORTION_CORRECTION_AVAILABLE_MODES, // byte[] | public | HIDL v3.3
+ ANDROID_DISTORTION_CORRECTION_END,
+
+} camera_metadata_tag_t;
+
+/**
+ * Enumeration definitions for the various entries that need them
+ */
+
+// ANDROID_COLOR_CORRECTION_MODE
+typedef enum camera_metadata_enum_android_color_correction_mode {
+ ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX , // HIDL v3.2
+ ANDROID_COLOR_CORRECTION_MODE_FAST , // HIDL v3.2
+ ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY , // HIDL v3.2
+} camera_metadata_enum_android_color_correction_mode_t;
+
+// ANDROID_COLOR_CORRECTION_ABERRATION_MODE
+typedef enum camera_metadata_enum_android_color_correction_aberration_mode {
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF , // HIDL v3.2
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST , // HIDL v3.2
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY , // HIDL v3.2
+} camera_metadata_enum_android_color_correction_aberration_mode_t;
+
+
+// ANDROID_CONTROL_AE_ANTIBANDING_MODE
+typedef enum camera_metadata_enum_android_control_ae_antibanding_mode {
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ , // HIDL v3.2
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ , // HIDL v3.2
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO , // HIDL v3.2
+} camera_metadata_enum_android_control_ae_antibanding_mode_t;
+
+// ANDROID_CONTROL_AE_LOCK
+typedef enum camera_metadata_enum_android_control_ae_lock {
+ ANDROID_CONTROL_AE_LOCK_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AE_LOCK_ON , // HIDL v3.2
+} camera_metadata_enum_android_control_ae_lock_t;
+
+// ANDROID_CONTROL_AE_MODE
+typedef enum camera_metadata_enum_android_control_ae_mode {
+ ANDROID_CONTROL_AE_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AE_MODE_ON , // HIDL v3.2
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH , // HIDL v3.2
+ ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH , // HIDL v3.2
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE , // HIDL v3.2
+ ANDROID_CONTROL_AE_MODE_ON_EXTERNAL_FLASH , // HIDL v3.3
+} camera_metadata_enum_android_control_ae_mode_t;
+
+// ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER
+typedef enum camera_metadata_enum_android_control_ae_precapture_trigger {
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE , // HIDL v3.2
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START , // HIDL v3.2
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL , // HIDL v3.2
+} camera_metadata_enum_android_control_ae_precapture_trigger_t;
+
+// ANDROID_CONTROL_AF_MODE
+typedef enum camera_metadata_enum_android_control_af_mode {
+ ANDROID_CONTROL_AF_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AF_MODE_AUTO , // HIDL v3.2
+ ANDROID_CONTROL_AF_MODE_MACRO , // HIDL v3.2
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO , // HIDL v3.2
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE , // HIDL v3.2
+ ANDROID_CONTROL_AF_MODE_EDOF , // HIDL v3.2
+} camera_metadata_enum_android_control_af_mode_t;
+
+// ANDROID_CONTROL_AF_TRIGGER
+typedef enum camera_metadata_enum_android_control_af_trigger {
+ ANDROID_CONTROL_AF_TRIGGER_IDLE , // HIDL v3.2
+ ANDROID_CONTROL_AF_TRIGGER_START , // HIDL v3.2
+ ANDROID_CONTROL_AF_TRIGGER_CANCEL , // HIDL v3.2
+} camera_metadata_enum_android_control_af_trigger_t;
+
+// ANDROID_CONTROL_AWB_LOCK
+typedef enum camera_metadata_enum_android_control_awb_lock {
+ ANDROID_CONTROL_AWB_LOCK_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AWB_LOCK_ON , // HIDL v3.2
+} camera_metadata_enum_android_control_awb_lock_t;
+
+// ANDROID_CONTROL_AWB_MODE
+typedef enum camera_metadata_enum_android_control_awb_mode {
+ ANDROID_CONTROL_AWB_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_AUTO , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_INCANDESCENT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_FLUORESCENT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_DAYLIGHT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_TWILIGHT , // HIDL v3.2
+ ANDROID_CONTROL_AWB_MODE_SHADE , // HIDL v3.2
+} camera_metadata_enum_android_control_awb_mode_t;
+
+// ANDROID_CONTROL_CAPTURE_INTENT
+typedef enum camera_metadata_enum_android_control_capture_intent {
+ ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_MANUAL , // HIDL v3.2
+ ANDROID_CONTROL_CAPTURE_INTENT_MOTION_TRACKING , // HIDL v3.3
+} camera_metadata_enum_android_control_capture_intent_t;
+
+// ANDROID_CONTROL_EFFECT_MODE
+typedef enum camera_metadata_enum_android_control_effect_mode {
+ ANDROID_CONTROL_EFFECT_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_MONO , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_NEGATIVE , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_SOLARIZE , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_SEPIA , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_POSTERIZE , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD , // HIDL v3.2
+ ANDROID_CONTROL_EFFECT_MODE_AQUA , // HIDL v3.2
+} camera_metadata_enum_android_control_effect_mode_t;
+
+// ANDROID_CONTROL_MODE
+typedef enum camera_metadata_enum_android_control_mode {
+ ANDROID_CONTROL_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_MODE_AUTO , // HIDL v3.2
+ ANDROID_CONTROL_MODE_USE_SCENE_MODE , // HIDL v3.2
+ ANDROID_CONTROL_MODE_OFF_KEEP_STATE , // HIDL v3.2
+} camera_metadata_enum_android_control_mode_t;
+
+// ANDROID_CONTROL_SCENE_MODE
+typedef enum camera_metadata_enum_android_control_scene_mode {
+ ANDROID_CONTROL_SCENE_MODE_DISABLED = 0, // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_ACTION , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_PORTRAIT , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_LANDSCAPE , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_NIGHT , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_THEATRE , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_BEACH , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_SNOW , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_SUNSET , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_FIREWORKS , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_SPORTS , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_PARTY , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_BARCODE , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_HDR , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT , // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100, // HIDL v3.2
+ ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127, // HIDL v3.2
+} camera_metadata_enum_android_control_scene_mode_t;
+
+// ANDROID_CONTROL_VIDEO_STABILIZATION_MODE
+typedef enum camera_metadata_enum_android_control_video_stabilization_mode {
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF , // HIDL v3.2
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_control_video_stabilization_mode_t;
+
+// ANDROID_CONTROL_AE_STATE
+typedef enum camera_metadata_enum_android_control_ae_state {
+ ANDROID_CONTROL_AE_STATE_INACTIVE , // HIDL v3.2
+ ANDROID_CONTROL_AE_STATE_SEARCHING , // HIDL v3.2
+ ANDROID_CONTROL_AE_STATE_CONVERGED , // HIDL v3.2
+ ANDROID_CONTROL_AE_STATE_LOCKED , // HIDL v3.2
+ ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED , // HIDL v3.2
+ ANDROID_CONTROL_AE_STATE_PRECAPTURE , // HIDL v3.2
+} camera_metadata_enum_android_control_ae_state_t;
+
+// ANDROID_CONTROL_AF_STATE
+typedef enum camera_metadata_enum_android_control_af_state {
+ ANDROID_CONTROL_AF_STATE_INACTIVE , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED , // HIDL v3.2
+ ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED , // HIDL v3.2
+} camera_metadata_enum_android_control_af_state_t;
+
+// ANDROID_CONTROL_AWB_STATE
+typedef enum camera_metadata_enum_android_control_awb_state {
+ ANDROID_CONTROL_AWB_STATE_INACTIVE , // HIDL v3.2
+ ANDROID_CONTROL_AWB_STATE_SEARCHING , // HIDL v3.2
+ ANDROID_CONTROL_AWB_STATE_CONVERGED , // HIDL v3.2
+ ANDROID_CONTROL_AWB_STATE_LOCKED , // HIDL v3.2
+} camera_metadata_enum_android_control_awb_state_t;
+
+// ANDROID_CONTROL_AE_LOCK_AVAILABLE
+typedef enum camera_metadata_enum_android_control_ae_lock_available {
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE , // HIDL v3.2
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_control_ae_lock_available_t;
+
+// ANDROID_CONTROL_AWB_LOCK_AVAILABLE
+typedef enum camera_metadata_enum_android_control_awb_lock_available {
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE , // HIDL v3.2
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_control_awb_lock_available_t;
+
+// ANDROID_CONTROL_ENABLE_ZSL
+typedef enum camera_metadata_enum_android_control_enable_zsl {
+ ANDROID_CONTROL_ENABLE_ZSL_FALSE , // HIDL v3.2
+ ANDROID_CONTROL_ENABLE_ZSL_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_control_enable_zsl_t;
+
+// ANDROID_CONTROL_AF_SCENE_CHANGE
+typedef enum camera_metadata_enum_android_control_af_scene_change {
+ ANDROID_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED , // HIDL v3.3
+ ANDROID_CONTROL_AF_SCENE_CHANGE_DETECTED , // HIDL v3.3
+} camera_metadata_enum_android_control_af_scene_change_t;
+
+
+// ANDROID_DEMOSAIC_MODE
+typedef enum camera_metadata_enum_android_demosaic_mode {
+ ANDROID_DEMOSAIC_MODE_FAST , // HIDL v3.2
+ ANDROID_DEMOSAIC_MODE_HIGH_QUALITY , // HIDL v3.2
+} camera_metadata_enum_android_demosaic_mode_t;
+
+
+// ANDROID_EDGE_MODE
+typedef enum camera_metadata_enum_android_edge_mode {
+ ANDROID_EDGE_MODE_OFF , // HIDL v3.2
+ ANDROID_EDGE_MODE_FAST , // HIDL v3.2
+ ANDROID_EDGE_MODE_HIGH_QUALITY , // HIDL v3.2
+ ANDROID_EDGE_MODE_ZERO_SHUTTER_LAG , // HIDL v3.2
+} camera_metadata_enum_android_edge_mode_t;
+
+
+// ANDROID_FLASH_MODE
+typedef enum camera_metadata_enum_android_flash_mode {
+ ANDROID_FLASH_MODE_OFF , // HIDL v3.2
+ ANDROID_FLASH_MODE_SINGLE , // HIDL v3.2
+ ANDROID_FLASH_MODE_TORCH , // HIDL v3.2
+} camera_metadata_enum_android_flash_mode_t;
+
+// ANDROID_FLASH_STATE
+typedef enum camera_metadata_enum_android_flash_state {
+ ANDROID_FLASH_STATE_UNAVAILABLE , // HIDL v3.2
+ ANDROID_FLASH_STATE_CHARGING , // HIDL v3.2
+ ANDROID_FLASH_STATE_READY , // HIDL v3.2
+ ANDROID_FLASH_STATE_FIRED , // HIDL v3.2
+ ANDROID_FLASH_STATE_PARTIAL , // HIDL v3.2
+} camera_metadata_enum_android_flash_state_t;
+
+
+// ANDROID_FLASH_INFO_AVAILABLE
+typedef enum camera_metadata_enum_android_flash_info_available {
+ ANDROID_FLASH_INFO_AVAILABLE_FALSE , // HIDL v3.2
+ ANDROID_FLASH_INFO_AVAILABLE_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_flash_info_available_t;
+
+
+// ANDROID_HOT_PIXEL_MODE
+typedef enum camera_metadata_enum_android_hot_pixel_mode {
+ ANDROID_HOT_PIXEL_MODE_OFF , // HIDL v3.2
+ ANDROID_HOT_PIXEL_MODE_FAST , // HIDL v3.2
+ ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY , // HIDL v3.2
+} camera_metadata_enum_android_hot_pixel_mode_t;
+
+
+
+// ANDROID_LENS_OPTICAL_STABILIZATION_MODE
+typedef enum camera_metadata_enum_android_lens_optical_stabilization_mode {
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF , // HIDL v3.2
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_lens_optical_stabilization_mode_t;
+
+// ANDROID_LENS_FACING
+typedef enum camera_metadata_enum_android_lens_facing {
+ ANDROID_LENS_FACING_FRONT , // HIDL v3.2
+ ANDROID_LENS_FACING_BACK , // HIDL v3.2
+ ANDROID_LENS_FACING_EXTERNAL , // HIDL v3.2
+} camera_metadata_enum_android_lens_facing_t;
+
+// ANDROID_LENS_STATE
+typedef enum camera_metadata_enum_android_lens_state {
+ ANDROID_LENS_STATE_STATIONARY , // HIDL v3.2
+ ANDROID_LENS_STATE_MOVING , // HIDL v3.2
+} camera_metadata_enum_android_lens_state_t;
+
+// ANDROID_LENS_POSE_REFERENCE
+typedef enum camera_metadata_enum_android_lens_pose_reference {
+ ANDROID_LENS_POSE_REFERENCE_PRIMARY_CAMERA , // HIDL v3.3
+ ANDROID_LENS_POSE_REFERENCE_GYROSCOPE , // HIDL v3.3
+} camera_metadata_enum_android_lens_pose_reference_t;
+
+
+// ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
+typedef enum camera_metadata_enum_android_lens_info_focus_distance_calibration {
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED , // HIDL v3.2
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE , // HIDL v3.2
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED , // HIDL v3.2
+} camera_metadata_enum_android_lens_info_focus_distance_calibration_t;
+
+
+// ANDROID_NOISE_REDUCTION_MODE
+typedef enum camera_metadata_enum_android_noise_reduction_mode {
+ ANDROID_NOISE_REDUCTION_MODE_OFF , // HIDL v3.2
+ ANDROID_NOISE_REDUCTION_MODE_FAST , // HIDL v3.2
+ ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY , // HIDL v3.2
+ ANDROID_NOISE_REDUCTION_MODE_MINIMAL , // HIDL v3.2
+ ANDROID_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG , // HIDL v3.2
+} camera_metadata_enum_android_noise_reduction_mode_t;
+
+
+// ANDROID_QUIRKS_PARTIAL_RESULT
+typedef enum camera_metadata_enum_android_quirks_partial_result {
+ ANDROID_QUIRKS_PARTIAL_RESULT_FINAL , // HIDL v3.2
+ ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL , // HIDL v3.2
+} camera_metadata_enum_android_quirks_partial_result_t;
+
+
+// ANDROID_REQUEST_METADATA_MODE
+typedef enum camera_metadata_enum_android_request_metadata_mode {
+ ANDROID_REQUEST_METADATA_MODE_NONE , // HIDL v3.2
+ ANDROID_REQUEST_METADATA_MODE_FULL , // HIDL v3.2
+} camera_metadata_enum_android_request_metadata_mode_t;
+
+// ANDROID_REQUEST_TYPE
+typedef enum camera_metadata_enum_android_request_type {
+ ANDROID_REQUEST_TYPE_CAPTURE , // HIDL v3.2
+ ANDROID_REQUEST_TYPE_REPROCESS , // HIDL v3.2
+} camera_metadata_enum_android_request_type_t;
+
+// ANDROID_REQUEST_AVAILABLE_CAPABILITIES
+typedef enum camera_metadata_enum_android_request_available_capabilities {
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
+ , // HIDL v3.2
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING , // HIDL v3.3
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA , // HIDL v3.3
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME , // HIDL v3.3
+} camera_metadata_enum_android_request_available_capabilities_t;
+
+
+// ANDROID_SCALER_AVAILABLE_FORMATS
+typedef enum camera_metadata_enum_android_scaler_available_formats {
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW16 = 0x20, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE = 0x24, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 0x32315659, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP = 0x11, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED = 0x22, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888 = 0x23, // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_FORMATS_BLOB = 0x21, // HIDL v3.2
+} camera_metadata_enum_android_scaler_available_formats_t;
+
+// ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
+typedef enum camera_metadata_enum_android_scaler_available_stream_configurations {
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT , // HIDL v3.2
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT , // HIDL v3.2
+} camera_metadata_enum_android_scaler_available_stream_configurations_t;
+
+// ANDROID_SCALER_CROPPING_TYPE
+typedef enum camera_metadata_enum_android_scaler_cropping_type {
+ ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY , // HIDL v3.2
+ ANDROID_SCALER_CROPPING_TYPE_FREEFORM , // HIDL v3.2
+} camera_metadata_enum_android_scaler_cropping_type_t;
+
+
+// ANDROID_SENSOR_REFERENCE_ILLUMINANT1
+typedef enum camera_metadata_enum_android_sensor_reference_illuminant1 {
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55 = 20, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65 = 21, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75 = 22, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50 = 23, // HIDL v3.2
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24, // HIDL v3.2
+} camera_metadata_enum_android_sensor_reference_illuminant1_t;
+
+// ANDROID_SENSOR_TEST_PATTERN_MODE
+typedef enum camera_metadata_enum_android_sensor_test_pattern_mode {
+ ANDROID_SENSOR_TEST_PATTERN_MODE_OFF , // HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR , // HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS , // HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY , // HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE_PN9 , // HIDL v3.2
+ ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256, // HIDL v3.2
+} camera_metadata_enum_android_sensor_test_pattern_mode_t;
+
+
+// ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
+typedef enum camera_metadata_enum_android_sensor_info_color_filter_arrangement {
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB , // HIDL v3.2
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG , // HIDL v3.2
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG , // HIDL v3.2
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR , // HIDL v3.2
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB , // HIDL v3.2
+} camera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
+
+// ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE
+typedef enum camera_metadata_enum_android_sensor_info_timestamp_source {
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN , // HIDL v3.2
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME , // HIDL v3.2
+} camera_metadata_enum_android_sensor_info_timestamp_source_t;
+
+// ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED
+typedef enum camera_metadata_enum_android_sensor_info_lens_shading_applied {
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE , // HIDL v3.2
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_sensor_info_lens_shading_applied_t;
+
+
+// ANDROID_SHADING_MODE
+typedef enum camera_metadata_enum_android_shading_mode {
+ ANDROID_SHADING_MODE_OFF , // HIDL v3.2
+ ANDROID_SHADING_MODE_FAST , // HIDL v3.2
+ ANDROID_SHADING_MODE_HIGH_QUALITY , // HIDL v3.2
+} camera_metadata_enum_android_shading_mode_t;
+
+
+// ANDROID_STATISTICS_FACE_DETECT_MODE
+typedef enum camera_metadata_enum_android_statistics_face_detect_mode {
+ ANDROID_STATISTICS_FACE_DETECT_MODE_OFF , // HIDL v3.2
+ ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE , // HIDL v3.2
+ ANDROID_STATISTICS_FACE_DETECT_MODE_FULL , // HIDL v3.2
+} camera_metadata_enum_android_statistics_face_detect_mode_t;
+
+// ANDROID_STATISTICS_HISTOGRAM_MODE
+typedef enum camera_metadata_enum_android_statistics_histogram_mode {
+ ANDROID_STATISTICS_HISTOGRAM_MODE_OFF , // HIDL v3.2
+ ANDROID_STATISTICS_HISTOGRAM_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_statistics_histogram_mode_t;
+
+// ANDROID_STATISTICS_SHARPNESS_MAP_MODE
+typedef enum camera_metadata_enum_android_statistics_sharpness_map_mode {
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF , // HIDL v3.2
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_statistics_sharpness_map_mode_t;
+
+// ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE
+typedef enum camera_metadata_enum_android_statistics_hot_pixel_map_mode {
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF , // HIDL v3.2
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
+
+// ANDROID_STATISTICS_SCENE_FLICKER
+typedef enum camera_metadata_enum_android_statistics_scene_flicker {
+ ANDROID_STATISTICS_SCENE_FLICKER_NONE , // HIDL v3.2
+ ANDROID_STATISTICS_SCENE_FLICKER_50HZ , // HIDL v3.2
+ ANDROID_STATISTICS_SCENE_FLICKER_60HZ , // HIDL v3.2
+} camera_metadata_enum_android_statistics_scene_flicker_t;
+
+// ANDROID_STATISTICS_LENS_SHADING_MAP_MODE
+typedef enum camera_metadata_enum_android_statistics_lens_shading_map_mode {
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF , // HIDL v3.2
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON , // HIDL v3.2
+} camera_metadata_enum_android_statistics_lens_shading_map_mode_t;
+
+// ANDROID_STATISTICS_OIS_DATA_MODE
+typedef enum camera_metadata_enum_android_statistics_ois_data_mode {
+ ANDROID_STATISTICS_OIS_DATA_MODE_OFF , // HIDL v3.3
+ ANDROID_STATISTICS_OIS_DATA_MODE_ON , // HIDL v3.3
+} camera_metadata_enum_android_statistics_ois_data_mode_t;
+
+
+
+// ANDROID_TONEMAP_MODE
+typedef enum camera_metadata_enum_android_tonemap_mode {
+ ANDROID_TONEMAP_MODE_CONTRAST_CURVE , // HIDL v3.2
+ ANDROID_TONEMAP_MODE_FAST , // HIDL v3.2
+ ANDROID_TONEMAP_MODE_HIGH_QUALITY , // HIDL v3.2
+ ANDROID_TONEMAP_MODE_GAMMA_VALUE , // HIDL v3.2
+ ANDROID_TONEMAP_MODE_PRESET_CURVE , // HIDL v3.2
+} camera_metadata_enum_android_tonemap_mode_t;
+
+// ANDROID_TONEMAP_PRESET_CURVE
+typedef enum camera_metadata_enum_android_tonemap_preset_curve {
+ ANDROID_TONEMAP_PRESET_CURVE_SRGB , // HIDL v3.2
+ ANDROID_TONEMAP_PRESET_CURVE_REC709 , // HIDL v3.2
+} camera_metadata_enum_android_tonemap_preset_curve_t;
+
+
+// ANDROID_LED_TRANSMIT
+typedef enum camera_metadata_enum_android_led_transmit {
+ ANDROID_LED_TRANSMIT_OFF , // HIDL v3.2
+ ANDROID_LED_TRANSMIT_ON , // HIDL v3.2
+} camera_metadata_enum_android_led_transmit_t;
+
+// ANDROID_LED_AVAILABLE_LEDS
+typedef enum camera_metadata_enum_android_led_available_leds {
+ ANDROID_LED_AVAILABLE_LEDS_TRANSMIT , // HIDL v3.2
+} camera_metadata_enum_android_led_available_leds_t;
+
+
+// ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL
+typedef enum camera_metadata_enum_android_info_supported_hardware_level {
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED , // HIDL v3.2
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL , // HIDL v3.2
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY , // HIDL v3.2
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3 , // HIDL v3.2
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL , // HIDL v3.3
+} camera_metadata_enum_android_info_supported_hardware_level_t;
+
+
+// ANDROID_BLACK_LEVEL_LOCK
+typedef enum camera_metadata_enum_android_black_level_lock {
+ ANDROID_BLACK_LEVEL_LOCK_OFF , // HIDL v3.2
+ ANDROID_BLACK_LEVEL_LOCK_ON , // HIDL v3.2
+} camera_metadata_enum_android_black_level_lock_t;
+
+
+// ANDROID_SYNC_FRAME_NUMBER
+typedef enum camera_metadata_enum_android_sync_frame_number {
+ ANDROID_SYNC_FRAME_NUMBER_CONVERGING = -1, // HIDL v3.2
+ ANDROID_SYNC_FRAME_NUMBER_UNKNOWN = -2, // HIDL v3.2
+} camera_metadata_enum_android_sync_frame_number_t;
+
+// ANDROID_SYNC_MAX_LATENCY
+typedef enum camera_metadata_enum_android_sync_max_latency {
+ ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0, // HIDL v3.2
+ ANDROID_SYNC_MAX_LATENCY_UNKNOWN = -1, // HIDL v3.2
+} camera_metadata_enum_android_sync_max_latency_t;
+
+
+
+// ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
+typedef enum camera_metadata_enum_android_depth_available_depth_stream_configurations {
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT , // HIDL v3.2
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT , // HIDL v3.2
+} camera_metadata_enum_android_depth_available_depth_stream_configurations_t;
+
+// ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE
+typedef enum camera_metadata_enum_android_depth_depth_is_exclusive {
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE , // HIDL v3.2
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE , // HIDL v3.2
+} camera_metadata_enum_android_depth_depth_is_exclusive_t;
+
+
+// ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
+typedef enum camera_metadata_enum_android_logical_multi_camera_sensor_sync_type {
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE , // HIDL v3.3
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED , // HIDL v3.3
+} camera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t;
+
+
+// ANDROID_DISTORTION_CORRECTION_MODE
+typedef enum camera_metadata_enum_android_distortion_correction_mode {
+ ANDROID_DISTORTION_CORRECTION_MODE_OFF , // HIDL v3.3
+ ANDROID_DISTORTION_CORRECTION_MODE_FAST , // HIDL v3.3
+ ANDROID_DISTORTION_CORRECTION_MODE_HIGH_QUALITY , // HIDL v3.3
+} camera_metadata_enum_android_distortion_correction_mode_t;
+
+
diff --git a/include/android/metadata/system/camera_vendor_tags.h b/include/android/metadata/system/camera_vendor_tags.h
new file mode 100644
index 00000000..0bb54260
--- /dev/null
+++ b/include/android/metadata/system/camera_vendor_tags.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_VENDOR_TAGS_H
+#define SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_VENDOR_TAGS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CAMERA_METADATA_VENDOR_TAG_BOUNDARY 0x80000000u
+#define CAMERA_METADATA_INVALID_VENDOR_ID UINT64_MAX
+
+typedef uint64_t metadata_vendor_id_t;
+
+/**
+ * Vendor tags:
+ *
+ * This structure contains basic functions for enumerating an immutable set of
+ * vendor-defined camera metadata tags, and querying static information about
+ * their structure/type. The intended use of this information is to validate
+ * the structure of metadata returned by the camera HAL, and to allow vendor-
+ * defined metadata tags to be visible in application facing camera API.
+ */
+typedef struct vendor_tag_ops vendor_tag_ops_t;
+struct vendor_tag_ops {
+ /**
+ * Get the number of vendor tags supported on this platform. Used to
+ * calculate the size of buffer needed for holding the array of all tags
+ * returned by get_all_tags(). This must return -1 on error.
+ */
+ int (*get_tag_count)(const vendor_tag_ops_t *v);
+
+ /**
+ * Fill an array with all of the supported vendor tags on this platform.
+ * get_tag_count() must return the number of tags supported, and
+ * tag_array will be allocated with enough space to hold the number of tags
+ * returned by get_tag_count().
+ */
+ void (*get_all_tags)(const vendor_tag_ops_t *v, uint32_t *tag_array);
+
+ /**
+ * Get the vendor section name for a vendor-specified entry tag. This will
+ * only be called for vendor-defined tags.
+ *
+ * The naming convention for the vendor-specific section names should
+ * follow a style similar to the Java package style. For example,
+ * CameraZoom Inc. must prefix their sections with "com.camerazoom."
+ * This must return NULL if the tag is outside the bounds of
+ * vendor-defined sections.
+ *
+ * There may be different vendor-defined tag sections, for example the
+ * phone maker, the chipset maker, and the camera module maker may each
+ * have their own "com.vendor."-prefixed section.
+ *
+ * The memory pointed to by the return value must remain valid for the
+ * lifetime of the module, and is owned by the module.
+ */
+ const char *(*get_section_name)(const vendor_tag_ops_t *v, uint32_t tag);
+
+ /**
+ * Get the tag name for a vendor-specified entry tag. This is only called
+ * for vendor-defined tags, and must return NULL if it is not a
+ * vendor-defined tag.
+ *
+ * The memory pointed to by the return value must remain valid for the
+ * lifetime of the module, and is owned by the module.
+ */
+ const char *(*get_tag_name)(const vendor_tag_ops_t *v, uint32_t tag);
+
+ /**
+ * Get tag type for a vendor-specified entry tag. The type returned must be
+ * a valid type defined in camera_metadata.h. This method is only called
+ * for tags >= CAMERA_METADATA_VENDOR_TAG_BOUNDARY, and must return
+ * -1 if the tag is outside the bounds of the vendor-defined sections.
+ */
+ int (*get_tag_type)(const vendor_tag_ops_t *v, uint32_t tag);
+
+ /* Reserved for future use. These must be initialized to NULL. */
+ void* reserved[8];
+};
+
+struct vendor_tag_cache_ops {
+ /**
+ * Get the number of vendor tags supported on this platform. Used to
+ * calculate the size of buffer needed for holding the array of all tags
+ * returned by get_all_tags(). This must return -1 on error.
+ */
+ int (*get_tag_count)(metadata_vendor_id_t id);
+
+ /**
+ * Fill an array with all of the supported vendor tags on this platform.
+ * get_tag_count() must return the number of tags supported, and
+ * tag_array will be allocated with enough space to hold the number of tags
+ * returned by get_tag_count().
+ */
+ void (*get_all_tags)(uint32_t *tag_array, metadata_vendor_id_t id);
+
+ /**
+ * Get the vendor section name for a vendor-specified entry tag. This will
+ * only be called for vendor-defined tags.
+ *
+ * The naming convention for the vendor-specific section names should
+ * follow a style similar to the Java package style. For example,
+ * CameraZoom Inc. must prefix their sections with "com.camerazoom."
+ * This must return NULL if the tag is outside the bounds of
+ * vendor-defined sections.
+ *
+ * There may be different vendor-defined tag sections, for example the
+ * phone maker, the chipset maker, and the camera module maker may each
+ * have their own "com.vendor."-prefixed section.
+ *
+ * The memory pointed to by the return value must remain valid for the
+ * lifetime of the module, and is owned by the module.
+ */
+ const char *(*get_section_name)(uint32_t tag, metadata_vendor_id_t id);
+
+ /**
+ * Get the tag name for a vendor-specified entry tag. This is only called
+ * for vendor-defined tags, and must return NULL if it is not a
+ * vendor-defined tag.
+ *
+ * The memory pointed to by the return value must remain valid for the
+ * lifetime of the module, and is owned by the module.
+ */
+ const char *(*get_tag_name)(uint32_t tag, metadata_vendor_id_t id);
+
+ /**
+ * Get tag type for a vendor-specified entry tag. The type returned must be
+ * a valid type defined in camera_metadata.h. This method is only called
+ * for tags >= CAMERA_METADATA_VENDOR_TAG_BOUNDARY, and must return
+ * -1 if the tag is outside the bounds of the vendor-defined sections.
+ */
+ int (*get_tag_type)(uint32_t tag, metadata_vendor_id_t id);
+
+ /* Reserved for future use. These must be initialized to NULL. */
+ void* reserved[8];
+};
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_VENDOR_TAGS_H */
+