summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-25 16:04:48 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-25 16:04:48 +0100
commit81749cbe66f2defa026e0552f7b9fa33c9eaf26a (patch)
treecf1f47dc608c875a4bfe2aee97727d4c279e4f7b
parent139237f611f88eb9b35deb3f9ad67bc310a07f55 (diff)
parentcf1466f693b0f3880c6853121e323137e46595cc (diff)
downloadandroid_system_media-81749cbe66f2defa026e0552f7b9fa33c9eaf26a.tar.gz
android_system_media-81749cbe66f2defa026e0552f7b9fa33c9eaf26a.tar.bz2
android_system_media-81749cbe66f2defa026e0552f7b9fa33c9eaf26a.zip
Merge tag 'android-4.3_r2.1' into cm-10.2
Android 4.3 release 2.1
-rw-r--r--audio_effects/include/audio_effects/effect_bassboost.h3
-rw-r--r--audio_effects/include/audio_effects/effect_environmentalreverb.h3
-rw-r--r--audio_effects/include/audio_effects/effect_equalizer.h9
-rw-r--r--audio_effects/include/audio_effects/effect_presetreverb.h3
-rw-r--r--audio_effects/include/audio_effects/effect_virtualizer.h3
-rw-r--r--audio_route/Android.mk12
-rw-r--r--audio_route/MODULE_LICENSE_BSD0
-rw-r--r--audio_route/NOTICE25
-rw-r--r--audio_route/audio_route.c755
-rw-r--r--audio_route/include/audio_route/audio_route.h44
-rw-r--r--audio_utils/Android.mk40
-rw-r--r--audio_utils/echo_reference.c16
-rw-r--r--audio_utils/fixedfft.cpp8
-rw-r--r--audio_utils/include/audio_utils/primitives.h12
-rw-r--r--audio_utils/include/audio_utils/sndfile.h69
-rw-r--r--audio_utils/primitives.c7
-rw-r--r--audio_utils/tinysndfile.c251
-rw-r--r--camera/docs/README.md26
-rw-r--r--camera/docs/__init__.py19
-rw-r--r--camera/docs/camera_metadata_tag_info.mako105
-rw-r--r--camera/docs/camera_metadata_tags.mako99
-rw-r--r--camera/docs/docs.html10400
-rw-r--r--camera/docs/html.mako308
-rwxr-xr-xcamera/docs/metadata-check-dependencies114
-rwxr-xr-xcamera/docs/metadata-generate59
-rwxr-xr-xcamera/docs/metadata-parser-sanity-check47
-rwxr-xr-xcamera/docs/metadata-validate33
-rw-r--r--camera/docs/metadata_helpers.py243
-rw-r--r--camera/docs/metadata_model.py1175
-rwxr-xr-xcamera/docs/metadata_parser_xml.py268
-rw-r--r--camera/docs/metadata_properties.xml2305
-rw-r--r--camera/docs/metadata_properties.xsd209
-rw-r--r--camera/docs/metadata_template.mako152
-rwxr-xr-xcamera/docs/metadata_validate.py307
-rw-r--r--camera/include/system/camera_metadata.h39
-rw-r--r--camera/include/system/camera_metadata_tags.h963
-rw-r--r--camera/src/Android.mk5
-rw-r--r--camera/src/camera_metadata.c225
-rw-r--r--camera/src/camera_metadata_tag_info.c2272
-rw-r--r--camera/tests/camera_metadata_tests.cpp120
40 files changed, 19788 insertions, 965 deletions
diff --git a/audio_effects/include/audio_effects/effect_bassboost.h b/audio_effects/include/audio_effects/effect_bassboost.h
index cf9375e2..37359045 100644
--- a/audio_effects/include/audio_effects/effect_bassboost.h
+++ b/audio_effects/include/audio_effects/effect_bassboost.h
@@ -24,7 +24,8 @@ extern "C" {
#endif
#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_BASSBOOST_ = { 0x0634f220, 0xddd4, 0x11db, 0xa0fc, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+static const effect_uuid_t SL_IID_BASSBOOST_ = { 0x0634f220, 0xddd4, 0x11db, 0xa0fc,
+ { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
const effect_uuid_t * const SL_IID_BASSBOOST = &SL_IID_BASSBOOST_;
#endif //OPENSL_ES_H_
diff --git a/audio_effects/include/audio_effects/effect_environmentalreverb.h b/audio_effects/include/audio_effects/effect_environmentalreverb.h
index 77f3697c..3acbd5c4 100644
--- a/audio_effects/include/audio_effects/effect_environmentalreverb.h
+++ b/audio_effects/include/audio_effects/effect_environmentalreverb.h
@@ -24,7 +24,8 @@ extern "C" {
#endif
#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } };
+static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac,
+ { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } };
const effect_uuid_t * const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_;
#endif //OPENSL_ES_H_
diff --git a/audio_effects/include/audio_effects/effect_equalizer.h b/audio_effects/include/audio_effects/effect_equalizer.h
index e0c3bbd7..17ee74f4 100644
--- a/audio_effects/include/audio_effects/effect_equalizer.h
+++ b/audio_effects/include/audio_effects/effect_equalizer.h
@@ -20,7 +20,8 @@
#include <hardware/audio_effect.h>
#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_EQUALIZER_ = { 0x0bed4300, 0xddd6, 0x11db, 0x8f34, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+static const effect_uuid_t SL_IID_EQUALIZER_ = { 0x0bed4300, 0xddd6, 0x11db, 0x8f34,
+ { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
const effect_uuid_t * const SL_IID_EQUALIZER = &SL_IID_EQUALIZER_;
#endif //OPENSL_ES_H_
@@ -31,12 +32,14 @@ extern "C" {
/* enumerated parameters for Equalizer effect */
typedef enum
{
- EQ_PARAM_NUM_BANDS, // Gets the number of frequency bands that the equalizer supports.
+ EQ_PARAM_NUM_BANDS, // Gets the number of frequency bands that the equalizer
+ // supports.
EQ_PARAM_LEVEL_RANGE, // Returns the minimum and maximum band levels supported.
EQ_PARAM_BAND_LEVEL, // Gets/Sets the gain set for the given equalizer band.
EQ_PARAM_CENTER_FREQ, // Gets the center frequency of the given band.
EQ_PARAM_BAND_FREQ_RANGE, // Gets the frequency range of the given frequency band.
- EQ_PARAM_GET_BAND, // Gets the band that has the most effect on the given frequency.
+ EQ_PARAM_GET_BAND, // Gets the band that has the most effect on the given
+ // frequency.
EQ_PARAM_CUR_PRESET, // Gets/Sets the current preset.
EQ_PARAM_GET_NUM_OF_PRESETS, // Gets the total number of presets the equalizer supports.
EQ_PARAM_GET_PRESET_NAME, // Gets the preset name based on the index.
diff --git a/audio_effects/include/audio_effects/effect_presetreverb.h b/audio_effects/include/audio_effects/effect_presetreverb.h
index e8d60526..ba1beae0 100644
--- a/audio_effects/include/audio_effects/effect_presetreverb.h
+++ b/audio_effects/include/audio_effects/effect_presetreverb.h
@@ -24,7 +24,8 @@ extern "C" {
#endif
#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_PRESETREVERB_ = { 0x47382d60, 0xddd8, 0x11db, 0xbf3a, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+static const effect_uuid_t SL_IID_PRESETREVERB_ = { 0x47382d60, 0xddd8, 0x11db, 0xbf3a,
+ { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
const effect_uuid_t * const SL_IID_PRESETREVERB = &SL_IID_PRESETREVERB_;
#endif //OPENSL_ES_H_
diff --git a/audio_effects/include/audio_effects/effect_virtualizer.h b/audio_effects/include/audio_effects/effect_virtualizer.h
index a6f6fa20..fdb68a93 100644
--- a/audio_effects/include/audio_effects/effect_virtualizer.h
+++ b/audio_effects/include/audio_effects/effect_virtualizer.h
@@ -24,7 +24,8 @@ extern "C" {
#endif
#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_VIRTUALIZER_ = { 0x37cc2c00, 0xdddd, 0x11db, 0x8577, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
+static const effect_uuid_t SL_IID_VIRTUALIZER_ = { 0x37cc2c00, 0xdddd, 0x11db, 0x8577,
+ { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
const effect_uuid_t * const SL_IID_VIRTUALIZER = &SL_IID_VIRTUALIZER_;
#endif //OPENSL_ES_H_
diff --git a/audio_route/Android.mk b/audio_route/Android.mk
new file mode 100644
index 00000000..7470dc6a
--- /dev/null
+++ b/audio_route/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_C_INCLUDES += \
+ external/tinyalsa/include \
+ external/expat/lib
+LOCAL_SRC_FILES:= audio_route.c
+LOCAL_MODULE := libaudioroute
+LOCAL_SHARED_LIBRARIES:= liblog libcutils libutils libexpat libtinyalsa
+LOCAL_MODULE_TAGS := optional
+LOCAL_PRELINK_MODULE := false
+include $(BUILD_SHARED_LIBRARY)
diff --git a/audio_route/MODULE_LICENSE_BSD b/audio_route/MODULE_LICENSE_BSD
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/audio_route/MODULE_LICENSE_BSD
diff --git a/audio_route/NOTICE b/audio_route/NOTICE
new file mode 100644
index 00000000..91b65651
--- /dev/null
+++ b/audio_route/NOTICE
@@ -0,0 +1,25 @@
+Copyright 2013, The Android Open Source Project
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of The Android Open Source Project nor the names of
+ its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
diff --git a/audio_route/audio_route.c b/audio_route/audio_route.c
new file mode 100644
index 00000000..b8eddbd1
--- /dev/null
+++ b/audio_route/audio_route.c
@@ -0,0 +1,755 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ * Inspired by TinyHW, written by Mark Brown at Wolfson Micro
+ *
+ * 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.
+ */
+
+#define LOG_TAG "audio_route"
+/*#define LOG_NDEBUG 0*/
+
+#include <errno.h>
+#include <expat.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <cutils/log.h>
+
+#include <tinyalsa/asoundlib.h>
+
+#define BUF_SIZE 1024
+#define MIXER_XML_PATH "/system/etc/mixer_paths.xml"
+#define INITIAL_MIXER_PATH_SIZE 8
+
+struct mixer_state {
+ struct mixer_ctl *ctl;
+ unsigned int num_values;
+ int *old_value;
+ int *new_value;
+ int *reset_value;
+ /* If linked is true, only the first element in each array is valid */
+ bool old_linked;
+ bool new_linked;
+ bool reset_linked;
+};
+
+struct mixer_setting {
+ struct mixer_ctl *ctl;
+ unsigned int num_values;
+ int *value;
+ /* If linked is true, only the first element in each array is valid */
+ bool linked;
+};
+
+struct mixer_value {
+ struct mixer_ctl *ctl;
+ int index;
+ int value;
+};
+
+struct mixer_path {
+ char *name;
+ unsigned int size;
+ unsigned int length;
+ struct mixer_setting *setting;
+};
+
+struct audio_route {
+ struct mixer *mixer;
+ unsigned int num_mixer_ctls;
+ struct mixer_state *mixer_state;
+
+ unsigned int mixer_path_size;
+ unsigned int num_mixer_paths;
+ struct mixer_path *mixer_path;
+};
+
+struct config_parse_state {
+ struct audio_route *ar;
+ struct mixer_path *path;
+ int level;
+};
+
+/* path functions */
+
+static void path_print(struct mixer_path *path)
+{
+ unsigned int i;
+ unsigned int j;
+
+ ALOGE("Path: %s, length: %d", path->name, path->length);
+ for (i = 0; i < path->length; i++) {
+ ALOGE(" id=%d: ctl=%s linked=%c", i,
+ mixer_ctl_get_name(path->setting[i].ctl),
+ path->setting[i].linked ? 'y' : 'n');
+ for (j = 0; j < path->setting[i].num_values; j++)
+ ALOGE(" id=%d value=%d", j, path->setting[i].value[j]);
+ }
+}
+
+static void path_free(struct audio_route *ar)
+{
+ unsigned int i;
+
+ for (i = 0; i < ar->num_mixer_paths; i++) {
+ if (ar->mixer_path[i].name)
+ free(ar->mixer_path[i].name);
+ if (ar->mixer_path[i].setting) {
+ if (ar->mixer_path[i].setting->value)
+ free(ar->mixer_path[i].setting->value);
+ free(ar->mixer_path[i].setting);
+ }
+ }
+ free(ar->mixer_path);
+}
+
+static struct mixer_path *path_get_by_name(struct audio_route *ar,
+ const char *name)
+{
+ unsigned int i;
+
+ for (i = 0; i < ar->num_mixer_paths; i++)
+ if (strcmp(ar->mixer_path[i].name, name) == 0)
+ return &ar->mixer_path[i];
+
+ return NULL;
+}
+
+static struct mixer_path *path_create(struct audio_route *ar, const char *name)
+{
+ struct mixer_path *new_mixer_path = NULL;
+
+ if (path_get_by_name(ar, name)) {
+ ALOGE("Path name '%s' already exists", name);
+ return NULL;
+ }
+
+ /* check if we need to allocate more space for mixer paths */
+ if (ar->mixer_path_size <= ar->num_mixer_paths) {
+ if (ar->mixer_path_size == 0)
+ ar->mixer_path_size = INITIAL_MIXER_PATH_SIZE;
+ else
+ ar->mixer_path_size *= 2;
+
+ new_mixer_path = realloc(ar->mixer_path, ar->mixer_path_size *
+ sizeof(struct mixer_path));
+ if (new_mixer_path == NULL) {
+ ALOGE("Unable to allocate more paths");
+ return NULL;
+ } else {
+ ar->mixer_path = new_mixer_path;
+ }
+ }
+
+ /* initialise the new mixer path */
+ ar->mixer_path[ar->num_mixer_paths].name = strdup(name);
+ ar->mixer_path[ar->num_mixer_paths].size = 0;
+ ar->mixer_path[ar->num_mixer_paths].length = 0;
+ ar->mixer_path[ar->num_mixer_paths].setting = NULL;
+
+ /* return the mixer path just added, then increment number of them */
+ return &ar->mixer_path[ar->num_mixer_paths++];
+}
+
+static int find_ctl_in_path(struct mixer_path *path, struct mixer_ctl *ctl)
+{
+ unsigned int i;
+
+ for (i = 0; i < path->length; i++)
+ if (path->setting[i].ctl == ctl)
+ return i;
+
+ return -1;
+}
+
+static int alloc_path_setting(struct mixer_path *path)
+{
+ struct mixer_setting *new_path_setting;
+ int path_index;
+
+ /* check if we need to allocate more space for path settings */
+ if (path->size <= path->length) {
+ if (path->size == 0)
+ path->size = INITIAL_MIXER_PATH_SIZE;
+ else
+ path->size *= 2;
+
+ new_path_setting = realloc(path->setting,
+ path->size * sizeof(struct mixer_setting));
+ if (new_path_setting == NULL) {
+ ALOGE("Unable to allocate more path settings");
+ return -1;
+ } else {
+ path->setting = new_path_setting;
+ }
+ }
+
+ path_index = path->length;
+ path->length++;
+
+ return path_index;
+}
+
+static int path_add_setting(struct mixer_path *path,
+ struct mixer_setting *setting)
+{
+ unsigned int i;
+ int path_index;
+
+ if (find_ctl_in_path(path, setting->ctl) != -1) {
+ ALOGE("Control '%s' already exists in path '%s'",
+ mixer_ctl_get_name(setting->ctl), path->name);
+ return -1;
+ }
+
+ path_index = alloc_path_setting(path);
+ if (path_index < 0)
+ return -1;
+
+ path->setting[path_index].ctl = setting->ctl;
+ path->setting[path_index].num_values = setting->num_values;
+ path->setting[path_index].value = malloc(setting->num_values * sizeof(int));
+ path->setting[path_index].linked = setting->linked;
+ if (setting->linked) {
+ path->setting[path_index].value[0] = setting->value[0];
+ } else {
+ for (i = 0; i < setting->num_values; i++)
+ path->setting[path_index].value[i] = setting->value[i];
+ }
+
+ return 0;
+}
+
+static int path_add_value(struct mixer_path *path,
+ struct mixer_value *mixer_value)
+{
+ unsigned int i;
+ int path_index;
+ unsigned int num_values;
+
+ /* Check that mixer value index is within range */
+ num_values = mixer_ctl_get_num_values(mixer_value->ctl);
+ if (mixer_value->index >= (int)num_values) {
+ ALOGE("mixer index %d is out of range for '%s'", mixer_value->index,
+ mixer_ctl_get_name(mixer_value->ctl));
+ return -1;
+ }
+
+ path_index = find_ctl_in_path(path, mixer_value->ctl);
+ if (path_index < 0) {
+ /* New path */
+
+ path_index = alloc_path_setting(path);
+ if (path_index < 0)
+ return -1;
+
+ /* initialise the new path setting */
+ path->setting[path_index].ctl = mixer_value->ctl;
+ path->setting[path_index].num_values = num_values;
+ path->setting[path_index].value = malloc(num_values * sizeof(int));
+ path->setting[path_index].linked = true;
+ path->setting[path_index].value[0] = mixer_value->value;
+ }
+
+ if (mixer_value->index == -1) {
+ /* Linked, so only set the first value */
+ path->setting[path_index].linked = true;
+ path->setting[path_index].value[0] = mixer_value->value;
+ } else {
+ if (path->setting[path_index].linked && (num_values > 1)) {
+ /* Unlinking the values, so duplicate them across */
+ for (i = 1; i < num_values; i++) {
+ path->setting[path_index].value[i] =
+ path->setting[path_index].value[0];
+ }
+ path->setting[path_index].linked = false;
+ }
+ path->setting[path_index].value[mixer_value->index] = mixer_value->value;
+ }
+
+ return 0;
+}
+
+static int path_add_path(struct mixer_path *path, struct mixer_path *sub_path)
+{
+ unsigned int i;
+
+ for (i = 0; i < sub_path->length; i++)
+ if (path_add_setting(path, &sub_path->setting[i]) < 0)
+ return -1;
+
+ return 0;
+}
+
+static int path_apply(struct audio_route *ar, struct mixer_path *path)
+{
+ unsigned int i;
+ unsigned int j;
+ unsigned int ctl_index;
+
+ for (i = 0; i < path->length; i++) {
+ struct mixer_ctl *ctl = path->setting[i].ctl;
+
+ /* locate the mixer ctl in the list */
+ for (ctl_index = 0; ctl_index < ar->num_mixer_ctls; ctl_index++)
+ if (ar->mixer_state[ctl_index].ctl == ctl)
+ break;
+
+ /* apply the new value(s) */
+ for (j = 0; j < ar->mixer_state[ctl_index].num_values; j++) {
+ ar->mixer_state[ctl_index].new_value[j] = path->setting[i].value[j];
+ if (path->setting[i].linked)
+ break;
+ }
+ ar->mixer_state[ctl_index].new_linked = path->setting[i].linked;
+ }
+
+ return 0;
+}
+
+static int path_reset(struct audio_route *ar, struct mixer_path *path)
+{
+ unsigned int i;
+ unsigned int j;
+ unsigned int ctl_index;
+
+ for (i = 0; i < path->length; i++) {
+ struct mixer_ctl *ctl = path->setting[i].ctl;
+
+ /* locate the mixer ctl in the list */
+ for (ctl_index = 0; ctl_index < ar->num_mixer_ctls; ctl_index++) {
+ if (ar->mixer_state[ctl_index].ctl == ctl)
+ break;
+ }
+
+ /* reset the value(s) */
+ for (j = 0; j < ar->mixer_state[ctl_index].num_values; j++) {
+ ar->mixer_state[ctl_index].new_value[j] = ar->mixer_state[ctl_index].reset_value[j];
+ if (ar->mixer_state[ctl_index].reset_linked)
+ break;
+ }
+ ar->mixer_state[ctl_index].new_linked = ar->mixer_state[ctl_index].reset_linked;
+ }
+
+ return 0;
+}
+
+/* mixer helper function */
+static int mixer_enum_string_to_value(struct mixer_ctl *ctl, const char *string)
+{
+ unsigned int i;
+
+ /* Search the enum strings for a particular one */
+ for (i = 0; i < mixer_ctl_get_num_enums(ctl); i++) {
+ if (strcmp(mixer_ctl_get_enum_string(ctl, i), string) == 0)
+ break;
+ }
+
+ return i;
+}
+
+static void start_tag(void *data, const XML_Char *tag_name,
+ const XML_Char **attr)
+{
+ const XML_Char *attr_name = NULL;
+ const XML_Char *attr_id = NULL;
+ const XML_Char *attr_value = NULL;
+ struct config_parse_state *state = data;
+ struct audio_route *ar = state->ar;
+ unsigned int i;
+ unsigned int ctl_index;
+ struct mixer_ctl *ctl;
+ int value;
+ unsigned int id;
+ struct mixer_value mixer_value;
+
+ /* Get name, id and value attributes (these may be empty) */
+ for (i = 0; attr[i]; i += 2) {
+ if (strcmp(attr[i], "name") == 0)
+ attr_name = attr[i + 1];
+ if (strcmp(attr[i], "id") == 0)
+ attr_id = attr[i + 1];
+ else if (strcmp(attr[i], "value") == 0)
+ attr_value = attr[i + 1];
+ }
+
+ /* Look at tags */
+ if (strcmp(tag_name, "path") == 0) {
+ if (attr_name == NULL) {
+ ALOGE("Unnamed path!");
+ } else {
+ if (state->level == 1) {
+ /* top level path: create and stash the path */
+ state->path = path_create(ar, (char *)attr_name);
+ } else {
+ /* nested path */
+ struct mixer_path *sub_path = path_get_by_name(ar, attr_name);
+ path_add_path(state->path, sub_path);
+ }
+ }
+ }
+
+ else if (strcmp(tag_name, "ctl") == 0) {
+ /* Obtain the mixer ctl and value */
+ ctl = mixer_get_ctl_by_name(ar->mixer, attr_name);
+ switch (mixer_ctl_get_type(ctl)) {
+ case MIXER_CTL_TYPE_BOOL:
+ case MIXER_CTL_TYPE_INT:
+ value = atoi((char *)attr_value);
+ break;
+ case MIXER_CTL_TYPE_ENUM:
+ value = mixer_enum_string_to_value(ctl, (char *)attr_value);
+ break;
+ default:
+ value = 0;
+ break;
+ }
+
+ if (state->level == 1) {
+ /* top level ctl (initial setting) */
+
+ /* locate the mixer ctl in the list */
+ for (ctl_index = 0; ctl_index < ar->num_mixer_ctls; ctl_index++) {
+ if (ar->mixer_state[ctl_index].ctl == ctl)
+ break;
+ }
+
+ /* apply the new value */
+ if (attr_id) {
+ /* set only one value */
+ id = atoi((char *)attr_id);
+ if (id < ar->mixer_state[ctl_index].num_values) {
+ if (ar->mixer_state[ctl_index].new_linked) {
+ /*
+ * We're unlinking the values, so copy old_value[0] into
+ * all the new_value elements.
+ */
+ for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++) {
+ ar->mixer_state[ctl_index].new_value[i] =
+ ar->mixer_state[ctl_index].old_value[0];
+ }
+ ar->mixer_state[ctl_index].new_linked = false;
+ }
+ ar->mixer_state[ctl_index].new_value[id] = value;
+ } else {
+ ALOGE("value id out of range for mixer ctl '%s'",
+ mixer_ctl_get_name(ctl));
+ }
+ } else {
+ ar->mixer_state[ctl_index].new_value[0] = value;
+ ar->mixer_state[ctl_index].new_linked = true;
+ }
+ } else {
+ /* nested ctl (within a path) */
+ mixer_value.ctl = ctl;
+ mixer_value.value = value;
+ if (attr_id)
+ mixer_value.index = atoi((char *)attr_id);
+ else
+ mixer_value.index = -1;
+ path_add_value(state->path, &mixer_value);
+ }
+ }
+
+ state->level++;
+}
+
+static void end_tag(void *data, const XML_Char *tag_name)
+{
+ struct config_parse_state *state = data;
+
+ state->level--;
+}
+
+static int alloc_mixer_state(struct audio_route *ar)
+{
+ unsigned int i;
+ unsigned int j;
+ unsigned int num_values;
+ struct mixer_ctl *ctl;
+ bool linked;
+
+ ar->num_mixer_ctls = mixer_get_num_ctls(ar->mixer);
+ ar->mixer_state = malloc(ar->num_mixer_ctls * sizeof(struct mixer_state));
+ if (!ar->mixer_state)
+ return -1;
+
+ for (i = 0; i < ar->num_mixer_ctls; i++) {
+ ctl = mixer_get_ctl(ar->mixer, i);
+ num_values = mixer_ctl_get_num_values(ctl);
+
+ ar->mixer_state[i].old_value = malloc(num_values * sizeof(int));
+ ar->mixer_state[i].new_value = malloc(num_values * sizeof(int));
+ ar->mixer_state[i].reset_value = malloc(num_values * sizeof(int));
+
+ /*
+ * Get all mixer values for controls with multiple values. If all
+ * values are the same, set the linked flag.
+ */
+ linked = true;
+ for (j = 0; j < num_values; j++) {
+ ar->mixer_state[i].old_value[j] = mixer_ctl_get_value(ctl, j);
+ ar->mixer_state[i].new_value[j] = ar->mixer_state[i].old_value[j];
+
+ /*
+ * If the next value is different from the last, set linked to
+ * false.
+ */
+ if ((j > 0) && (ar->mixer_state[i].old_value[j - 1] !=
+ ar->mixer_state[i].old_value[j])) {
+ linked = false;
+ }
+ }
+ ar->mixer_state[i].ctl = ctl;
+ ar->mixer_state[i].old_linked = linked;
+ ar->mixer_state[i].new_linked = linked;
+ ar->mixer_state[i].num_values = num_values;
+ }
+
+ return 0;
+}
+
+static void free_mixer_state(struct audio_route *ar)
+{
+ unsigned int i;
+
+ for (i = 0; i < ar->num_mixer_ctls; i++) {
+ free(ar->mixer_state[i].old_value);
+ free(ar->mixer_state[i].new_value);
+ free(ar->mixer_state[i].reset_value);
+ }
+
+ free(ar->mixer_state);
+ ar->mixer_state = NULL;
+}
+
+/* Update the mixer with any changed values */
+int audio_route_update_mixer(struct audio_route *ar)
+{
+ unsigned int i;
+ unsigned int j;
+
+ for (i = 0; i < ar->num_mixer_ctls; i++) {
+ unsigned int num_values = ar->mixer_state[i].num_values;
+
+ /* if the value has changed, update the mixer */
+ if (ar->mixer_state[i].new_linked) {
+ if (ar->mixer_state[i].old_value[0] != ar->mixer_state[i].new_value[0]) {
+ /* linked ctl, so set all ctl values the same */
+ for (j = 0; j < num_values; j++)
+ mixer_ctl_set_value(ar->mixer_state[i].ctl, j,
+ ar->mixer_state[i].new_value[0]);
+ ar->mixer_state[i].old_value[0] = ar->mixer_state[i].new_value[0];
+ }
+ } else {
+ for (j = 0; j < num_values; j++) {
+ /*
+ * unlinked ctl, so set each value if necessary.
+ * Note that if the new value is unlinked but the old is
+ * linked, only value 0 is valid, so we always have to
+ * update the mixer for the other values.
+ */
+ if (ar->mixer_state[i].old_linked ||
+ (ar->mixer_state[i].old_value[j] !=
+ ar->mixer_state[i].new_value[j])) {
+ mixer_ctl_set_value(ar->mixer_state[i].ctl, j,
+ ar->mixer_state[i].new_value[j]);
+ ar->mixer_state[i].old_value[j] = ar->mixer_state[i].new_value[j];
+ }
+ }
+ }
+ ar->mixer_state[i].old_linked = ar->mixer_state[i].new_linked;
+ }
+
+ return 0;
+}
+
+/* saves the current state of the mixer, for resetting all controls */
+static void save_mixer_state(struct audio_route *ar)
+{
+ unsigned int i;
+ unsigned int j;
+
+ for (i = 0; i < ar->num_mixer_ctls; i++) {
+ for (j = 0; j < ar->mixer_state[i].num_values; j++) {
+ ar->mixer_state[i].reset_value[j] = ar->mixer_state[i].new_value[j];
+
+ /* if the values are linked, only need to save value 0 */
+ if (ar->mixer_state[i].new_linked)
+ break;
+ }
+ ar->mixer_state[i].reset_linked = ar->mixer_state[i].new_linked;
+ }
+}
+
+/* Reset the audio routes back to the initial state */
+void audio_route_reset(struct audio_route *ar)
+{
+ unsigned int i;
+ unsigned int j;
+
+ /* load all of the saved values */
+ for (i = 0; i < ar->num_mixer_ctls; i++) {
+ for (j = 0; j < ar->mixer_state[i].num_values; j++) {
+ ar->mixer_state[i].new_value[j] = ar->mixer_state[i].reset_value[j];
+
+ /* if the values are linked, only need to save value 0 */
+ if (ar->mixer_state[i].reset_linked)
+ break;
+ }
+ ar->mixer_state[i].new_linked = ar->mixer_state[i].reset_linked;
+ }
+}
+
+/* Apply an audio route path by name */
+int audio_route_apply_path(struct audio_route *ar, const char *name)
+{
+ struct mixer_path *path;
+
+ if (!ar) {
+ ALOGE("invalid audio_route");
+ return -1;
+ }
+
+ path = path_get_by_name(ar, name);
+ if (!path) {
+ ALOGE("unable to find path '%s'", name);
+ return -1;
+ }
+
+ path_apply(ar, path);
+
+ return 0;
+}
+
+/* Reset an audio route path by name */
+int audio_route_reset_path(struct audio_route *ar, const char *name)
+{
+ struct mixer_path *path;
+
+ if (!ar) {
+ ALOGE("invalid audio_route");
+ return -1;
+ }
+
+ path = path_get_by_name(ar, name);
+ if (!path) {
+ ALOGE("unable to find path '%s'", name);
+ return -1;
+ }
+
+ path_reset(ar, path);
+
+ return 0;
+}
+
+struct audio_route *audio_route_init(unsigned int card, const char *xml_path)
+{
+ struct config_parse_state state;
+ XML_Parser parser;
+ FILE *file;
+ int bytes_read;
+ void *buf;
+ int i;
+ struct audio_route *ar;
+
+ ar = calloc(1, sizeof(struct audio_route));
+ if (!ar)
+ goto err_calloc;
+
+ ar->mixer = mixer_open(card);
+ if (!ar->mixer) {
+ ALOGE("Unable to open the mixer, aborting.");
+ goto err_mixer_open;
+ }
+
+ ar->mixer_path = NULL;
+ ar->mixer_path_size = 0;
+ ar->num_mixer_paths = 0;
+
+ /* allocate space for and read current mixer settings */
+ if (alloc_mixer_state(ar) < 0)
+ goto err_mixer_state;
+
+ /* use the default XML path if none is provided */
+ if (xml_path == NULL)
+ xml_path = MIXER_XML_PATH;
+
+ file = fopen(xml_path, "r");
+
+ if (!file) {
+ ALOGE("Failed to open %s", xml_path);
+ goto err_fopen;
+ }
+
+ parser = XML_ParserCreate(NULL);
+ if (!parser) {
+ ALOGE("Failed to create XML parser");
+ goto err_parser_create;
+ }
+
+ memset(&state, 0, sizeof(state));
+ state.ar = ar;
+ XML_SetUserData(parser, &state);
+ XML_SetElementHandler(parser, start_tag, end_tag);
+
+ for (;;) {
+ buf = XML_GetBuffer(parser, BUF_SIZE);
+ if (buf == NULL)
+ goto err_parse;
+
+ bytes_read = fread(buf, 1, BUF_SIZE, file);
+ if (bytes_read < 0)
+ goto err_parse;
+
+ if (XML_ParseBuffer(parser, bytes_read,
+ bytes_read == 0) == XML_STATUS_ERROR) {
+ ALOGE("Error in mixer xml (%s)", MIXER_XML_PATH);
+ goto err_parse;
+ }
+
+ if (bytes_read == 0)
+ break;
+ }
+
+ /* apply the initial mixer values, and save them so we can reset the
+ mixer to the original values */
+ audio_route_update_mixer(ar);
+ save_mixer_state(ar);
+
+ XML_ParserFree(parser);
+ fclose(file);
+ return ar;
+
+err_parse:
+ XML_ParserFree(parser);
+err_parser_create:
+ fclose(file);
+err_fopen:
+ free_mixer_state(ar);
+err_mixer_state:
+ mixer_close(ar->mixer);
+err_mixer_open:
+ free(ar);
+ ar = NULL;
+err_calloc:
+ return NULL;
+}
+
+void audio_route_free(struct audio_route *ar)
+{
+ free_mixer_state(ar);
+ mixer_close(ar->mixer);
+ free(ar);
+}
diff --git a/audio_route/include/audio_route/audio_route.h b/audio_route/include/audio_route/audio_route.h
new file mode 100644
index 00000000..452b6e27
--- /dev/null
+++ b/audio_route/include/audio_route/audio_route.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2013 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 AUDIO_ROUTE_H
+#define AUDIO_ROUTE_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* Initialize and free the audio routes */
+struct audio_route *audio_route_init(unsigned int card, const char *xml_path);
+void audio_route_free(struct audio_route *ar);
+
+/* Apply an audio route path by name */
+int audio_route_apply_path(struct audio_route *ar, const char *name);
+
+/* Reset an audio route path by name */
+int audio_route_reset_path(struct audio_route *ar, const char *name);
+
+/* Reset the audio routes back to the initial state */
+void audio_route_reset(struct audio_route *ar);
+
+/* Update the mixer with any changed values */
+int audio_route_update_mixer(struct audio_route *ar);
+
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif
+
+#endif
diff --git a/audio_utils/Android.mk b/audio_utils/Android.mk
index e3f3e5e7..9a9d5e89 100644
--- a/audio_utils/Android.mk
+++ b/audio_utils/Android.mk
@@ -18,6 +18,46 @@ LOCAL_C_INCLUDES += \
LOCAL_SHARED_LIBRARIES := \
libcutils \
+ liblog \
libspeexresampler
include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libaudioutils
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := \
+ primitives.c
+LOCAL_C_INCLUDES += \
+ $(call include-path-for, audio-utils)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libsndfile
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := \
+ tinysndfile.c
+
+LOCAL_C_INCLUDES += \
+ $(call include-path-for, audio-utils)
+
+#LOCAL_SHARED_LIBRARIES := libaudioutils
+
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libsndfile
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := \
+ tinysndfile.c
+
+LOCAL_C_INCLUDES += \
+ $(call include-path-for, audio-utils)
+
+#LOCAL_SHARED_LIBRARIES := libaudioutils
+
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/audio_utils/echo_reference.c b/audio_utils/echo_reference.c
index c05a60fd..90f9a9f4 100644
--- a/audio_utils/echo_reference.c
+++ b/audio_utils/echo_reference.c
@@ -83,9 +83,11 @@ int echo_reference_get_next_buffer(struct resampler_buffer_provider *buffer_prov
return -ENODATA;
}
- buffer->frame_count = (buffer->frame_count > er->wr_frames_in) ? er->wr_frames_in : buffer->frame_count;
+ buffer->frame_count = (buffer->frame_count > er->wr_frames_in) ?
+ er->wr_frames_in : buffer->frame_count;
// this is er->rd_channel_count here as we resample after stereo to mono conversion if any
- buffer->i16 = (int16_t *)er->wr_src_buf + (er->wr_curr_frame_size - er->wr_frames_in) * er->rd_channel_count;
+ buffer->i16 = (int16_t *)er->wr_src_buf + (er->wr_curr_frame_size - er->wr_frames_in) *
+ er->rd_channel_count;
return 0;
}
@@ -234,8 +236,8 @@ static int echo_reference_write(struct echo_reference_itfe *echo_reference,
goto exit;
}
}
- // er->wr_src_buf and er->wr_frames_in are used by getNexBuffer() called by the resampler
- // to get new frames
+ // er->wr_src_buf and er->wr_frames_in are used by getNexBuffer() called by the
+ // resampler to get new frames
if (er->rd_channel_count != er->wr_channel_count) {
er->wr_src_buf = er->wr_buf;
} else {
@@ -373,7 +375,8 @@ static int echo_reference_read(struct echo_reference_itfe *echo_reference,
int64_t deltaNs = delayNs - expectedDelayNs;
- ALOGV("echo_reference_read(): EchoPathDelayDeviation between reference and DMA [%lld]", deltaNs);
+ ALOGV("echo_reference_read(): EchoPathDelayDeviation between reference and DMA [%lld]",
+ deltaNs);
if (abs(deltaNs) >= MIN_DELAY_DELTA_NS) {
// smooth the variation and update the reference buffer only
// if a deviation in the same direction is observed for more than MIN_DELTA_NUM
@@ -493,7 +496,8 @@ int create_echo_reference(audio_format_t rdFormat,
}
if ((rdChannelCount != 1 && rdChannelCount != 2) ||
wrChannelCount != 2) {
- ALOGW("create_echo_reference bad channel count rd %d, wr %d", rdChannelCount, wrChannelCount);
+ ALOGW("create_echo_reference bad channel count rd %d, wr %d", rdChannelCount,
+ wrChannelCount);
return -EINVAL;
}
diff --git a/audio_utils/fixedfft.cpp b/audio_utils/fixedfft.cpp
index 2c92e746..eba84e7c 100644
--- a/audio_utils/fixedfft.cpp
+++ b/audio_utils/fixedfft.cpp
@@ -35,7 +35,9 @@
#define LOG_FFT_SIZE 10
#define MAX_FFT_SIZE (1 << LOG_FFT_SIZE)
-static const int32_t twiddle[MAX_FFT_SIZE / 4] = {
+// Actually int32_t, but declare as uint32_t to avoid warnings due to overflow.
+// Be sure to cast all accesses before use, for example "(int32_t) twiddle[...]".
+static const uint32_t twiddle[MAX_FFT_SIZE / 4] = {
0x00008000, 0xff378001, 0xfe6e8002, 0xfda58006, 0xfcdc800a, 0xfc13800f,
0xfb4a8016, 0xfa81801e, 0xf9b88027, 0xf8ef8032, 0xf827803e, 0xf75e804b,
0xf6958059, 0xf5cd8068, 0xf5058079, 0xf43c808b, 0xf374809e, 0xf2ac80b2,
@@ -132,7 +134,7 @@ void fixed_fft(int n, int32_t *v)
for (r = 1; r < p; ++r) {
int32_t w = MAX_FFT_SIZE / 4 - (r << scale);
i = w >> 31;
- w = twiddle[(w ^ i) - i] ^ (i << 16);
+ w = ((int32_t) twiddle[(w ^ i) - i]) ^ (i << 16);
for (i = r; i < n; i += p << 1) {
int32_t x = half(v[i]);
int32_t y = mult(w, v[i + p]);
@@ -157,7 +159,7 @@ void fixed_fft_real(int n, int32_t *v)
int32_t z = half(v[n - i]);
int32_t y = z - (x ^ 0xFFFF);
x = half(x + (z ^ 0xFFFF));
- y = mult(y, twiddle[i << scale]);
+ y = mult(y, ((int32_t) twiddle[i << scale]));
v[i] = x - y;
v[n - i] = (x + y) ^ 0xFFFF;
}
diff --git a/audio_utils/include/audio_utils/primitives.h b/audio_utils/include/audio_utils/primitives.h
index 00b5cd92..b34e309c 100644
--- a/audio_utils/include/audio_utils/primitives.h
+++ b/audio_utils/include/audio_utils/primitives.h
@@ -18,6 +18,7 @@
#define ANDROID_AUDIO_PRIMITIVES_H
#include <stdint.h>
+#include <stdlib.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -44,6 +45,17 @@ void ditherAndClamp(int32_t* out, const int32_t *sums, size_t c);
*/
void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count);
+/* Shrink and copy samples from signed 16-bit to unsigned 8-bit offset by 0x80.
+ * Parameters:
+ * dst Destination buffer
+ * src Source buffer
+ * count Number of samples to copy
+ * The destination and source buffers must either be completely separate (non-overlapping), or
+ * they must both start at the same address. Partially overlapping buffers are not supported.
+ * The conversion is done by truncation, without dithering, so it loses resolution.
+ */
+void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count);
+
/* Downmix pairs of interleaved stereo input 16-bit samples to mono output 16-bit samples.
* Parameters:
* dst Destination buffer
diff --git a/audio_utils/include/audio_utils/sndfile.h b/audio_utils/include/audio_utils/sndfile.h
new file mode 100644
index 00000000..c6526549
--- /dev/null
+++ b/audio_utils/include/audio_utils/sndfile.h
@@ -0,0 +1,69 @@
+/*
+ * 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 __AUDIO_UTIL_SNDFILE_H
+#define __AUDIO_UTIL_SNDFILE_H
+
+// This is a C library for reading and writing PCM .wav files. It is
+// influenced by other libraries such as libsndfile and audiofile, except is
+// much smaller and has an Apache 2.0 license.
+// The API should be familiar to clients of similar libraries, but there is
+// no guarantee that it will stay exactly source-code compatible with other libraries.
+
+#include <stdio.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+// visible to clients
+typedef int sf_count_t;
+
+typedef struct {
+ sf_count_t frames;
+ int samplerate;
+ int channels;
+ int format;
+} SF_INFO;
+
+// opaque to clients
+typedef struct SNDFILE_ SNDFILE;
+
+// Access modes
+#define SFM_READ 1
+#define SFM_WRITE 2
+
+// Format
+#define SF_FORMAT_TYPEMASK 1
+#define SF_FORMAT_WAV 1
+#define SF_FORMAT_SUBMASK 6
+#define SF_FORMAT_PCM_16 2
+#define SF_FORMAT_PCM_U8 4
+
+// Open stream
+SNDFILE *sf_open(const char *path, int mode, SF_INFO *info);
+
+// Close stream
+void sf_close(SNDFILE *handle);
+
+// Read interleaved frames and return actual number of frames read
+sf_count_t sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desired);
+
+// Write interleaved frames and return actual number of frames written
+sf_count_t sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desired);
+
+__END_DECLS
+
+#endif /* __AUDIO_UTIL_SNDFILE_H */
diff --git a/audio_utils/primitives.c b/audio_utils/primitives.c
index bec87e0f..af9ab40c 100644
--- a/audio_utils/primitives.c
+++ b/audio_utils/primitives.c
@@ -39,6 +39,13 @@ void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count)
}
}
+void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count)
+{
+ while (count--) {
+ *dst++ = (*src++ >> 8) + 0x80;
+ }
+}
+
void downmix_to_mono_i16_from_stereo_i16(int16_t *dst, const int16_t *src, size_t count)
{
while (count--) {
diff --git a/audio_utils/tinysndfile.c b/audio_utils/tinysndfile.c
new file mode 100644
index 00000000..2b58d16b
--- /dev/null
+++ b/audio_utils/tinysndfile.c
@@ -0,0 +1,251 @@
+/*
+ * 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.
+ */
+
+#include <audio_utils/sndfile.h>
+#include <audio_utils/primitives.h>
+#include <stdio.h>
+#include <string.h>
+
+struct SNDFILE_ {
+ int mode;
+ uint8_t *temp; // realloc buffer used for shrinking 16 bits to 8 bits and byte-swapping
+ FILE *stream;
+ size_t bytesPerFrame;
+ size_t remaining; // frames unread for SFM_READ, frames written for SFM_WRITE
+ SF_INFO info;
+};
+
+static unsigned little2u(unsigned char *ptr)
+{
+ return (ptr[1] << 8) + ptr[0];
+}
+
+static unsigned little4u(unsigned char *ptr)
+{
+ return (ptr[3] << 24) + (ptr[2] << 16) + (ptr[1] << 8) + ptr[0];
+}
+
+static int isLittleEndian(void)
+{
+ static const short one = 1;
+ return *((const char *) &one) == 1;
+}
+
+// "swab" conflicts with OS X <string.h>
+static void my_swab(short *ptr, size_t numToSwap)
+{
+ while (numToSwap > 0) {
+ *ptr = little2u((unsigned char *) ptr);
+ --numToSwap;
+ ++ptr;
+ }
+}
+
+static SNDFILE *sf_open_read(const char *path, SF_INFO *info)
+{
+ FILE *stream = fopen(path, "rb");
+ if (stream == NULL)
+ return NULL;
+ // don't attempt to parse all valid forms, just the most common one
+ unsigned char wav[44];
+ size_t actual;
+ actual = fread(wav, sizeof(char), sizeof(wav), stream);
+ if (actual != sizeof(wav))
+ return NULL;
+ for (;;) {
+ if (memcmp(wav, "RIFF", 4))
+ break;
+ unsigned riffSize = little4u(&wav[4]);
+ if (riffSize < 36)
+ break;
+ if (memcmp(&wav[8], "WAVEfmt ", 8))
+ break;
+ unsigned fmtsize = little4u(&wav[16]);
+ if (fmtsize != 16)
+ break;
+ unsigned format = little2u(&wav[20]);
+ if (format != 1) // PCM
+ break;
+ unsigned channels = little2u(&wav[22]);
+ if (channels != 1 && channels != 2)
+ break;
+ unsigned samplerate = little4u(&wav[24]);
+ if (samplerate == 0)
+ break;
+ // ignore byte rate
+ // ignore block alignment
+ unsigned bitsPerSample = little2u(&wav[34]);
+ if (bitsPerSample != 8 && bitsPerSample != 16)
+ break;
+ unsigned bytesPerFrame = (bitsPerSample >> 3) * channels;
+ if (memcmp(&wav[36], "data", 4))
+ break;
+ unsigned dataSize = little4u(&wav[40]);
+ SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE));
+ handle->mode = SFM_READ;
+ handle->temp = NULL;
+ handle->stream = stream;
+ handle->bytesPerFrame = bytesPerFrame;
+ handle->remaining = dataSize / bytesPerFrame;
+ handle->info.frames = handle->remaining;
+ handle->info.samplerate = samplerate;
+ handle->info.channels = channels;
+ handle->info.format = SF_FORMAT_WAV;
+ if (bitsPerSample == 8)
+ handle->info.format |= SF_FORMAT_PCM_U8;
+ else
+ handle->info.format |= SF_FORMAT_PCM_16;
+ *info = handle->info;
+ return handle;
+ }
+ return NULL;
+}
+
+static void write4u(unsigned char *ptr, unsigned u)
+{
+ ptr[0] = u;
+ ptr[1] = u >> 8;
+ ptr[2] = u >> 16;
+ ptr[3] = u >> 24;
+}
+
+static SNDFILE *sf_open_write(const char *path, SF_INFO *info)
+{
+ if (!(
+ (info->samplerate > 0) &&
+ (info->channels == 1 || info->channels == 2) &&
+ ((info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV) &&
+ ((info->format & SF_FORMAT_SUBMASK) == SF_FORMAT_PCM_16 ||
+ (info->format & SF_FORMAT_SUBMASK) == SF_FORMAT_PCM_U8)
+ )) {
+ return NULL;
+ }
+ FILE *stream = fopen(path, "w+b");
+ unsigned char wav[44];
+ memset(wav, 0, sizeof(wav));
+ memcpy(wav, "RIFF", 4);
+ wav[4] = 36; // riffSize
+ memcpy(&wav[8], "WAVEfmt ", 8);
+ wav[16] = 16; // fmtsize
+ wav[20] = 1; // format = PCM
+ wav[22] = info->channels;
+ write4u(&wav[24], info->samplerate);
+ unsigned bitsPerSample = (info->format & SF_FORMAT_SUBMASK) == SF_FORMAT_PCM_16 ? 16 : 8;
+ unsigned blockAlignment = (bitsPerSample >> 3) * info->channels;
+ unsigned byteRate = info->samplerate * blockAlignment;
+ write4u(&wav[28], byteRate);
+ wav[32] = blockAlignment;
+ wav[34] = bitsPerSample;
+ memcpy(&wav[36], "data", 4);
+ // dataSize is initially zero
+ (void) fwrite(wav, sizeof(wav), 1, stream);
+ SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE));
+ handle->mode = SFM_WRITE;
+ handle->temp = NULL;
+ handle->stream = stream;
+ handle->bytesPerFrame = blockAlignment;
+ handle->remaining = 0;
+ handle->info = *info;
+ return handle;
+}
+
+SNDFILE *sf_open(const char *path, int mode, SF_INFO *info)
+{
+ if (path == NULL || info == NULL)
+ return NULL;
+ switch (mode) {
+ case SFM_READ:
+ return sf_open_read(path, info);
+ case SFM_WRITE:
+ return sf_open_write(path, info);
+ default:
+ return NULL;
+ }
+}
+
+void sf_close(SNDFILE *handle)
+{
+ if (handle == NULL)
+ return;
+ free(handle->temp);
+ if (handle->mode == SFM_WRITE) {
+ (void) fflush(handle->stream);
+ rewind(handle->stream);
+ unsigned char wav[44];
+ (void) fread(wav, sizeof(wav), 1, handle->stream);
+ unsigned dataSize = handle->remaining * handle->bytesPerFrame;
+ write4u(&wav[4], dataSize + 36); // riffSize
+ write4u(&wav[40], dataSize); // dataSize
+ rewind(handle->stream);
+ (void) fwrite(wav, sizeof(wav), 1, handle->stream);
+ }
+ (void) fclose(handle->stream);
+ free(handle);
+}
+
+sf_count_t sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desiredFrames)
+{
+ if (handle == NULL || handle->mode != SFM_READ || ptr == NULL || !handle->remaining ||
+ desiredFrames <= 0) {
+ return 0;
+ }
+ if (handle->remaining < (size_t) desiredFrames)
+ desiredFrames = handle->remaining;
+ size_t desiredBytes = desiredFrames * handle->bytesPerFrame;
+ // does not check for numeric overflow
+ size_t actualBytes = fread(ptr, sizeof(char), desiredBytes, handle->stream);
+ size_t actualFrames = actualBytes / handle->bytesPerFrame;
+ handle->remaining -= actualFrames;
+ switch (handle->info.format & SF_FORMAT_SUBMASK) {
+ case SF_FORMAT_PCM_U8:
+ memcpy_to_i16_from_u8(ptr, (unsigned char *) ptr, actualFrames * handle->info.channels);
+ break;
+ case SF_FORMAT_PCM_16:
+ if (!isLittleEndian())
+ my_swab(ptr, actualFrames * handle->info.channels);
+ break;
+ }
+ return actualFrames;
+}
+
+sf_count_t sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desiredFrames)
+{
+ if (handle == NULL || handle->mode != SFM_WRITE || ptr == NULL || desiredFrames <= 0)
+ return 0;
+ size_t desiredBytes = desiredFrames * handle->bytesPerFrame;
+ size_t actualBytes = 0;
+ switch (handle->info.format & SF_FORMAT_SUBMASK) {
+ case SF_FORMAT_PCM_U8:
+ handle->temp = realloc(handle->temp, desiredBytes);
+ memcpy_to_u8_from_i16(handle->temp, ptr, desiredBytes);
+ actualBytes = fwrite(handle->temp, sizeof(char), desiredBytes, handle->stream);
+ break;
+ case SF_FORMAT_PCM_16:
+ // does not check for numeric overflow
+ if (isLittleEndian()) {
+ actualBytes = fwrite(ptr, sizeof(char), desiredBytes, handle->stream);
+ } else {
+ handle->temp = realloc(handle->temp, desiredBytes);
+ memcpy(handle->temp, ptr, desiredBytes);
+ my_swab((short *) handle->temp, desiredFrames * handle->info.channels);
+ actualBytes = fwrite(handle->temp, sizeof(char), desiredBytes, handle->stream);
+ }
+ break;
+ }
+ size_t actualFrames = actualBytes / handle->bytesPerFrame;
+ handle->remaining += actualFrames;
+ return actualFrames;
+}
diff --git a/camera/docs/README.md b/camera/docs/README.md
new file mode 100644
index 00000000..cf7902b9
--- /dev/null
+++ b/camera/docs/README.md
@@ -0,0 +1,26 @@
+# Camera Metadata XML
+## Introduction
+This is a set of scripts to manipulate the camera metadata in an XML form.
+
+## Generated Files
+Many files can be generated from XML, such as the documentation (html/pdf),
+C code, Java code, and even XML itself (as a sanity check).
+
+## Dependencies
+* Python 2.7.x+
+* Beautiful Soup 4+ - HTML/XML parser, used to parse `metadata_properties.xml`
+* Mako 0.7+ - Template engine, needed to do file generation
+* Tidy - Cleans up the XML/HTML files.
+* XML Lint - Validates XML against XSD schema
+
+## Quick Setup (Ubuntu Precise):
+sudo apt-get install python-mako
+sudo apt-get install python-bs4
+sudo apt-get install tidy
+sudo apt-get install libxml2-utils #xmllint
+
+## Quick Setup (MacPorts)
+sudo port install py27-beautifulsoup4
+sudo port install py27-mako
+sudo port install tidy
+sudo port install libxml2 #xmllint
diff --git a/camera/docs/__init__.py b/camera/docs/__init__.py
new file mode 100644
index 00000000..e18dba4b
--- /dev/null
+++ b/camera/docs/__init__.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+#
+# 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.
+#
+
+# This file is intentionally left empty
diff --git a/camera/docs/camera_metadata_tag_info.mako b/camera/docs/camera_metadata_tag_info.mako
new file mode 100644
index 00000000..bfe5d866
--- /dev/null
+++ b/camera/docs/camera_metadata_tag_info.mako
@@ -0,0 +1,105 @@
+## -*- coding: utf-8 -*-
+/*
+ * 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 reference this file directly !!
+ *
+ * It is logically a part of camera_metadata.c. It is broken out for ease of
+ * maintaining the tag info.
+ *
+ * Array assignments are done using specified-index syntax to keep things in
+ * sync with camera_metadata_tags.h
+ */
+
+/**
+ * ! Do not edit this file directly !
+ *
+ * Generated automatically from camera_metadata_tag_info.mako
+ */
+
+const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = {
+ % for i in find_all_sections(metadata):
+ ${"[%s]" %(path_name(i)) | csym,pad(36)} = "${path_name(i)}",
+ % endfor
+};
+
+unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = {
+ % for i in find_all_sections(metadata):
+ ${"[%s]" %(path_name(i)) | csym,pad(36)} = { ${path_name(i) | csym}_START,
+ ${path_name(i) | csym}_END },
+ % endfor
+};
+
+% for sec in find_all_sections(metadata):
+static tag_info_t ${path_name(sec) | csyml}[${path_name(sec) | csym}_END -
+ ${path_name(sec) | csym}_START] = {
+ % for entry in find_unique_entries(sec):
+ [ ${entry.name | csym} - ${path_name(sec) | csym}_START ] =
+ { ${'"%s",' %(entry.name_short) | pad(40)} ${entry.type | ctype_enum,ljust(11)} },
+ % endfor
+};
+
+% endfor
+
+tag_info_t *tag_info[ANDROID_SECTION_COUNT] = {
+ % for i in find_all_sections(metadata):
+ ${path_name(i) | csyml},
+ % endfor
+};
+
+int camera_metadata_enum_snprint(uint32_t tag,
+ uint32_t value,
+ char *dst,
+ size_t size) {
+ const char *msg = "error: not an enum";
+ int ret = -1;
+
+ switch(tag) {
+ % for sec in find_all_sections(metadata):
+ % for idx,entry in enumerate(find_unique_entries(sec)):
+ case ${entry.name | csym}: {
+ % if entry.enum:
+ switch (value) {
+ % for val in entry.enum.values:
+ case ${entry.name | csym}_${val.name}:
+ msg = "${val.name}";
+ ret = 0;
+ break;
+ % endfor
+ default:
+ msg = "error: enum value out of range";
+ }
+ % endif
+ break;
+ }
+ % endfor
+
+ %endfor
+ }
+
+ strncpy(dst, msg, size - 1);
+ dst[size - 1] = '\0';
+
+ return ret;
+}
+
+<%
+ find_values = lambda x: isinstance(x, metadata_model.EnumValue)
+ enum_values = metadata.find_all(find_values)
+ enum_value_max_len = max([len(value.name) for value in enum_values]) + 1
+%>
+#define CAMERA_METADATA_ENUM_STRING_MAX_SIZE ${enum_value_max_len}
diff --git a/camera/docs/camera_metadata_tags.mako b/camera/docs/camera_metadata_tags.mako
new file mode 100644
index 00000000..2bffe400
--- /dev/null
+++ b/camera/docs/camera_metadata_tags.mako
@@ -0,0 +1,99 @@
+## -*- coding: utf-8 -*-
+/*
+ * 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 {
+ % for i in find_all_sections(metadata):
+ ${path_name(i) | csym},
+ % endfor
+ 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 {
+ % for i in find_all_sections(metadata):
+ ${path_name(i) + '.start' | csym,ljust(30)} = ${path_name(i) | csym,pad(64)} << 16,
+ % endfor
+ 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 {
+ % for sec in find_all_sections(metadata):
+ % for idx,entry in enumerate(find_unique_entries(sec)):
+ % if idx == 0:
+ ${entry.name | csym,ljust(30)} = ${path_name(find_parent_section(entry)) | csym}_START,
+ % else:
+ ${entry.name | csym},
+ % endif
+ % endfor
+ ${path_name(sec) | csym}_END,
+
+ %endfor
+} camera_metadata_tag_t;
+
+/**
+ * Enumeration definitions for the various entries that need them
+ */
+
+% for sec in find_all_sections(metadata):
+ % for entry in find_unique_entries(sec):
+ % if entry.enum:
+// ${entry.name | csym}
+typedef enum camera_metadata_enum_${csym(entry.name).lower()} {
+ % for val in entry.enum.values:
+ % if val.id is None:
+ ${entry.name | csym}_${val.name},
+ % else:
+ ${'%s_%s'%(csym(entry.name), val.name) | pad(65)} = ${val.id},
+ % endif
+ % endfor
+} camera_metadata_enum_${csym(entry.name).lower()}_t;
+
+ % endif
+ % endfor
+
+%endfor
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
new file mode 100644
index 00000000..210e9d8d
--- /dev/null
+++ b/camera/docs/docs.html
@@ -0,0 +1,10400 @@
+<!DOCTYPE html>
+<html>
+<!-- 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.
+-->
+<head>
+ <!-- automatically generated from html.mako. do NOT edit directly -->
+ <meta charset="utf-8" />
+ <title>Android Camera HAL2.0 Properties</title>
+ <style type="text/css">
+ .section { font-size: 1.5em; font-weight: bold; background-color: beige; padding: 0.5em 0em 0.5em 0.1em }
+ .kind { font-size: 1.2em; font-weight: bold; padding-left: 0.5em; background-color: gray }
+ .entry { background-color: burlywood }
+
+ /* table column sizes */
+ table { table-layout: fixed; width: 100%; word-wrap: break-word }
+ td,th { border: 1px solid; }
+ .th_name { width: 20% }
+ .th_units { width: 10% }
+ .th_tags { width: 5% }
+ .th_notes { width: 30% }
+ .th_type { width: 20% }
+ td { font-size: 0.9em; }
+
+ /* hide the first thead, we need it there only to enforce column sizes */
+ .thead_dummy { visibility: hidden; }
+
+ /* Entry flair */
+ .entry_name { font-family: monospace; font-style: italic; }
+
+ /* Entry type flair */
+ .entry_type_name { color: darkgreen; font-weight: bold; }
+ .entry_type_name_enum:after { color: darkgreen; font-weight: bold; content:" (enum)" }
+ .entry_type_enum_name { font-family: monospace; font-weight: bolder; }
+ .entry_type_enum_notes:before { content:" - " }
+ .entry_type_enum_value:before { content:" = " }
+ .entry_type_enum_value { font-family: monospace; }
+ .entry ul { margin: 0 0 0 0; list-style-position: inside; padding-left: 0.5em; }
+ .entry ul li { padding: 0 0 0 0; margin: 0 0 0 0;}
+
+ /* Entry tags flair */
+ .entry_tags ul { list-style-type: none; }
+
+
+ /* TODO: generate abbr element for each tag link? */
+ /* TODO for each x.y.z try to link it to the entry */
+
+ </style>
+
+ <style>
+
+ {
+ /* broken...
+ supposedly there is a bug in chrome that it lays out tables before
+ it knows its being printed, so the page-break-* styles are ignored
+ */
+ tr { page-break-after: always; page-break-inside: avoid; }
+ }
+
+ </style>
+</head>
+
+
+
+
+<body>
+ <h1>Android Camera HAL2.0 Properties</h1>
+
+ <h2>Table of Contents</h2>
+ <ul class="toc">
+ <li><a href="#tag_index">Tags</a></li>
+
+
+ <li><p class="toc_section"><a href="#section_colorCorrection">colorCorrection</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.colorCorrection.mode">android.colorCorrection.mode</a> (controls)</li>
+ <li><a href="#controls_android.colorCorrection.transform">android.colorCorrection.transform</a> (controls)</li>
+ <li><a href="#dynamic_android.colorCorrection.mode">android.colorCorrection.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_control">control</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.control.aeAntibandingMode">android.control.aeAntibandingMode</a> (controls)</li>
+ <li><a href="#controls_android.control.aeExposureCompensation">android.control.aeExposureCompensation</a> (controls)</li>
+ <li><a href="#controls_android.control.aeLock">android.control.aeLock</a> (controls)</li>
+ <li><a href="#controls_android.control.aeMode">android.control.aeMode</a> (controls)</li>
+ <li><a href="#controls_android.control.aeRegions">android.control.aeRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.aeTargetFpsRange">android.control.aeTargetFpsRange</a> (controls)</li>
+ <li><a href="#controls_android.control.aePrecaptureTrigger">android.control.aePrecaptureTrigger</a> (controls)</li>
+ <li><a href="#controls_android.control.afMode">android.control.afMode</a> (controls)</li>
+ <li><a href="#controls_android.control.afRegions">android.control.afRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.afTrigger">android.control.afTrigger</a> (controls)</li>
+ <li><a href="#controls_android.control.awbLock">android.control.awbLock</a> (controls)</li>
+ <li><a href="#controls_android.control.awbMode">android.control.awbMode</a> (controls)</li>
+ <li><a href="#controls_android.control.awbRegions">android.control.awbRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.captureIntent">android.control.captureIntent</a> (controls)</li>
+ <li><a href="#controls_android.control.effectMode">android.control.effectMode</a> (controls)</li>
+ <li><a href="#controls_android.control.mode">android.control.mode</a> (controls)</li>
+ <li><a href="#controls_android.control.sceneMode">android.control.sceneMode</a> (controls)</li>
+ <li><a href="#controls_android.control.videoStabilizationMode">android.control.videoStabilizationMode</a> (controls)</li>
+ <li><a href="#static_android.control.aeAvailableAntibandingModes">android.control.aeAvailableAntibandingModes</a> (static)</li>
+ <li><a href="#static_android.control.aeAvailableModes">android.control.aeAvailableModes</a> (static)</li>
+ <li><a href="#static_android.control.aeAvailableTargetFpsRanges">android.control.aeAvailableTargetFpsRanges</a> (static)</li>
+ <li><a href="#static_android.control.aeCompensationRange">android.control.aeCompensationRange</a> (static)</li>
+ <li><a href="#static_android.control.aeCompensationStep">android.control.aeCompensationStep</a> (static)</li>
+ <li><a href="#static_android.control.afAvailableModes">android.control.afAvailableModes</a> (static)</li>
+ <li><a href="#static_android.control.availableEffects">android.control.availableEffects</a> (static)</li>
+ <li><a href="#static_android.control.availableSceneModes">android.control.availableSceneModes</a> (static)</li>
+ <li><a href="#static_android.control.availableVideoStabilizationModes">android.control.availableVideoStabilizationModes</a> (static)</li>
+ <li><a href="#static_android.control.awbAvailableModes">android.control.awbAvailableModes</a> (static)</li>
+ <li><a href="#static_android.control.maxRegions">android.control.maxRegions</a> (static)</li>
+ <li><a href="#static_android.control.sceneModeOverrides">android.control.sceneModeOverrides</a> (static)</li>
+ <li><a href="#dynamic_android.control.aePrecaptureId">android.control.aePrecaptureId</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.aeRegions">android.control.aeRegions</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.aeState">android.control.aeState</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.afMode">android.control.afMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.afRegions">android.control.afRegions</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.afState">android.control.afState</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.afTriggerId">android.control.afTriggerId</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.awbMode">android.control.awbMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.awbRegions">android.control.awbRegions</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.awbState">android.control.awbState</a> (dynamic)</li>
+ <li><a href="#dynamic_android.control.mode">android.control.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_demosaic">demosaic</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.demosaic.mode">android.demosaic.mode</a> (controls)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_edge">edge</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.edge.mode">android.edge.mode</a> (controls)</li>
+ <li><a href="#controls_android.edge.strength">android.edge.strength</a> (controls)</li>
+ <li><a href="#dynamic_android.edge.mode">android.edge.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_flash">flash</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.flash.firingPower">android.flash.firingPower</a> (controls)</li>
+ <li><a href="#controls_android.flash.firingTime">android.flash.firingTime</a> (controls)</li>
+ <li><a href="#controls_android.flash.mode">android.flash.mode</a> (controls)</li>
+ <li><a href="#static_android.flash.info.available">android.flash.info.available</a> (static)</li>
+ <li><a href="#static_android.flash.info.chargeDuration">android.flash.info.chargeDuration</a> (static)</li>
+ <li><a href="#static_android.flash.colorTemperature">android.flash.colorTemperature</a> (static)</li>
+ <li><a href="#static_android.flash.maxEnergy">android.flash.maxEnergy</a> (static)</li>
+ <li><a href="#dynamic_android.flash.firingPower">android.flash.firingPower</a> (dynamic)</li>
+ <li><a href="#dynamic_android.flash.firingTime">android.flash.firingTime</a> (dynamic)</li>
+ <li><a href="#dynamic_android.flash.mode">android.flash.mode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.flash.state">android.flash.state</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_geometric">geometric</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.geometric.mode">android.geometric.mode</a> (controls)</li>
+ <li><a href="#controls_android.geometric.strength">android.geometric.strength</a> (controls)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_hotPixel">hotPixel</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.hotPixel.mode">android.hotPixel.mode</a> (controls)</li>
+ <li><a href="#static_android.hotPixel.info.map">android.hotPixel.info.map</a> (static)</li>
+ <li><a href="#dynamic_android.hotPixel.mode">android.hotPixel.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_jpeg">jpeg</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.jpeg.gpsCoordinates">android.jpeg.gpsCoordinates</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.gpsProcessingMethod">android.jpeg.gpsProcessingMethod</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.gpsTimestamp">android.jpeg.gpsTimestamp</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.orientation">android.jpeg.orientation</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.quality">android.jpeg.quality</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.thumbnailQuality">android.jpeg.thumbnailQuality</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.thumbnailSize">android.jpeg.thumbnailSize</a> (controls)</li>
+ <li><a href="#static_android.jpeg.availableThumbnailSizes">android.jpeg.availableThumbnailSizes</a> (static)</li>
+ <li><a href="#static_android.jpeg.maxSize">android.jpeg.maxSize</a> (static)</li>
+ <li><a href="#dynamic_android.jpeg.gpsCoordinates">android.jpeg.gpsCoordinates</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.gpsProcessingMethod">android.jpeg.gpsProcessingMethod</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.gpsTimestamp">android.jpeg.gpsTimestamp</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.orientation">android.jpeg.orientation</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.quality">android.jpeg.quality</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.size">android.jpeg.size</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.thumbnailQuality">android.jpeg.thumbnailQuality</a> (dynamic)</li>
+ <li><a href="#dynamic_android.jpeg.thumbnailSize">android.jpeg.thumbnailSize</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_lens">lens</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.lens.aperture">android.lens.aperture</a> (controls)</li>
+ <li><a href="#controls_android.lens.filterDensity">android.lens.filterDensity</a> (controls)</li>
+ <li><a href="#controls_android.lens.focalLength">android.lens.focalLength</a> (controls)</li>
+ <li><a href="#controls_android.lens.focusDistance">android.lens.focusDistance</a> (controls)</li>
+ <li><a href="#controls_android.lens.opticalStabilizationMode">android.lens.opticalStabilizationMode</a> (controls)</li>
+ <li><a href="#static_android.lens.info.availableApertures">android.lens.info.availableApertures</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableFilterDensities">android.lens.info.availableFilterDensities</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableFocalLengths">android.lens.info.availableFocalLengths</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableOpticalStabilization">android.lens.info.availableOpticalStabilization</a> (static)</li>
+ <li><a href="#static_android.lens.info.geometricCorrectionMap">android.lens.info.geometricCorrectionMap</a> (static)</li>
+ <li><a href="#static_android.lens.info.geometricCorrectionMapSize">android.lens.info.geometricCorrectionMapSize</a> (static)</li>
+ <li><a href="#static_android.lens.info.hyperfocalDistance">android.lens.info.hyperfocalDistance</a> (static)</li>
+ <li><a href="#static_android.lens.info.minimumFocusDistance">android.lens.info.minimumFocusDistance</a> (static)</li>
+ <li><a href="#static_android.lens.info.shadingMap">android.lens.info.shadingMap</a> (static)</li>
+ <li><a href="#static_android.lens.info.shadingMapSize">android.lens.info.shadingMapSize</a> (static)</li>
+ <li><a href="#static_android.lens.facing">android.lens.facing</a> (static)</li>
+ <li><a href="#static_android.lens.opticalAxisAngle">android.lens.opticalAxisAngle</a> (static)</li>
+ <li><a href="#static_android.lens.position">android.lens.position</a> (static)</li>
+ <li><a href="#dynamic_android.lens.aperture">android.lens.aperture</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.filterDensity">android.lens.filterDensity</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.focalLength">android.lens.focalLength</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.focusDistance">android.lens.focusDistance</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.focusRange">android.lens.focusRange</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.opticalStabilizationMode">android.lens.opticalStabilizationMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.state">android.lens.state</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_noiseReduction">noiseReduction</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.noiseReduction.mode">android.noiseReduction.mode</a> (controls)</li>
+ <li><a href="#controls_android.noiseReduction.strength">android.noiseReduction.strength</a> (controls)</li>
+ <li><a href="#dynamic_android.noiseReduction.mode">android.noiseReduction.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_quirks">quirks</a></p>
+ <ul class="toc_section">
+ <li><a href="#static_android.quirks.meteringCropRegion">android.quirks.meteringCropRegion</a> (static)</li>
+ <li><a href="#static_android.quirks.triggerAfWithAuto">android.quirks.triggerAfWithAuto</a> (static)</li>
+ <li><a href="#static_android.quirks.useZslFormat">android.quirks.useZslFormat</a> (static)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_request">request</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.request.frameCount">android.request.frameCount</a> (controls)</li>
+ <li><a href="#controls_android.request.id">android.request.id</a> (controls)</li>
+ <li><a href="#controls_android.request.inputStreams">android.request.inputStreams</a> (controls)</li>
+ <li><a href="#controls_android.request.metadataMode">android.request.metadataMode</a> (controls)</li>
+ <li><a href="#controls_android.request.outputStreams">android.request.outputStreams</a> (controls)</li>
+ <li><a href="#controls_android.request.type">android.request.type</a> (controls)</li>
+ <li><a href="#static_android.request.maxNumOutputStreams">android.request.maxNumOutputStreams</a> (static)</li>
+ <li><a href="#static_android.request.maxNumReprocessStreams">android.request.maxNumReprocessStreams</a> (static)</li>
+ <li><a href="#dynamic_android.request.frameCount">android.request.frameCount</a> (dynamic)</li>
+ <li><a href="#dynamic_android.request.id">android.request.id</a> (dynamic)</li>
+ <li><a href="#dynamic_android.request.metadataMode">android.request.metadataMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.request.outputStreams">android.request.outputStreams</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_scaler">scaler</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.scaler.cropRegion">android.scaler.cropRegion</a> (controls)</li>
+ <li><a href="#static_android.scaler.availableFormats">android.scaler.availableFormats</a> (static)</li>
+ <li><a href="#static_android.scaler.availableJpegMinDurations">android.scaler.availableJpegMinDurations</a> (static)</li>
+ <li><a href="#static_android.scaler.availableJpegSizes">android.scaler.availableJpegSizes</a> (static)</li>
+ <li><a href="#static_android.scaler.availableMaxDigitalZoom">android.scaler.availableMaxDigitalZoom</a> (static)</li>
+ <li><a href="#static_android.scaler.availableProcessedMinDurations">android.scaler.availableProcessedMinDurations</a> (static)</li>
+ <li><a href="#static_android.scaler.availableProcessedSizes">android.scaler.availableProcessedSizes</a> (static)</li>
+ <li><a href="#static_android.scaler.availableRawMinDurations">android.scaler.availableRawMinDurations</a> (static)</li>
+ <li><a href="#static_android.scaler.availableRawSizes">android.scaler.availableRawSizes</a> (static)</li>
+ <li><a href="#dynamic_android.scaler.cropRegion">android.scaler.cropRegion</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_sensor">sensor</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.sensor.exposureTime">android.sensor.exposureTime</a> (controls)</li>
+ <li><a href="#controls_android.sensor.frameDuration">android.sensor.frameDuration</a> (controls)</li>
+ <li><a href="#controls_android.sensor.sensitivity">android.sensor.sensitivity</a> (controls)</li>
+ <li><a href="#static_android.sensor.info.activeArraySize">android.sensor.info.activeArraySize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.availableSensitivities">android.sensor.info.availableSensitivities</a> (static)</li>
+ <li><a href="#static_android.sensor.info.colorFilterArrangement">android.sensor.info.colorFilterArrangement</a> (static)</li>
+ <li><a href="#static_android.sensor.info.exposureTimeRange">android.sensor.info.exposureTimeRange</a> (static)</li>
+ <li><a href="#static_android.sensor.info.maxFrameDuration">android.sensor.info.maxFrameDuration</a> (static)</li>
+ <li><a href="#static_android.sensor.info.physicalSize">android.sensor.info.physicalSize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.whiteLevel">android.sensor.info.whiteLevel</a> (static)</li>
+ <li><a href="#static_android.sensor.baseGainFactor">android.sensor.baseGainFactor</a> (static)</li>
+ <li><a href="#static_android.sensor.blackLevelPattern">android.sensor.blackLevelPattern</a> (static)</li>
+ <li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a> (static)</li>
+ <li><a href="#static_android.sensor.calibrationTransform2">android.sensor.calibrationTransform2</a> (static)</li>
+ <li><a href="#static_android.sensor.colorTransform1">android.sensor.colorTransform1</a> (static)</li>
+ <li><a href="#static_android.sensor.colorTransform2">android.sensor.colorTransform2</a> (static)</li>
+ <li><a href="#static_android.sensor.forwardMatrix1">android.sensor.forwardMatrix1</a> (static)</li>
+ <li><a href="#static_android.sensor.forwardMatrix2">android.sensor.forwardMatrix2</a> (static)</li>
+ <li><a href="#static_android.sensor.maxAnalogSensitivity">android.sensor.maxAnalogSensitivity</a> (static)</li>
+ <li><a href="#static_android.sensor.noiseModelCoefficients">android.sensor.noiseModelCoefficients</a> (static)</li>
+ <li><a href="#static_android.sensor.orientation">android.sensor.orientation</a> (static)</li>
+ <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
+ <li><a href="#static_android.sensor.referenceIlluminant2">android.sensor.referenceIlluminant2</a> (static)</li>
+ <li><a href="#dynamic_android.sensor.exposureTime">android.sensor.exposureTime</a> (dynamic)</li>
+ <li><a href="#dynamic_android.sensor.frameDuration">android.sensor.frameDuration</a> (dynamic)</li>
+ <li><a href="#dynamic_android.sensor.sensitivity">android.sensor.sensitivity</a> (dynamic)</li>
+ <li><a href="#dynamic_android.sensor.timestamp">android.sensor.timestamp</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_shading">shading</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.shading.mode">android.shading.mode</a> (controls)</li>
+ <li><a href="#controls_android.shading.strength">android.shading.strength</a> (controls)</li>
+ <li><a href="#dynamic_android.shading.mode">android.shading.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_statistics">statistics</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.statistics.faceDetectMode">android.statistics.faceDetectMode</a> (controls)</li>
+ <li><a href="#controls_android.statistics.histogramMode">android.statistics.histogramMode</a> (controls)</li>
+ <li><a href="#controls_android.statistics.sharpnessMapMode">android.statistics.sharpnessMapMode</a> (controls)</li>
+ <li><a href="#static_android.statistics.info.availableFaceDetectModes">android.statistics.info.availableFaceDetectModes</a> (static)</li>
+ <li><a href="#static_android.statistics.info.histogramBucketCount">android.statistics.info.histogramBucketCount</a> (static)</li>
+ <li><a href="#static_android.statistics.info.maxFaceCount">android.statistics.info.maxFaceCount</a> (static)</li>
+ <li><a href="#static_android.statistics.info.maxHistogramCount">android.statistics.info.maxHistogramCount</a> (static)</li>
+ <li><a href="#static_android.statistics.info.maxSharpnessMapValue">android.statistics.info.maxSharpnessMapValue</a> (static)</li>
+ <li><a href="#static_android.statistics.info.sharpnessMapSize">android.statistics.info.sharpnessMapSize</a> (static)</li>
+ <li><a href="#dynamic_android.statistics.faceDetectMode">android.statistics.faceDetectMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceIds">android.statistics.faceIds</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceLandmarks">android.statistics.faceLandmarks</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceRectangles">android.statistics.faceRectangles</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceScores">android.statistics.faceScores</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.histogram">android.statistics.histogram</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.histogramMode">android.statistics.histogramMode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.sharpnessMap">android.statistics.sharpnessMap</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.sharpnessMapMode">android.statistics.sharpnessMapMode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_tonemap">tonemap</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.tonemap.curveBlue">android.tonemap.curveBlue</a> (controls)</li>
+ <li><a href="#controls_android.tonemap.curveGreen">android.tonemap.curveGreen</a> (controls)</li>
+ <li><a href="#controls_android.tonemap.curveRed">android.tonemap.curveRed</a> (controls)</li>
+ <li><a href="#controls_android.tonemap.mode">android.tonemap.mode</a> (controls)</li>
+ <li><a href="#static_android.tonemap.maxCurvePoints">android.tonemap.maxCurvePoints</a> (static)</li>
+ <li><a href="#dynamic_android.tonemap.curveBlue">android.tonemap.curveBlue</a> (dynamic)</li>
+ <li><a href="#dynamic_android.tonemap.curveGreen">android.tonemap.curveGreen</a> (dynamic)</li>
+ <li><a href="#dynamic_android.tonemap.curveRed">android.tonemap.curveRed</a> (dynamic)</li>
+ <li><a href="#dynamic_android.tonemap.mode">android.tonemap.mode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_led">led</a></p>
+ <ul class="toc_section">
+ <li><a href="#controls_android.led.transmit">android.led.transmit</a> (controls)</li>
+ <li><a href="#dynamic_android.led.transmit">android.led.transmit</a> (dynamic)</li>
+ <li><a href="#static_android.led.availableLeds">android.led.availableLeds</a> (static)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ <li><p class="toc_section"><a href="#section_info">info</a></p>
+ <ul class="toc_section">
+ <li><a href="#static_android.info.supportedHardwareLevel">android.info.supportedHardwareLevel</a> (static)</li>
+ </ul>
+ </li> <!-- toc_section -->
+ </ul>
+
+ <h1>Properties</h1>
+ <table class="properties">
+
+ <thead class="thead_dummy">
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead> <!-- so that the first occurrence of thead is not
+ above the first occurrence of tr -->
+<!-- <namespace name="android"> -->
+ <tr><td colspan="7" id="section_colorCorrection" class="section">colorCorrection</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.colorCorrection.mode">
+ <td class="entry_name">android.<wbr>color<wbr>Correction.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">TRANSFORM_MATRIX</span>
+ <span class="entry_type_enum_notes">Use the android.<wbr>color<wbr>Correction.<wbr>transform matrix
+ to do color conversion</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.colorCorrection.transform">
+ <td class="entry_name">android.<wbr>color<wbr>Correction.<wbr>transform</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3 x 3
+ </span>
+
+ <div class="entry_type_notes">3x3 float matrix in row-major order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A transform matrix to chromatically adapt
+ pixels in the CIE XYZ (1931) color space from the scene
+ illuminant to the sRGB-standard
+ D65-illuminant
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Output values are expected to be in the range
+ (0,<wbr>1)
+ </td>
+
+ <td class="entry_notes">
+ Values outside (0,<wbr>1) should be clamped.<wbr> Need to
+ provide utilities to go from CCT (+hue?),<wbr> or (x,<wbr>y) white
+ point,<wbr> (or AWB mode) to matrix; use linear Bradford
+ algorithm.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.colorCorrection.mode">
+ <td class="entry_name">android.<wbr>color<wbr>Correction.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">TRANSFORM_MATRIX</span>
+ <span class="entry_type_enum_notes">Use the android.<wbr>color<wbr>Correction.<wbr>transform matrix
+ to do color conversion</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_control" class="section">control</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.control.aeAntibandingMode">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Antibanding<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">50HZ</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">60HZ</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Enum for controlling
+ antibanding
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+
+ android.<wbr>control.<wbr>ae<wbr>Available<wbr>Antibanding<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aeExposureCompensation">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Exposure<wbr>Compensation</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Adjustment to AE target image
+ brightness
+ </td>
+
+ <td class="entry_units">
+ count of positive/<wbr>negative EV steps
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ For example,<wbr> if EV step is 0.<wbr>333,<wbr> '6' will mean an
+ exposure compensation of +2 EV; -3 will mean an exposure
+ compensation of -1
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aeLock">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Lock</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Autoexposure lock is disabled; the AE algorithm
+ is free to update its parameters.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ <span class="entry_type_enum_notes">Autoexposure lock is enabled; the AE algorithm
+ must not update the exposure and sensitivity parameters
+ while the lock is active</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AE is currently locked to its latest
+ calculated values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Note that even when AE is locked,<wbr> the flash may be
+ fired if the AE mode is ON_<wbr>AUTO_<wbr>FLASH /<wbr> ON_<wbr>ALWAYS_<wbr>FLASH /<wbr>
+ ON_<wbr>AUTO_<wbr>FLASH_<wbr>REDEYE.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aeMode">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Autoexposure is disabled; sensor.<wbr>exposureTime
+ and sensor.<wbr>sensitivity are used</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ <span class="entry_type_enum_notes">Autoexposure is active,<wbr> no flash
+ control</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON_AUTO_FLASH</span>
+ <span class="entry_type_enum_notes">if flash exists Autoexposure is active,<wbr> auto
+ flash control; flash may be fired when precapture
+ trigger is activated,<wbr> and for captures for which
+ captureIntent = STILL_<wbr>CAPTURE</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON_ALWAYS_FLASH</span>
+ <span class="entry_type_enum_notes">if flash exists Autoexposure is active,<wbr> auto
+ flash control for precapture trigger and always flash
+ when captureIntent = STILL_<wbr>CAPTURE</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON_AUTO_FLASH_REDEYE</span>
+ <span class="entry_type_enum_notes">optional Automatic red eye reduction with flash.<wbr>
+ If deemed necessary,<wbr> red eye reduction sequence should
+ fire when precapture trigger is activated,<wbr> and final
+ flash should fire when captureIntent =
+ STILL_<wbr>CAPTURE</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AE is currently updating the sensor
+ exposure and sensitivity fields
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>control.<wbr>ae<wbr>Available<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ Only effective if android.<wbr>control.<wbr>mode =
+ AUTO
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aeRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for
+ metering
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Each area is a rectangle plus weight: xmin,<wbr> ymin,<wbr>
+ xmax,<wbr> ymax,<wbr> weight.<wbr> The coordinate system is based on the
+ active pixel array,<wbr> with (0,<wbr>0) being the top-left of the
+ active pixel array,<wbr> and
+ (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific metering area needs to be used by the HAL.<wbr> If
+ the metering region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aeTargetFpsRange">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Target<wbr>Fps<wbr>Range</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Range over which fps can be adjusted to
+ maintain exposure
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>control.<wbr>ae<wbr>Available<wbr>Target<wbr>Fps<wbr>Ranges
+ </td>
+
+ <td class="entry_notes">
+ Only constrains AE algorithm,<wbr> not manual control
+ of android.<wbr>sensor.<wbr>exposure<wbr>Time
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.aePrecaptureTrigger">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Precapture<wbr>Trigger</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">IDLE</span>
+ <span class="entry_type_enum_notes">The trigger is idle.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">START</span>
+ <span class="entry_type_enum_notes">The precapture metering sequence
+ must be started.<wbr> The exact effect of the precapture
+ trigger depends on the current AE mode and
+ state.<wbr></span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether the HAL must trigger precapture
+ metering.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ This entry is normally set to IDLE,<wbr> or is not
+ included at all in the request settings.<wbr> When included and
+ set to START,<wbr> the HAL must trigger the autoexposure
+ precapture metering sequence.<wbr> The effect of AE precapture
+ trigger depends on the current AE mode and state; see the
+ camera HAL device v3 header for details.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.afMode">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">The 3A routines do not control the lens;
+ android.<wbr>lens.<wbr>focus<wbr>Position is controlled by the
+ application</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ <span class="entry_type_enum_notes">if lens is not fixed focus.<wbr> Use
+ android.<wbr>lens.<wbr>minimum<wbr>Focus<wbr>Distance to determine if lens
+ is fixed focus In this mode,<wbr> the lens does not move
+ unless the autofocus trigger action is called.<wbr> When
+ that trigger is activated,<wbr> AF must transition to
+ ACTIVE_<wbr>SCAN,<wbr> then to the outcome of the scan (FOCUSED
+ or NOT_<wbr>FOCUSED).<wbr> Triggering cancel AF resets the lens
+ position to default,<wbr> and sets the AF state to
+ INACTIVE.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">MACRO</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the lens does not move unless the
+ autofocus trigger action is called.<wbr> When that trigger
+ is activated,<wbr> AF must transition to ACTIVE_<wbr>SCAN,<wbr> then
+ to the outcome of the scan (FOCUSED or NOT_<wbr>FOCUSED).<wbr>
+ Triggering cancel AF resets the lens position to
+ default,<wbr> and sets the AF state to
+ INACTIVE.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONTINUOUS_VIDEO</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream.<wbr> The focusing behavior
+ should be suitable for good quality video recording;
+ typically this means slower focus movement and no
+ overshoots.<wbr> When the AF trigger is not involved,<wbr> the AF
+ algorithm should start in INACTIVE state,<wbr> and then
+ transition into PASSIVE_<wbr>SCAN and PASSIVE_<wbr>FOCUSED states
+ as appropriate.<wbr> When the AF trigger is activated,<wbr> the
+ algorithm should immediately transition into AF_<wbr>FOCUSED
+ or AF_<wbr>NOT_<wbr>FOCUSED as appropriate,<wbr> and lock the lens
+ position until a cancel AF trigger is received.<wbr> Once
+ cancel is received,<wbr> the algorithm should transition
+ back to INACTIVE and resume passive scan.<wbr> Note that
+ this behavior is not identical to CONTINUOUS_<wbr>PICTURE,<wbr>
+ since an ongoing PASSIVE_<wbr>SCAN must immediately be
+ canceled.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONTINUOUS_PICTURE</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream.<wbr> The focusing behavior
+ should be suitable for still image capture; typically
+ this means focusing as fast as possible.<wbr> When the AF
+ trigger is not involved,<wbr> the AF algorithm should start
+ in INACTIVE state,<wbr> and then transition into
+ PASSIVE_<wbr>SCAN and PASSIVE_<wbr>FOCUSED states as appropriate
+ as it attempts to maintain focus.<wbr> When the AF trigger
+ is activated,<wbr> the algorithm should finish its
+ PASSIVE_<wbr>SCAN if active,<wbr> and then transition into
+ AF_<wbr>FOCUSED or AF_<wbr>NOT_<wbr>FOCUSED as appropriate,<wbr> and lock
+ the lens position until a cancel AF trigger is
+ received.<wbr> When the AF cancel trigger is activated,<wbr> the
+ algorithm should transition back to INACTIVE and then
+ act as if it has just been started.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">EDOF</span>
+ <span class="entry_type_enum_notes">Extended depth of field (digital focus).<wbr> AF
+ trigger is ignored,<wbr> AF state should always be
+ INACTIVE.<wbr></span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AF is currently enabled,<wbr> and what
+ mode it is set to
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.afRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for focus
+ estimation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Each area is a rectangle plus weight: xmin,<wbr> ymin,<wbr>
+ xmax,<wbr> ymax,<wbr> weight.<wbr> The coordinate system is based on the
+ active pixel array,<wbr> with (0,<wbr>0) being the top-left of the
+ active pixel array,<wbr> and
+ (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific focus area needs to be used by the HAL.<wbr> If
+ the focusing region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.afTrigger">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Trigger</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">IDLE</span>
+ <span class="entry_type_enum_notes">The trigger is idle.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">START</span>
+ <span class="entry_type_enum_notes">Autofocus must trigger now.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CANCEL</span>
+ <span class="entry_type_enum_notes">Autofocus must return to initial
+ state,<wbr> and cancel any active trigger.<wbr></span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether the HAL must trigger autofocus.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ This entry is normally set to IDLE,<wbr> or is not
+ included at all in the request settings.<wbr> When included and
+ set to START,<wbr> the HAL must trigger the autofocus
+ algorithm.<wbr> The effect of AF trigger depends on the current
+ AF mode and state; see the camera HAL device v3 header for
+ details.<wbr> When set to CANCEL,<wbr> the HAL must cancel any active
+ trigger,<wbr> and return to initial AF state.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.awbLock">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Lock</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Auto-whitebalance lock is disabled; the AWB
+ algorithm is free to update its parameters if in AUTO
+ mode.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ <span class="entry_type_enum_notes">Auto-whitebalance lock is enabled; the AWB
+ algorithm must not update the exposure and sensitivity
+ parameters while the lock is active</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AWB is currently locked to its
+ latest calculated values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Note that AWB lock is only meaningful for AUTO
+ mode; in other modes,<wbr> AWB is already fixed to a specific
+ setting
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.awbMode">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">INCANDESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FLUORESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">WARM_FLUORESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">DAYLIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CLOUDY_DAYLIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">TWILIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SHADE</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AWB is currently setting the color
+ transform fields,<wbr> and what its illumination target
+ is
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ [BC - AWB lock,<wbr>AWB modes]
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_AWB">AWB</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.awbRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for illuminant
+ estimation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Only used in AUTO mode.<wbr> Each area is a rectangle
+ plus weight: xmin,<wbr> ymin,<wbr> xmax,<wbr> ymax,<wbr> weight.<wbr> The
+ coordinate system is based on the active pixel array,<wbr>
+ with (0,<wbr>0) being the top-left of the active pixel array,<wbr>
+ and (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific metering area needs to be used by the HAL.<wbr> If
+ the metering region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.captureIntent">
+ <td class="entry_name">android.<wbr>control.<wbr>capture<wbr>Intent</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">CUSTOM</span>
+ <span class="entry_type_enum_notes">This request doesn't fall into the other
+ categories.<wbr> Default to preview-like
+ behavior.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PREVIEW</span>
+ <span class="entry_type_enum_notes">This request is for a preview-like usecase.<wbr> The
+ precapture trigger may be used to start off a metering
+ w/<wbr>flash sequence</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">STILL_CAPTURE</span>
+ <span class="entry_type_enum_notes">This request is for a still capture-type
+ usecase.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">VIDEO_RECORD</span>
+ <span class="entry_type_enum_notes">This request is for a video recording
+ usecase.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">VIDEO_SNAPSHOT</span>
+ <span class="entry_type_enum_notes">This request is for a video snapshot (still
+ image while recording video) usecase</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ZERO_SHUTTER_LAG</span>
+ <span class="entry_type_enum_notes">This request is for a ZSL usecase; the
+ application will stream full-resolution images and
+ reprocess one or several later for a final
+ capture</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Information to 3A routines about the purpose
+ of this capture,<wbr> to help decide optimal 3A
+ strategy
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ all must be supported
+ </td>
+
+ <td class="entry_notes">
+ Only used if android.<wbr>control.<wbr>mode != OFF.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.effectMode">
+ <td class="entry_name">android.<wbr>control.<wbr>effect<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">MONO</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">NEGATIVE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SOLARIZE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SEPIA</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">POSTERIZE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">WHITEBOARD</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BLACKBOARD</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AQUA</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether any special color effect is in use.<wbr>
+ Only used if android.<wbr>control.<wbr>mode != OFF
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>control.<wbr>available<wbr>Effects
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.mode">
+ <td class="entry_name">android.<wbr>control.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Full application control of pipeline.<wbr> All 3A
+ routines are disabled,<wbr> no other settings in
+ android.<wbr>control.<wbr>* have any effect</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ <span class="entry_type_enum_notes">Use settings for each individual 3A routine.<wbr>
+ Manual control of capture parameters is disabled.<wbr> All
+ controls in android.<wbr>control.<wbr>* besides sceneMode take
+ effect</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">USE_SCENE_MODE</span>
+ <span class="entry_type_enum_notes">Use specific scene mode.<wbr> Enabling this disables
+ control.<wbr>aeMode,<wbr> control.<wbr>awbMode and control.<wbr>afMode
+ controls; the HAL must ignore those settings while
+ USE_<wbr>SCENE_<wbr>MODE is active (except for FACE_<wbr>PRIORITY
+ scene mode).<wbr> Other control entries are still active.<wbr>
+ This setting can only be used if availableSceneModes !=
+ UNSUPPORTED</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Overall mode of 3A control
+ routines
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ all must be supported
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.sceneMode">
+ <td class="entry_name">android.<wbr>control.<wbr>scene<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">UNSUPPORTED</span>
+ <span class="entry_type_enum_value">0</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FACE_PRIORITY</span>
+ <span class="entry_type_enum_notes">if face detection support exists Use face
+ detection data to drive 3A routines.<wbr> If face detection
+ statistics are disabled,<wbr> should still operate correctly
+ (but not return face detection statistics to the
+ framework).<wbr> Unlike the other scene modes,<wbr> aeMode,<wbr>
+ awbMode,<wbr> and afMode remain active when FACE_<wbr>PRIORITY is
+ set.<wbr> This is due to compatibility concerns with the old
+ camera API</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ACTION</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PORTRAIT</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">LANDSCAPE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">NIGHT</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">NIGHT_PORTRAIT</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">THEATRE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BEACH</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SNOW</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SUNSET</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">STEADYPHOTO</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FIREWORKS</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SPORTS</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PARTY</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CANDLELIGHT</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BARCODE</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Which scene mode is active when
+ android.<wbr>control.<wbr>mode = SCENE_<wbr>MODE
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>control.<wbr>available<wbr>Scene<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.control.videoStabilizationMode">
+ <td class="entry_name">android.<wbr>control.<wbr>video<wbr>Stabilization<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether video stabilization is
+ active
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ If enabled,<wbr> video stabilization can modify the
+ android.<wbr>scaler.<wbr>crop<wbr>Region to keep the video stream
+ stabilized
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.control.aeAvailableAntibandingModes">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Available<wbr>Antibanding<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">list of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Which set of antibanding modes are
+ supported
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.aeAvailableModes">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Available<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">list of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Which subset of AE modes is
+ supported
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF,<wbr> ON must be supported.<wbr>
+ ON_<wbr>AUTO_<wbr>FLASH/<wbr>ON_<wbr>ALWAYS_<wbr>FLASH must be supported if flash
+ unit is available
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.aeAvailableTargetFpsRanges">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Available<wbr>Target<wbr>Fps<wbr>Ranges</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2 x n
+ </span>
+
+ <div class="entry_type_notes">list of pairs of frame rates</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of frame rate ranges supported by the
+ AE algorithm/<wbr>hardware
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.aeCompensationRange">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Compensation<wbr>Range</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum and minimum exposure compensation
+ setting,<wbr> in counts of
+ android.<wbr>control.<wbr>ae<wbr>Compensation<wbr>Step<wbr>Size
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ At least (-2,<wbr>2)/<wbr>(exp compensation step
+ size)
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.aeCompensationStep">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Compensation<wbr>Step</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Smallest step by which exposure compensation
+ can be changed
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ <= 1/<wbr>2
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.afAvailableModes">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Available<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">List of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of AF modes that can be
+ selected
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF must be included.<wbr> AUTO must be supported if
+ lens allows for changing focus
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.availableEffects">
+ <td class="entry_name">android.<wbr>control.<wbr>available<wbr>Effects</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">list of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ what subset of the full color effect enum
+ list is supported
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF must be listed
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.availableSceneModes">
+ <td class="entry_name">android.<wbr>control.<wbr>available<wbr>Scene<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">list of enums from android.<wbr>control.<wbr>scene<wbr>Mode,<wbr> plus UNSUPPORTED to indicate no scene modes are supported</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ what subset of the scene mode enum list is
+ supported.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ SCENE_<wbr>MODE_<wbr>FACE_<wbr>PRIORITY must be supported if face
+ detection is supported
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.availableVideoStabilizationModes">
+ <td class="entry_name">android.<wbr>control.<wbr>available<wbr>Video<wbr>Stabilization<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">List of enums.<wbr></div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of video stabilization modes that can
+ be supported
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF must be included
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.awbAvailableModes">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Available<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">List of enums (android.<wbr>control.<wbr>awb<wbr>Mode)</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF,<wbr> AUTO must be included
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.maxRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>max<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ For AE,<wbr> AWB,<wbr> and AF,<wbr> how many individual
+ regions can be listed for metering?
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 1
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.control.sceneModeOverrides">
+ <td class="entry_name">android.<wbr>control.<wbr>scene<wbr>Mode<wbr>Overrides</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3 x lengthavailablescenemodes
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of AE,<wbr> AWB,<wbr> and AF modes to use for
+ each available scene mode
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ For each listed scene mode,<wbr> lists the aeMode,<wbr>
+ awbMode,<wbr> and afMode that the HAL wants to use for that
+ scene mode.<wbr> For each entry,<wbr> the order is {aeMode,<wbr>
+ awbMode,<wbr> afMode} in order of increasing index
+ </td>
+
+ <td class="entry_notes">
+ When a scene mode is enabled,<wbr> the HAL is expected
+ to override aeMode,<wbr> awbMode,<wbr> and afMode with its
+ preferred settings for that scene mode.<wbr> To simplify
+ communication with old camera API applications,<wbr> the
+ service wants this override list in the static metadata.<wbr>
+ The order of this list matches that of
+ availableSceneModes,<wbr> with 3 entires for each scene mode.<wbr>
+ The overrides listed for SCENE_<wbr>MODE_<wbr>FACE_<wbr>PRIORITY are
+ ignored,<wbr> since for that mode,<wbr> the application-set aeMode,<wbr>
+ awbMode,<wbr> and afMode are used instead,<wbr> like they are when
+ android.<wbr>control.<wbr>mode is AUTO.<wbr> It is recommended that for
+ FACE_<wbr>PRIORITY,<wbr> the overrides should be set to 0.<wbr> As an
+ example,<wbr> if availableSceneModes is { FACE_<wbr>PRIORITY,<wbr>
+ ACTION,<wbr> NIGHT },<wbr> then the service expects this field to
+ have 9 entries; for example { 0 ,<wbr> 0,<wbr> 0,<wbr> ON_<wbr>AUTO_<wbr>FLASH,<wbr>
+ AUTO,<wbr> CONTINUOUS_<wbr>PICTURE,<wbr> ON_<wbr>AUTO_<wbr>FLASH,<wbr> INCANDESCENT,<wbr>
+ AUTO }
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.control.aePrecaptureId">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Precapture<wbr>Id</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The ID sent with the latest
+ CAMERA2_<wbr>TRIGGER_<wbr>PRECAPTURE_<wbr>METERING call
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Must be 0 if no
+ CAMERA2_<wbr>TRIGGER_<wbr>PRECAPTURE_<wbr>METERING trigger received yet
+ by HAL.<wbr> Always updated even if AE algorithm ignores the
+ trigger
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.aeRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for
+ metering
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Each area is a rectangle plus weight: xmin,<wbr> ymin,<wbr>
+ xmax,<wbr> ymax,<wbr> weight.<wbr> The coordinate system is based on the
+ active pixel array,<wbr> with (0,<wbr>0) being the top-left of the
+ active pixel array,<wbr> and
+ (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific metering area needs to be used by the HAL.<wbr> If
+ the metering region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.aeState">
+ <td class="entry_name">android.<wbr>control.<wbr>ae<wbr>State</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">INACTIVE</span>
+ <span class="entry_type_enum_notes">AE is off.<wbr> When a camera device is opened,<wbr> it starts in
+ this state.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SEARCHING</span>
+ <span class="entry_type_enum_notes">AE doesn't yet have a good set of control values
+ for the current scene</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONVERGED</span>
+ <span class="entry_type_enum_notes">AE has a good set of control values for the
+ current scene</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">LOCKED</span>
+ <span class="entry_type_enum_notes">AE has been locked (aeMode =
+ LOCKED)</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FLASH_REQUIRED</span>
+ <span class="entry_type_enum_notes">AE has a good set of control values,<wbr> but flash
+ needs to be fired for good quality still
+ capture</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PRECAPTURE</span>
+ <span class="entry_type_enum_notes">AE has been asked to do a precapture sequence
+ (through the
+ trigger_<wbr>action(CAMERA2_<wbr>TRIGGER_<wbr>PRECAPTURE_<wbr>METERING)
+ call),<wbr> and is currently executing it.<wbr> Once PRECAPTURE
+ completes,<wbr> AE will transition to CONVERGED or
+ FLASH_<wbr>REQUIRED as appropriate</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Current state of AE algorithm
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Whenever the AE algorithm state changes,<wbr> a
+ MSG_<wbr>AUTOEXPOSURE notification must be send if a
+ notification callback is registered.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.afMode">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">The 3A routines do not control the lens;
+ android.<wbr>lens.<wbr>focus<wbr>Position is controlled by the
+ application</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ <span class="entry_type_enum_notes">if lens is not fixed focus.<wbr> Use
+ android.<wbr>lens.<wbr>minimum<wbr>Focus<wbr>Distance to determine if lens
+ is fixed focus In this mode,<wbr> the lens does not move
+ unless the autofocus trigger action is called.<wbr> When
+ that trigger is activated,<wbr> AF must transition to
+ ACTIVE_<wbr>SCAN,<wbr> then to the outcome of the scan (FOCUSED
+ or NOT_<wbr>FOCUSED).<wbr> Triggering cancel AF resets the lens
+ position to default,<wbr> and sets the AF state to
+ INACTIVE.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">MACRO</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the lens does not move unless the
+ autofocus trigger action is called.<wbr> When that trigger
+ is activated,<wbr> AF must transition to ACTIVE_<wbr>SCAN,<wbr> then
+ to the outcome of the scan (FOCUSED or NOT_<wbr>FOCUSED).<wbr>
+ Triggering cancel AF resets the lens position to
+ default,<wbr> and sets the AF state to
+ INACTIVE.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONTINUOUS_VIDEO</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream.<wbr> The focusing behavior
+ should be suitable for good quality video recording;
+ typically this means slower focus movement and no
+ overshoots.<wbr> When the AF trigger is not involved,<wbr> the AF
+ algorithm should start in INACTIVE state,<wbr> and then
+ transition into PASSIVE_<wbr>SCAN and PASSIVE_<wbr>FOCUSED states
+ as appropriate.<wbr> When the AF trigger is activated,<wbr> the
+ algorithm should immediately transition into AF_<wbr>FOCUSED
+ or AF_<wbr>NOT_<wbr>FOCUSED as appropriate,<wbr> and lock the lens
+ position until a cancel AF trigger is received.<wbr> Once
+ cancel is received,<wbr> the algorithm should transition
+ back to INACTIVE and resume passive scan.<wbr> Note that
+ this behavior is not identical to CONTINUOUS_<wbr>PICTURE,<wbr>
+ since an ongoing PASSIVE_<wbr>SCAN must immediately be
+ canceled.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONTINUOUS_PICTURE</span>
+ <span class="entry_type_enum_notes">In this mode,<wbr> the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream.<wbr> The focusing behavior
+ should be suitable for still image capture; typically
+ this means focusing as fast as possible.<wbr> When the AF
+ trigger is not involved,<wbr> the AF algorithm should start
+ in INACTIVE state,<wbr> and then transition into
+ PASSIVE_<wbr>SCAN and PASSIVE_<wbr>FOCUSED states as appropriate
+ as it attempts to maintain focus.<wbr> When the AF trigger
+ is activated,<wbr> the algorithm should finish its
+ PASSIVE_<wbr>SCAN if active,<wbr> and then transition into
+ AF_<wbr>FOCUSED or AF_<wbr>NOT_<wbr>FOCUSED as appropriate,<wbr> and lock
+ the lens position until a cancel AF trigger is
+ received.<wbr> When the AF cancel trigger is activated,<wbr> the
+ algorithm should transition back to INACTIVE and then
+ act as if it has just been started.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">EDOF</span>
+ <span class="entry_type_enum_notes">Extended depth of field (digital focus).<wbr> AF
+ trigger is ignored,<wbr> AF state should always be
+ INACTIVE.<wbr></span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AF is currently enabled,<wbr> and what
+ mode it is set to
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.afRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for focus
+ estimation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Each area is a rectangle plus weight: xmin,<wbr> ymin,<wbr>
+ xmax,<wbr> ymax,<wbr> weight.<wbr> The coordinate system is based on the
+ active pixel array,<wbr> with (0,<wbr>0) being the top-left of the
+ active pixel array,<wbr> and
+ (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific focus area needs to be used by the HAL.<wbr> If
+ the focusing region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.afState">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>State</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">INACTIVE</span>
+ <span class="entry_type_enum_notes">AF off or has not yet tried to scan/<wbr>been asked
+ to scan.<wbr> When a camera device is opened,<wbr> it starts in
+ this state.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PASSIVE_SCAN</span>
+ <span class="entry_type_enum_notes">if CONTINUOUS_<wbr>* modes are supported AF is
+ currently doing an AF scan initiated by a continuous
+ autofocus mode</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">PASSIVE_FOCUSED</span>
+ <span class="entry_type_enum_notes">if CONTINUOUS_<wbr>* modes are supported AF currently
+ believes it is in focus,<wbr> but may restart scanning at
+ any time.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ACTIVE_SCAN</span>
+ <span class="entry_type_enum_notes">if AUTO or MACRO modes are supported AF is doing
+ an AF scan because it was triggered by AF
+ trigger</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FOCUSED_LOCKED</span>
+ <span class="entry_type_enum_notes">if any AF mode besides OFF is supported AF
+ believes it is focused correctly and is
+ locked</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">NOT_FOCUSED_LOCKED</span>
+ <span class="entry_type_enum_notes">if any AF mode besides OFF is supported AF has
+ failed to focus successfully and is
+ locked</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Current state of AF algorithm
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Whenever the AF algorithm state changes,<wbr> a
+ MSG_<wbr>AUTOFOCUS notification must be send if a notification
+ callback is registered.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.afTriggerId">
+ <td class="entry_name">android.<wbr>control.<wbr>af<wbr>Trigger<wbr>Id</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The ID sent with the latest
+ CAMERA2_<wbr>TRIGGER_<wbr>AUTOFOCUS call
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Must be 0 if no CAMERA2_<wbr>TRIGGER_<wbr>AUTOFOCUS trigger
+ received yet by HAL.<wbr> Always updated even if AF algorithm
+ ignores the trigger
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.awbMode">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">INCANDESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FLUORESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">WARM_FLUORESCENT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">DAYLIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CLOUDY_DAYLIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">TWILIGHT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SHADE</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether AWB is currently setting the color
+ transform fields,<wbr> and what its illumination target
+ is
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ [BC - AWB lock,<wbr>AWB modes]
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_AWB">AWB</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.awbRegions">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>Regions</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 5 x area_count
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of areas to use for illuminant
+ estimation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Only used in AUTO mode.<wbr> Each area is a rectangle
+ plus weight: xmin,<wbr> ymin,<wbr> xmax,<wbr> ymax,<wbr> weight.<wbr> The
+ coordinate system is based on the active pixel array,<wbr>
+ with (0,<wbr>0) being the top-left of the active pixel array,<wbr>
+ and (android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>width,<wbr>
+ android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size.<wbr>height) being the
+ bottom-right point of the active pixel array.<wbr> The weight
+ should be nonnegative.<wbr> If all regions have 0 weight,<wbr> then
+ no specific metering area needs to be used by the HAL.<wbr> If
+ the metering region is outside the current
+ android.<wbr>scaler.<wbr>crop<wbr>Region,<wbr> the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.awbState">
+ <td class="entry_name">android.<wbr>control.<wbr>awb<wbr>State</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">INACTIVE</span>
+ <span class="entry_type_enum_notes">AWB is not in auto mode.<wbr> When a camera device is opened,<wbr> it
+ starts in this state.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SEARCHING</span>
+ <span class="entry_type_enum_notes">AWB doesn't yet have a good set of control
+ values for the current scene</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CONVERGED</span>
+ <span class="entry_type_enum_notes">AWB has a good set of control values for the
+ current scene</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">LOCKED</span>
+ <span class="entry_type_enum_notes">AE has been locked (aeMode =
+ LOCKED)</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Current state of AWB algorithm
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Whenever the AWB algorithm state changes,<wbr> a
+ MSG_<wbr>AUTOWHITEBALANCE notification must be send if a
+ notification callback is registered.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.control.mode">
+ <td class="entry_name">android.<wbr>control.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Full application control of pipeline.<wbr> All 3A
+ routines are disabled,<wbr> no other settings in
+ android.<wbr>control.<wbr>* have any effect</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">AUTO</span>
+ <span class="entry_type_enum_notes">Use settings for each individual 3A routine.<wbr>
+ Manual control of capture parameters is disabled.<wbr> All
+ controls in android.<wbr>control.<wbr>* besides sceneMode take
+ effect</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">USE_SCENE_MODE</span>
+ <span class="entry_type_enum_notes">Use specific scene mode.<wbr> Enabling this disables
+ control.<wbr>aeMode,<wbr> control.<wbr>awbMode and control.<wbr>afMode
+ controls; the HAL must ignore those settings while
+ USE_<wbr>SCENE_<wbr>MODE is active (except for FACE_<wbr>PRIORITY
+ scene mode).<wbr> Other control entries are still active.<wbr>
+ This setting can only be used if availableSceneModes !=
+ UNSUPPORTED</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Overall mode of 3A control
+ routines
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ all must be supported
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_demosaic" class="section">demosaic</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.demosaic.mode">
+ <td class="entry_name">android.<wbr>demosaic.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Minimal or no slowdown of frame rate compared to
+ Bayer RAW output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">High-quality may reduce output frame
+ rate</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Controls the quality of the demosaicing
+ processing
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_edge" class="section">edge</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.edge.mode">
+ <td class="entry_name">android.<wbr>edge.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No edge enhancement is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operation mode for edge
+ enhancement
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.edge.strength">
+ <td class="entry_name">android.<wbr>edge.<wbr>strength</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Control the amount of edge enhancement
+ applied to the images
+ </td>
+
+ <td class="entry_units">
+ 1-10; 10 is maximum sharpening
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.edge.mode">
+ <td class="entry_name">android.<wbr>edge.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No edge enhancement is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operation mode for edge
+ enhancement
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_flash" class="section">flash</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.flash.firingPower">
+ <td class="entry_name">android.<wbr>flash.<wbr>firing<wbr>Power</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Power for flash firing/<wbr>torch
+ </td>
+
+ <td class="entry_units">
+ 10 is max power; 0 is no flash.<wbr> Linear
+ </td>
+
+ <td class="entry_range">
+ 0 - 10
+ </td>
+
+ <td class="entry_notes">
+ Power for snapshot may use a different scale than
+ for torch mode.<wbr> Only one entry for torch mode will be
+ used
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.flash.firingTime">
+ <td class="entry_name">android.<wbr>flash.<wbr>firing<wbr>Time</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Firing time of flash relative to start of
+ exposure
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ 0-(exposure time-flash duration)
+ </td>
+
+ <td class="entry_notes">
+ Clamped to (0,<wbr> exposure time - flash
+ duration).<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.flash.mode">
+ <td class="entry_name">android.<wbr>flash.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Do not fire the flash for this
+ capture</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SINGLE</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Fire flash
+ for this capture based on firingPower,<wbr>
+ firingTime.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">TORCH</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Flash
+ continuously on,<wbr> power set by
+ firingPower</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Select flash operation mode
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.flash.info.available">
+ <td class="entry_name">android.<wbr>flash.<wbr>info.<wbr>available</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether this camera has a
+ flash
+ </td>
+
+ <td class="entry_units">
+ boolean (0 = false,<wbr> otherwise true)
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ If no flash,<wbr> none of the flash controls do
+ anything.<wbr> All other metadata should return 0
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.flash.info.chargeDuration">
+ <td class="entry_name">android.<wbr>flash.<wbr>info.<wbr>charge<wbr>Duration</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Time taken before flash can fire
+ again
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ 0-1e9
+ </td>
+
+ <td class="entry_notes">
+ 1 second too long/<wbr>too short for recharge? Should
+ this be power-dependent?
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+
+
+ <tr class="entry" id="static_android.flash.colorTemperature">
+ <td class="entry_name">android.<wbr>flash.<wbr>color<wbr>Temperature</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The x,<wbr>y whitepoint of the
+ flash
+ </td>
+
+ <td class="entry_units">
+ pair of floats
+ </td>
+
+ <td class="entry_range">
+ 0-1 for both
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.flash.maxEnergy">
+ <td class="entry_name">android.<wbr>flash.<wbr>max<wbr>Energy</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Max energy output of the flash for a full
+ power single flash
+ </td>
+
+ <td class="entry_units">
+ lumen-seconds
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.flash.firingPower">
+ <td class="entry_name">android.<wbr>flash.<wbr>firing<wbr>Power</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Power for flash firing/<wbr>torch
+ </td>
+
+ <td class="entry_units">
+ 10 is max power; 0 is no flash.<wbr> Linear
+ </td>
+
+ <td class="entry_range">
+ 0 - 10
+ </td>
+
+ <td class="entry_notes">
+ Power for snapshot may use a different scale than
+ for torch mode.<wbr> Only one entry for torch mode will be
+ used
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.flash.firingTime">
+ <td class="entry_name">android.<wbr>flash.<wbr>firing<wbr>Time</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Firing time of flash relative to start of
+ exposure
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ 0-(exposure time-flash duration)
+ </td>
+
+ <td class="entry_notes">
+ Clamped to (0,<wbr> exposure time - flash
+ duration).<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.flash.mode">
+ <td class="entry_name">android.<wbr>flash.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">Do not fire the flash for this
+ capture</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SINGLE</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Fire flash
+ for this capture based on firingPower,<wbr>
+ firingTime.<wbr></span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">TORCH</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Flash
+ continuously on,<wbr> power set by
+ firingPower</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Select flash operation mode
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.flash.state">
+ <td class="entry_name">android.<wbr>flash.<wbr>state</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">UNAVAILABLE</span>
+ <span class="entry_type_enum_notes">No flash on camera</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CHARGING</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Flash is
+ charging and cannot be fired</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">READY</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Flash is
+ ready to fire</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FIRED</span>
+ <span class="entry_type_enum_notes">if android.<wbr>flash.<wbr>available is true Flash fired
+ for this capture</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Current state of the flash
+ unit
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_geometric" class="section">geometric</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.geometric.mode">
+ <td class="entry_name">android.<wbr>geometric.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No geometric correction is
+ applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operating mode of geometric
+ correction
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.geometric.strength">
+ <td class="entry_name">android.<wbr>geometric.<wbr>strength</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Control the amount of shading correction
+ applied to the images
+ </td>
+
+ <td class="entry_units">
+ unitless: 1-10; 10 is full shading
+ compensation
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_hotPixel" class="section">hotPixel</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.hotPixel.mode">
+ <td class="entry_name">android.<wbr>hot<wbr>Pixel.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No hot pixel correction can be
+ applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Frame rate must not be reduced compared to raw
+ Bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Set operational mode for hot pixel
+ correction
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.hotPixel.info.map">
+ <td class="entry_name">android.<wbr>hot<wbr>Pixel.<wbr>info.<wbr>map</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2 x n
+ </span>
+
+ <div class="entry_type_notes">list of coordinates based on android.<wbr>sensor.<wbr>pixel<wbr>Array<wbr>Size</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Location of hot/<wbr>defective pixels on
+ sensor
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.hotPixel.mode">
+ <td class="entry_name">android.<wbr>hot<wbr>Pixel.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No hot pixel correction can be
+ applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Frame rate must not be reduced compared to raw
+ Bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Set operational mode for hot pixel
+ correction
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_jpeg" class="section">jpeg</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.jpeg.gpsCoordinates">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Coordinates</td>
+ <td class="entry_type">
+ <span class="entry_type_name">double</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3
+ </span>
+
+ <div class="entry_type_notes">latitude,<wbr> longitude,<wbr> altitude.<wbr> First two in degrees,<wbr> the third in meters</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ GPS coordinates to include in output JPEG
+ EXIF
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ (-180 - 180],<wbr> [-90,<wbr>90],<wbr> [-inf,<wbr> inf]
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.gpsProcessingMethod">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Processing<wbr>Method</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ 32 characters describing GPS algorithm to
+ include in EXIF
+ </td>
+
+ <td class="entry_units">
+ UTF-8 null-terminated string
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.gpsTimestamp">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Timestamp</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Time GPS fix was made to include in
+ EXIF
+ </td>
+
+ <td class="entry_units">
+ UTC in seconds since January 1,<wbr> 1970
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.orientation">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>orientation</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Orientation of JPEG image to
+ write
+ </td>
+
+ <td class="entry_units">
+ Degrees in multiples of 90
+ </td>
+
+ <td class="entry_range">
+ 0,<wbr> 90,<wbr> 180,<wbr> 270
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.quality">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>quality</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Compression quality of the final JPEG
+ image
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 1-100; larger is higher quality
+ </td>
+
+ <td class="entry_notes">
+ 85-95 is typical usage range
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.thumbnailQuality">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>thumbnail<wbr>Quality</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Compression quality of JPEG
+ thumbnail
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 1-100; larger is higher quality
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.jpeg.thumbnailSize">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>thumbnail<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Resolution of embedded JPEG
+ thumbnail
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ from android.<wbr>jpeg.<wbr>available<wbr>Thumbnail<wbr>Sizes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.jpeg.availableThumbnailSizes">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>available<wbr>Thumbnail<wbr>Sizes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2 x n
+ </span>
+
+ <div class="entry_type_notes">list of resolution pairs</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Supported resolutions for the JPEG
+ thumbnail
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must include at least one valid resolution,<wbr> plus
+ (0,<wbr>0) for no thumbnail generation
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.jpeg.maxSize">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>max<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum size in bytes for the compressed
+ JPEG buffer
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must be large enough to fit any JPEG produced by
+ the camera
+ </td>
+
+ <td class="entry_notes">
+ This is used for sizing the gralloc buffers for
+ JPEG
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.jpeg.gpsCoordinates">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Coordinates</td>
+ <td class="entry_type">
+ <span class="entry_type_name">double</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3
+ </span>
+
+ <div class="entry_type_notes">latitude,<wbr> longitude,<wbr> altitude.<wbr> First two in degrees,<wbr> the third in meters</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ GPS coordinates to include in output JPEG
+ EXIF
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ (-180 - 180],<wbr> [-90,<wbr>90],<wbr> [-inf,<wbr> inf]
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.gpsProcessingMethod">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Processing<wbr>Method</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ 32 characters describing GPS algorithm to
+ include in EXIF
+ </td>
+
+ <td class="entry_units">
+ UTF-8 null-terminated string
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.gpsTimestamp">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>gps<wbr>Timestamp</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Time GPS fix was made to include in
+ EXIF
+ </td>
+
+ <td class="entry_units">
+ UTC in seconds since January 1,<wbr> 1970
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.orientation">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>orientation</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Orientation of JPEG image to
+ write
+ </td>
+
+ <td class="entry_units">
+ Degrees in multiples of 90
+ </td>
+
+ <td class="entry_range">
+ 0,<wbr> 90,<wbr> 180,<wbr> 270
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.quality">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>quality</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Compression quality of the final JPEG
+ image
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 1-100; larger is higher quality
+ </td>
+
+ <td class="entry_notes">
+ 85-95 is typical usage range
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.size">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The size of the compressed JPEG image,<wbr> in
+ bytes
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ If no JPEG output is produced for the request,<wbr>
+ this must be 0.<wbr> Otherwise,<wbr> this describes the real size
+ of the compressed JPEG image placed in the output stream.<wbr>
+ More specifically,<wbr> if android.<wbr>jpeg.<wbr>max<wbr>Size = 1000000,<wbr> and
+ a specific capture has android.<wbr>jpeg.<wbr>size = 500000,<wbr> then
+ the output buffer from the JPEG stream will be 1000000
+ bytes,<wbr> of which the first 500000 make up the real
+ data.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.thumbnailQuality">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>thumbnail<wbr>Quality</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Compression quality of JPEG
+ thumbnail
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 1-100; larger is higher quality
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.jpeg.thumbnailSize">
+ <td class="entry_name">android.<wbr>jpeg.<wbr>thumbnail<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Resolution of embedded JPEG
+ thumbnail
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ from android.<wbr>jpeg.<wbr>available<wbr>Thumbnail<wbr>Sizes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_lens" class="section">lens</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.lens.aperture">
+ <td class="entry_name">android.<wbr>lens.<wbr>aperture</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Size of the lens aperture
+ </td>
+
+ <td class="entry_units">
+ f-number (f/<wbr>NNN)
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>info.<wbr>available<wbr>Apertures
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr> Can only
+ pick from supported list
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.lens.filterDensity">
+ <td class="entry_name">android.<wbr>lens.<wbr>filter<wbr>Density</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ State of lens neutral density
+ filter(s)
+ </td>
+
+ <td class="entry_units">
+ number of stops of filtering
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>info.<wbr>available<wbr>Filter<wbr>Densities
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr> Can only
+ pick from supported list
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.lens.focalLength">
+ <td class="entry_name">android.<wbr>lens.<wbr>focal<wbr>Length</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Lens optical zoom setting
+ </td>
+
+ <td class="entry_units">
+ focal length in mm
+ </td>
+
+ <td class="entry_range">
+ > 0
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.lens.focusDistance">
+ <td class="entry_name">android.<wbr>lens.<wbr>focus<wbr>Distance</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Distance to plane of sharpest focus,<wbr>
+ measured from frontmost surface of the lens
+ </td>
+
+ <td class="entry_units">
+ diopters (1/<wbr>m)
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ 0 = infinity focus.<wbr> Used value should be clamped
+ to (0,<wbr>minimum focus distance)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.lens.opticalStabilizationMode">
+ <td class="entry_name">android.<wbr>lens.<wbr>optical<wbr>Stabilization<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether optical image stabilization is
+ enabled.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>available<wbr>Optical<wbr>Stabilization
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.lens.info.availableApertures">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>available<wbr>Apertures</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of supported aperture
+ values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ one entry required,<wbr> > 0
+ </td>
+
+ <td class="entry_notes">
+ If variable aperture not available,<wbr> only setting
+ should be for the fixed aperture
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.availableFilterDensities">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>available<wbr>Filter<wbr>Densities</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of supported ND filter
+ values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ one entry required,<wbr> >= 0
+ </td>
+
+ <td class="entry_notes">
+ If not available,<wbr> only setting is 0.<wbr> Otherwise,<wbr>
+ lists the available exposure index values for dimming
+ (2 would mean the filter is set to reduce incoming
+ light by two stops)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.availableFocalLengths">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>available<wbr>Focal<wbr>Lengths</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">the list of available focal lengths</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ If fitted with optical zoom,<wbr> what focal
+ lengths are available.<wbr> If not,<wbr> the static focal
+ length
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ > 0
+ </td>
+
+ <td class="entry_notes">
+ If optical zoom not supported,<wbr> only one value
+ should be reported
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.availableOpticalStabilization">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>available<wbr>Optical<wbr>Stabilization</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">list of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of supported optical image
+ stabilization modes
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.geometricCorrectionMap">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>geometric<wbr>Correction<wbr>Map</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2 x 3 x n x m
+ </span>
+
+ <div class="entry_type_notes">2D array of destination coordinate pairs for uniform grid points in source image,<wbr> per color channel.<wbr> Size in the range of 2x3x40x30</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A low-resolution map for correction of
+ geometric distortions and chromatic aberrations,<wbr> per
+ color channel
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ N,<wbr> M >= 2
+ </td>
+
+ <td class="entry_notes">
+ [DNG wants a function instead].<wbr> What's easiest
+ for implementers? With an array size (M,<wbr> N),<wbr> entry (i,<wbr>
+ j) provides the destination for pixel (i/<wbr>(M-1) * width,<wbr>
+ j/<wbr>(N-1) * height).<wbr> Data is row-major,<wbr> with each array
+ entry being ( (X,<wbr> Y)_<wbr>r,<wbr> (X,<wbr> Y)_<wbr>g,<wbr> (X,<wbr> Y)_<wbr>b ) )
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.geometricCorrectionMapSize">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>geometric<wbr>Correction<wbr>Map<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">width and height of geometric correction map</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Dimensions of geometric correction
+ map
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Both values >= 2
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.hyperfocalDistance">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>hyperfocal<wbr>Distance</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Hyperfocal distance for this lens; set to
+ 0 if fixed focus
+ </td>
+
+ <td class="entry_units">
+ diopters
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ The hyperfocal distance is used for the old
+ API's 'fixed' setting
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.minimumFocusDistance">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>minimum<wbr>Focus<wbr>Distance</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Shortest distance from frontmost surface
+ of the lens that can be focused correctly
+ </td>
+
+ <td class="entry_units">
+ diopters
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ If the lens is fixed-focus,<wbr> this should be
+ 0
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.shadingMap">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>shading<wbr>Map</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3 x n x m
+ </span>
+
+ <div class="entry_type_notes">2D array of float gain factors per channel to correct for lens falloff.<wbr> Should be on the order of 3x40x30</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A low-resolution map of lens shading,<wbr> per
+ color channel
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Each gain factor is >= 1
+ </td>
+
+ <td class="entry_notes">
+ Assume bilinear interpolation of map.<wbr> The least
+ shaded section of the image should have a gain factor
+ of 1; all other sections should have gains above
+ 1.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.info.shadingMapSize">
+ <td class="entry_name">android.<wbr>lens.<wbr>info.<wbr>shading<wbr>Map<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">width and height of lens shading map</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Dimensions of lens shading
+ map
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Both values >= 1
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+
+
+ <tr class="entry" id="static_android.lens.facing">
+ <td class="entry_name">android.<wbr>lens.<wbr>facing</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">FRONT</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BACK</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Direction the camera faces relative to
+ device screen
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.opticalAxisAngle">
+ <td class="entry_name">android.<wbr>lens.<wbr>optical<wbr>Axis<wbr>Angle</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">degrees.<wbr> First defines the angle of separation between the perpendicular to the screen and the camera optical axis.<wbr> The second then defines the clockwise rotation of the optical axis from native device up.<wbr></div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Relative angle of camera optical axis to the
+ perpendicular axis from the display
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ [0-90) for first angle,<wbr> [0-360) for second
+ </td>
+
+ <td class="entry_notes">
+ Examples: (0,<wbr>0) means that the camera optical axis
+ is perpendicular to the display surface; (45,<wbr>0) means
+ that the camera points 45 degrees up when device is held
+ upright; (45,<wbr>90) means the camera points 45 degrees to
+ the right when the device is held upright.<wbr> Use FACING
+ field to determine perpendicular outgoing
+ direction
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.lens.position">
+ <td class="entry_name">android.<wbr>lens.<wbr>position</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3, location in mm, in the sensor coordinate
+ system
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Coordinates of camera optical axis on
+ device
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.lens.aperture">
+ <td class="entry_name">android.<wbr>lens.<wbr>aperture</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Size of the lens aperture
+ </td>
+
+ <td class="entry_units">
+ f-number (f/<wbr>NNN)
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>info.<wbr>available<wbr>Apertures
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr> Can only
+ pick from supported list
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.filterDensity">
+ <td class="entry_name">android.<wbr>lens.<wbr>filter<wbr>Density</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ State of lens neutral density
+ filter(s)
+ </td>
+
+ <td class="entry_units">
+ number of stops of filtering
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>info.<wbr>available<wbr>Filter<wbr>Densities
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr> Can only
+ pick from supported list
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.focalLength">
+ <td class="entry_name">android.<wbr>lens.<wbr>focal<wbr>Length</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Lens optical zoom setting
+ </td>
+
+ <td class="entry_units">
+ focal length in mm
+ </td>
+
+ <td class="entry_range">
+ > 0
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.focusDistance">
+ <td class="entry_name">android.<wbr>lens.<wbr>focus<wbr>Distance</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Distance to plane of sharpest focus,<wbr>
+ measured from frontmost surface of the lens
+ </td>
+
+ <td class="entry_units">
+ diopters (1/<wbr>m)
+ </td>
+
+ <td class="entry_range">
+ >= 0
+ </td>
+
+ <td class="entry_notes">
+ Should be zero for fixed-focus cameras
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.focusRange">
+ <td class="entry_name">android.<wbr>lens.<wbr>focus<wbr>Range</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The range of scene distances that are in
+ sharp focus (depth of field)
+ </td>
+
+ <td class="entry_units">
+ pair of focus distances in diopters: (near,<wbr>
+ far)
+ </td>
+
+ <td class="entry_range">
+ >=0
+ </td>
+
+ <td class="entry_notes">
+ If variable focus not supported,<wbr> can still report
+ fixed depth of field range
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.opticalStabilizationMode">
+ <td class="entry_name">android.<wbr>lens.<wbr>optical<wbr>Stabilization<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ <span class="entry_type_enum_optional">optional</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Whether optical image stabilization is
+ enabled.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>lens.<wbr>available<wbr>Optical<wbr>Stabilization
+ </td>
+
+ <td class="entry_notes">
+ Will not be supported on most devices.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.lens.state">
+ <td class="entry_name">android.<wbr>lens.<wbr>state</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">STATIONARY</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Current lens status
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_noiseReduction" class="section">noiseReduction</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.noiseReduction.mode">
+ <td class="entry_name">android.<wbr>noise<wbr>Reduction.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No noise reduction is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">May slow down frame rate to provide highest
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Mode of operation for the noise reduction
+ algorithm
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>noise<wbr>Reduction.<wbr>available<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.noiseReduction.strength">
+ <td class="entry_name">android.<wbr>noise<wbr>Reduction.<wbr>strength</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Control the amount of noise reduction
+ applied to the images
+ </td>
+
+ <td class="entry_units">
+ 1-10; 10 is max noise reduction
+ </td>
+
+ <td class="entry_range">
+ 1 - 10
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.noiseReduction.mode">
+ <td class="entry_name">android.<wbr>noise<wbr>Reduction.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No noise reduction is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">May slow down frame rate to provide highest
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Mode of operation for the noise reduction
+ algorithm
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>noise<wbr>Reduction.<wbr>available<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_quirks" class="section">quirks</td></tr>
+
+
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.quirks.meteringCropRegion">
+ <td class="entry_name">android.<wbr>quirks.<wbr>metering<wbr>Crop<wbr>Region</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ If set to 1,<wbr> the camera service does not
+ scale 'normalized' coordinates with respect to the crop
+ region.<wbr> This applies to metering input (a{e,<wbr>f,<wbr>wb}Region
+ and output (face rectangles).<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Normalized coordinates refer to those in the
+ (-1000,<wbr>1000) range mentioned in the
+ android.<wbr>hardware.<wbr><wbr>Camera API.<wbr> HAL implementations should
+ instead always use and emit sensor array-relative
+ coordinates for all region data.<wbr> Does not need to be
+ listed in static metadata.<wbr> Support will be removed in
+ future versions of camera service.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.quirks.triggerAfWithAuto">
+ <td class="entry_name">android.<wbr>quirks.<wbr>trigger<wbr>Af<wbr>With<wbr>Auto</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ If set to 1,<wbr> then the camera service always
+ switches to FOCUS_<wbr>MODE_<wbr>AUTO before issuing a AF
+ trigger.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ HAL implementations should implement AF trigger
+ modes for AUTO,<wbr> MACRO,<wbr> CONTINUOUS_<wbr>FOCUS,<wbr> and
+ CONTINUOUS_<wbr>PICTURE modes instead of using this flag.<wbr> Does
+ not need to be listed in static metadata.<wbr> Support will be
+ removed in future versions of camera service
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.quirks.useZslFormat">
+ <td class="entry_name">android.<wbr>quirks.<wbr>use<wbr>Zsl<wbr>Format</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ If set to 1,<wbr> the camera service uses
+ CAMERA2_<wbr>PIXEL_<wbr>FORMAT_<wbr>ZSL instead of
+ HAL_<wbr>PIXEL_<wbr>FORMAT_<wbr>IMPLEMENTATION_<wbr>DEFINED for the zero
+ shutter lag stream
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ HAL implementations should use gralloc usage flags
+ to determine that a stream will be used for
+ zero-shutter-lag,<wbr> instead of relying on an explicit
+ format setting.<wbr> Does not need to be listed in static
+ metadata.<wbr> Support will be removed in future versions of
+ camera service.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_request" class="section">request</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.request.frameCount">
+ <td class="entry_name">android.<wbr>request.<wbr>frame<wbr>Count</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A frame counter set by the framework.<wbr> Must
+ be maintained unchanged in output frame
+ </td>
+
+ <td class="entry_units">
+ incrementing integer
+ </td>
+
+ <td class="entry_range">
+ Any int
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.request.id">
+ <td class="entry_name">android.<wbr>request.<wbr>id</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ An application-specified ID for the current
+ request.<wbr> Must be maintained unchanged in output
+ frame
+ </td>
+
+ <td class="entry_units">
+ arbitrary integer assigned by application
+ </td>
+
+ <td class="entry_range">
+ Any int
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.request.inputStreams">
+ <td class="entry_name">android.<wbr>request.<wbr>input<wbr>Streams</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List which camera reprocess stream is used
+ for the source of reprocessing data.<wbr>
+ </td>
+
+ <td class="entry_units">
+ List of camera reprocess stream IDs
+ </td>
+
+ <td class="entry_range">
+ Typically,<wbr> only one entry allowed,<wbr> must be a valid
+ reprocess stream ID.<wbr> If android.<wbr>jpeg.<wbr>needs<wbr>Thumbnail is
+ set,<wbr> then multiple reprocess streams may be included in a
+ single request; they must be different scaled versions of
+ the same image.<wbr>
+ </td>
+
+ <td class="entry_notes">
+ Only meaningful when android.<wbr>request.<wbr>type ==
+ REPROCESS.<wbr> Ignored otherwise
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.request.metadataMode">
+ <td class="entry_name">android.<wbr>request.<wbr>metadata<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">NONE</span>
+ <span class="entry_type_enum_notes">No metadata should be produced on output,<wbr> except
+ for application-bound buffer data.<wbr> If no
+ application-bound streams exist,<wbr> no frame should be
+ placed in the output frame queue.<wbr> If such streams
+ exist,<wbr> a frame should be placed on the output queue
+ with null metadata but with the necessary output buffer
+ information.<wbr> Timestamp information should still be
+ included with any output stream buffers</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FULL</span>
+ <span class="entry_type_enum_notes">All metadata should be produced.<wbr> Statistics will
+ only be produced if they are separately
+ enabled</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ How much metadata to produce on
+ output
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.request.outputStreams">
+ <td class="entry_name">android.<wbr>request.<wbr>output<wbr>Streams</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Lists which camera output streams image data
+ from this capture must be sent to
+ </td>
+
+ <td class="entry_units">
+ List of camera stream IDs
+ </td>
+
+ <td class="entry_range">
+ List must only include streams that have been
+ created
+ </td>
+
+ <td class="entry_notes">
+ If no output streams are listed,<wbr> then the image
+ data should simply be discarded.<wbr> The image data must
+ still be captured for metadata and statistics production,<wbr>
+ and the lens and flash must operate as requested.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.request.type">
+ <td class="entry_name">android.<wbr>request.<wbr>type</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">CAPTURE</span>
+ <span class="entry_type_enum_notes">Capture a new image from the imaging hardware,<wbr>
+ and process it according to the
+ settings</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">REPROCESS</span>
+ <span class="entry_type_enum_notes">Process previously captured data; the
+ android.<wbr>request.<wbr>input<wbr>Stream parameter determines the
+ source reprocessing stream.<wbr> TODO: Mark dynamic metadata
+ needed for reprocessing with [RP]</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The type of the request; either CAPTURE or
+ REPROCESS
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.request.maxNumOutputStreams">
+ <td class="entry_name">android.<wbr>request.<wbr>max<wbr>Num<wbr>Output<wbr>Streams</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 3
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ How many output streams can be allocated at
+ the same time for each type of stream
+ </td>
+
+ <td class="entry_units">
+ The number of raw sensor streams; the number of
+ processed,<wbr> uncompressed streams; and the number of
+ JPEG-compressed streams
+ </td>
+
+ <td class="entry_range">
+ >=1 for Raw and JPEG-compressed stream.<wbr> >= 3
+ for processed,<wbr> uncompressed streams
+ </td>
+
+ <td class="entry_notes">
+ Video snapshot with preview callbacks requires 3
+ processed streams (preview,<wbr> record,<wbr> app callbacks) and
+ one JPEG stream (snapshot)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.request.maxNumReprocessStreams">
+ <td class="entry_name">android.<wbr>request.<wbr>max<wbr>Num<wbr>Reprocess<wbr>Streams</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 1
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ How many reprocessing streams of any type
+ can be allocated at the same time
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 1
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.request.frameCount">
+ <td class="entry_name">android.<wbr>request.<wbr>frame<wbr>Count</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Number of frames captured since
+ open()
+ </td>
+
+ <td class="entry_units">
+ count of frames
+ </td>
+
+ <td class="entry_range">
+ > 0
+ </td>
+
+ <td class="entry_notes">
+ Reset on release()
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.request.id">
+ <td class="entry_name">android.<wbr>request.<wbr>id</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ An application-specified ID for the current
+ request.<wbr> Must be maintained unchanged in output
+ frame
+ </td>
+
+ <td class="entry_units">
+ arbitrary integer assigned by application
+ </td>
+
+ <td class="entry_range">
+ Any int
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.request.metadataMode">
+ <td class="entry_name">android.<wbr>request.<wbr>metadata<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">NONE</span>
+ <span class="entry_type_enum_notes">No metadata should be produced on output,<wbr> except
+ for application-bound buffer data.<wbr> If no
+ application-bound streams exist,<wbr> no frame should be
+ placed in the output frame queue.<wbr> If such streams
+ exist,<wbr> a frame should be placed on the output queue
+ with null metadata but with the necessary output buffer
+ information.<wbr> Timestamp information should still be
+ included with any output stream buffers</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FULL</span>
+ <span class="entry_type_enum_notes">All metadata should be produced.<wbr> Statistics will
+ only be produced if they are separately
+ enabled</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ How much metadata to produce on
+ output
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.request.outputStreams">
+ <td class="entry_name">android.<wbr>request.<wbr>output<wbr>Streams</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Lists which camera output streams image data
+ from this capture must be sent to
+ </td>
+
+ <td class="entry_units">
+ List of camera stream IDs
+ </td>
+
+ <td class="entry_range">
+ List must only include streams that have been
+ created
+ </td>
+
+ <td class="entry_notes">
+ If no output streams are listed,<wbr> then the image
+ data should simply be discarded.<wbr> The image data must
+ still be captured for metadata and statistics production,<wbr>
+ and the lens and flash must operate as requested.<wbr>
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_scaler" class="section">scaler</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.scaler.cropRegion">
+ <td class="entry_name">android.<wbr>scaler.<wbr>crop<wbr>Region</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 4
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ (x,<wbr> y,<wbr> width,<wbr> height).<wbr>
+<br>
+<br> A rectangle with the top-level corner of (x,<wbr>y) and size
+ (width,<wbr> height).<wbr> The region of the sensor that is used for
+ output.<wbr> Each stream must use this rectangle to produce its
+ output,<wbr> cropping to a smaller region if necessary to
+ maintain the stream's aspect ratio.<wbr>
+<br>
+<br> HAL2.<wbr>x uses only (x,<wbr> y,<wbr> width)
+ </td>
+
+ <td class="entry_units">
+ (x,<wbr>y) of top-left corner,<wbr> width and height of region
+ in pixels; (0,<wbr>0) is top-left corner of
+ android.<wbr>sensor.<wbr>active<wbr>Array<wbr>Size
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+
+ Any additional per-stream cropping must be done to
+ maximize the final pixel area of the stream.<wbr>
+<br>
+<br> For example,<wbr> if the crop region is set to a 4:3 aspect
+ ratio,<wbr> then 4:3 streams should use the exact crop
+ region.<wbr> 16:9 streams should further crop vertically
+ (letterbox).<wbr>
+<br>
+<br> Conversely,<wbr> if the crop region is set to a 16:9,<wbr> then 4:3
+ outputs should crop horizontally (pillarbox),<wbr> and 16:9
+ streams should match exactly.<wbr> These additional crops must
+ be centered within the crop region.<wbr>
+<br>
+<br> The output streams must maintain square pixels at all
+ times,<wbr> no matter what the relative aspect ratios of the
+ crop region and the stream are.<wbr> Negative values for
+ corner are allowed for raw output if full pixel array is
+ larger than active pixel array.<wbr> Width and height may be
+ rounded to nearest larger supportable width,<wbr> especially
+ for raw output,<wbr> where only a few fixed scales may be
+ possible.<wbr> The width and height of the crop region cannot
+ be set to be smaller than floor( activeArraySize.<wbr>width /<wbr>
+ android.<wbr>scaler.<wbr>max<wbr>Digital<wbr>Zoom ) and floor(
+ activeArraySize.<wbr>height /<wbr> android.<wbr>scaler.<wbr>max<wbr>Digital<wbr>Zoom),<wbr>
+ respectively.<wbr>
+
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.scaler.availableFormats">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Formats</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">values from HAL_<wbr>PIXEL_<wbr>FORMAT_<wbr>* in /<wbr>system/<wbr>core/<wbr>include/<wbr>system/<wbr>graphics.<wbr>h</div>
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">RAW_SENSOR</span>
+ <span class="entry_type_enum_value">0x20</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">YV12</span>
+ <span class="entry_type_enum_value">0x32315659</span>
+ <span class="entry_type_enum_notes">YCrCb 4:2:0 Planar</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">YCrCb_420_SP</span>
+ <span class="entry_type_enum_value">0x11</span>
+ <span class="entry_type_enum_notes">NV21</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">IMPLEMENTATION_DEFINED</span>
+ <span class="entry_type_enum_value">0x22</span>
+ <span class="entry_type_enum_notes">Hal Implementation Defined</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">YCbCr_420_888</span>
+ <span class="entry_type_enum_value">0x23</span>
+ <span class="entry_type_enum_notes">Flexible YUV420 Format</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BLOB</span>
+ <span class="entry_type_enum_value">0x21</span>
+ <span class="entry_type_enum_notes">JPEG</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of app-visible formats
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableJpegMinDurations">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Jpeg<wbr>Min<wbr>Durations</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The minimum frame duration that is supported
+ for each resolution in availableJpegSizes.<wbr> Should
+ correspond to the frame duration when only that JPEG
+ stream is active,<wbr> with all processing set to
+ FAST
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ When multiple streams are configured,<wbr> the minimum
+ frame duration will be >= max(individual stream min
+ durations)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableJpegSizes">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Jpeg<wbr>Sizes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The resolutions available for output from
+ the JPEG block.<wbr> Listed as width x height
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must include: - sensor maximum resolution Should
+ include: - half/<wbr>quarter max resolution
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableMaxDigitalZoom">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Max<wbr>Digital<wbr>Zoom</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The maximum ratio between active area width
+ and crop region width,<wbr> or between active area height and
+ crop region height,<wbr> if the crop region height is larger
+ than width
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >=1
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableProcessedMinDurations">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Processed<wbr>Min<wbr>Durations</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The minimum frame duration that is supported
+ for each resolution in availableProcessedSizes.<wbr> Should
+ correspond to the frame duration when only that processed
+ stream is active,<wbr> with all processing set to
+ FAST
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ When multiple streams are configured,<wbr> the minimum
+ frame duration will be >= max(individual stream min
+ durations)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableProcessedSizes">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Processed<wbr>Sizes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The resolutions available for use with
+ processed output streams,<wbr> such as YV12,<wbr> NV12,<wbr> and
+ platform opaque YUV/<wbr>RGB streams to the GPU or video
+ encoders.<wbr> Listed as width,<wbr> height
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must include: - sensor maximum resolution -
+ standard QCIF,<wbr> 240p,<wbr> 480p,<wbr> 720p,<wbr> and 1080p
+ resolutions
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableRawMinDurations">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Raw<wbr>Min<wbr>Durations</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The minimum frame duration that is supported
+ for each raw resolution in availableRawSizes.<wbr> Should
+ correspond to the frame duration when only the raw stream
+ is active.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ When multiple streams are configured,<wbr> the minimum
+ frame duration will be >= max(individual stream min
+ durations)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.scaler.availableRawSizes">
+ <td class="entry_name">android.<wbr>scaler.<wbr>available<wbr>Raw<wbr>Sizes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The resolutions available for use with raw
+ sensor output streams,<wbr> listed as width,<wbr>
+ height
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must include: - sensor maximum resolution
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.scaler.cropRegion">
+ <td class="entry_name">android.<wbr>scaler.<wbr>crop<wbr>Region</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 4
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ (x,<wbr> y,<wbr> width,<wbr> height).<wbr>
+<br>
+<br> A rectangle with the top-level corner of (x,<wbr>y) and size
+ (width,<wbr> height).<wbr> The region of the sensor that is used for
+ output.<wbr> Each stream must use this rectangle to produce its
+ output,<wbr> cropping to a smaller region if necessary to
+ maintain the stream's aspect ratio.<wbr>
+<br>
+<br> HAL2.<wbr>x uses only (x,<wbr> y,<wbr> width)
+ </td>
+
+ <td class="entry_units">
+ (x,<wbr>y) of top-left corner,<wbr> width and height of region
+ in pixels; (0,<wbr>0) is top-left corner of
+ android.<wbr>sensor.<wbr>active<wbr>Array<wbr>Size
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+
+ Any additional per-stream cropping must be done to
+ maximize the final pixel area of the stream.<wbr>
+<br>
+<br> For example,<wbr> if the crop region is set to a 4:3 aspect
+ ratio,<wbr> then 4:3 streams should use the exact crop
+ region.<wbr> 16:9 streams should further crop vertically
+ (letterbox).<wbr>
+<br>
+<br> Conversely,<wbr> if the crop region is set to a 16:9,<wbr> then 4:3
+ outputs should crop horizontally (pillarbox),<wbr> and 16:9
+ streams should match exactly.<wbr> These additional crops must
+ be centered within the crop region.<wbr>
+<br>
+<br> The output streams must maintain square pixels at all
+ times,<wbr> no matter what the relative aspect ratios of the
+ crop region and the stream are.<wbr> Negative values for
+ corner are allowed for raw output if full pixel array is
+ larger than active pixel array.<wbr> Width and height may be
+ rounded to nearest larger supportable width,<wbr> especially
+ for raw output,<wbr> where only a few fixed scales may be
+ possible.<wbr> The width and height of the crop region cannot
+ be set to be smaller than floor( activeArraySize.<wbr>width /<wbr>
+ android.<wbr>scaler.<wbr>max<wbr>Digital<wbr>Zoom ) and floor(
+ activeArraySize.<wbr>height /<wbr> android.<wbr>scaler.<wbr>max<wbr>Digital<wbr>Zoom),<wbr>
+ respectively.<wbr>
+
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_sensor" class="section">sensor</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.sensor.exposureTime">
+ <td class="entry_name">android.<wbr>sensor.<wbr>exposure<wbr>Time</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Duration each pixel is exposed to
+ light
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>sensor.<wbr>info.<wbr>exposure<wbr>Time<wbr>Range
+ </td>
+
+ <td class="entry_notes">
+ 1/<wbr>10000 - 30 sec range.<wbr> No bulb mode
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.sensor.frameDuration">
+ <td class="entry_name">android.<wbr>sensor.<wbr>frame<wbr>Duration</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Duration from start of frame exposure to
+ start of next frame exposure
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ see android.<wbr>sensor.<wbr>info.<wbr>max<wbr>Frame<wbr>Duration,<wbr>
+ android.<wbr>scaler.<wbr>info.<wbr>available<wbr>Min<wbr>Frame<wbr>Durations
+ </td>
+
+ <td class="entry_notes">
+ Exposure time has priority,<wbr> so duration is set to
+ max(duration,<wbr> exposure time + overhead)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.sensor.sensitivity">
+ <td class="entry_name">android.<wbr>sensor.<wbr>sensitivity</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Gain applied to image data.<wbr> Must be
+ implemented through analog gain only if set to values
+ below 'maximum analog sensitivity'.<wbr>
+ </td>
+
+ <td class="entry_units">
+ ISO arithmetic units
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>sensor.<wbr>info.<wbr>sensitivity<wbr>Range
+ </td>
+
+ <td class="entry_notes">
+ ISO 12232:2006 REI method
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.sensor.info.activeArraySize">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>active<wbr>Array<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 4
+ </span>
+
+ <div class="entry_type_notes">Four ints defining the active pixel rectangle</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Area of raw data which corresponds to only
+ active pixels; smaller or equal to
+ pixelArraySize.<wbr>
+ </td>
+
+ <td class="entry_units">
+ xmin,<wbr> ymin,<wbr> width,<wbr> height.<wbr> Top left of full
+ pixel array is (0,<wbr>0)
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.availableSensitivities">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>available<wbr>Sensitivities</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">List of supported sensitivity values</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Range of valid sensitivities
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must at least include 100,<wbr> 200,<wbr> 400,<wbr> 800,<wbr>
+ 1600
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.colorFilterArrangement">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>color<wbr>Filter<wbr>Arrangement</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">RGGB</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">GRBG</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">GBRG</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">BGGR</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">RGB</span>
+ <span class="entry_type_enum_notes">Sensor is not Bayer; output has 3 16-bit
+ values for each pixel,<wbr> instead of just 1 16-bit value
+ per pixel.<wbr></span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Arrangement of color filters on sensor;
+ represents the colors in the top-left 2x2 section of
+ the sensor,<wbr> in reading order
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.exposureTimeRange">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>exposure<wbr>Time<wbr>Range</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">nanoseconds</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Range of valid exposure
+ times
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Min <= 100e3 (100 us),<wbr> Max >= 30e9 (30
+ sec)
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.maxFrameDuration">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>max<wbr>Frame<wbr>Duration</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum frame duration (minimum frame
+ rate)
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ >= 30e9
+ </td>
+
+ <td class="entry_notes">
+ Minimum duration is a function of resolution,<wbr>
+ processing settings.<wbr> See
+ android.<wbr>scaler.<wbr>info.<wbr>available<wbr>Min<wbr>Frame<wbr>Durations
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.physicalSize">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>physical<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">width x height in millimeters</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ The physical dimensions of the full pixel
+ array
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Needed for FOV calculation for old API
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.pixelArraySize">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>pixel<wbr>Array<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Dimensions of full pixel array,<wbr> possibly
+ including black calibration pixels
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Maximum output resolution for raw format must
+ match this in
+ android.<wbr>scaler.<wbr>info.<wbr>available<wbr>Sizes<wbr>Per<wbr>Format
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.info.whiteLevel">
+ <td class="entry_name">android.<wbr>sensor.<wbr>info.<wbr>white<wbr>Level</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum raw value output by
+ sensor
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ > 1024 (10-bit output)
+ </td>
+
+ <td class="entry_notes">
+ Defines sensor bit depth (10-14 bits is
+ expected)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+
+
+ <tr class="entry" id="static_android.sensor.baseGainFactor">
+ <td class="entry_name">android.<wbr>sensor.<wbr>base<wbr>Gain<wbr>Factor</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Gain factor from electrons to raw units when
+ ISO=100
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.blackLevelPattern">
+ <td class="entry_name">android.<wbr>sensor.<wbr>black<wbr>Level<wbr>Pattern</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 4
+ </span>
+
+ <div class="entry_type_notes">2x2 raw count block</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A fixed black level offset for each of the
+ Bayer mosaic channels
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 0 each
+ </td>
+
+ <td class="entry_notes">
+ As per DNG BlackLevelRepeatDim /<wbr> BlackLevel
+ tags
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.calibrationTransform1">
+ <td class="entry_name">android.<wbr>sensor.<wbr>calibration<wbr>Transform1</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Per-device calibration on top of color space
+ transform 1
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.calibrationTransform2">
+ <td class="entry_name">android.<wbr>sensor.<wbr>calibration<wbr>Transform2</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Per-device calibration on top of color space
+ transform 2
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.colorTransform1">
+ <td class="entry_name">android.<wbr>sensor.<wbr>color<wbr>Transform1</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Linear mapping from XYZ (D50) color space to
+ reference linear sensor color,<wbr> for first reference
+ illuminant
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Use as follows XYZ = inv(transform) * clip( (raw -
+ black level(raw) ) /<wbr> ( white level - max black level) ).<wbr>
+ At least in the simple case
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.colorTransform2">
+ <td class="entry_name">android.<wbr>sensor.<wbr>color<wbr>Transform2</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Linear mapping from XYZ (D50) color space to
+ reference linear sensor color,<wbr> for second reference
+ illuminant
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.forwardMatrix1">
+ <td class="entry_name">android.<wbr>sensor.<wbr>forward<wbr>Matrix1</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Used by DNG for better WB
+ adaptation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.forwardMatrix2">
+ <td class="entry_name">android.<wbr>sensor.<wbr>forward<wbr>Matrix2</td>
+ <td class="entry_type">
+ <span class="entry_type_name">rational</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 9
+ </span>
+
+ <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Used by DNG for better WB
+ adaptation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.maxAnalogSensitivity">
+ <td class="entry_name">android.<wbr>sensor.<wbr>max<wbr>Analog<wbr>Sensitivity</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum sensitivity that is implemented
+ purely through analog gain
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ For android.<wbr>sensor.<wbr>sensitivity values less than or
+ equal to this,<wbr> all applied gain must be analog.<wbr> For
+ values above this,<wbr> it can be a mix of analog and
+ digital
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.noiseModelCoefficients">
+ <td class="entry_name">android.<wbr>sensor.<wbr>noise<wbr>Model<wbr>Coefficients</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">float constants A,<wbr> B for the noise variance model</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Estimation of sensor noise
+ characteristics
+ </td>
+
+ <td class="entry_units">
+ var(raw pixel value) = electrons * (baseGainFactor
+ * iso/<wbr>100)^2 + A * (baseGainFactor * iso/<wbr>100)^2 +
+ B
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ A represents sensor read noise before analog
+ amplification; B represents noise from A/<wbr>D conversion and
+ other circuits after amplification.<wbr> Both noise sources
+ are assumed to be gaussian,<wbr> independent,<wbr> and not to vary
+ across the sensor
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.orientation">
+ <td class="entry_name">android.<wbr>sensor.<wbr>orientation</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Clockwise angle through which the output
+ image needs to be rotated to be upright on the device
+ screen in its native orientation.<wbr> Also defines the
+ direction of rolling shutter readout,<wbr> which is from top
+ to bottom in the sensor's coordinate system
+ </td>
+
+ <td class="entry_units">
+ degrees clockwise rotation,<wbr> only multiples of
+ 90
+ </td>
+
+ <td class="entry_range">
+ 0,<wbr>90,<wbr>180,<wbr>270
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.referenceIlluminant1">
+ <td class="entry_name">android.<wbr>sensor.<wbr>reference<wbr>Illuminant1</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">DAYLIGHT</span>
+ <span class="entry_type_enum_value">1</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FLUORESCENT</span>
+ <span class="entry_type_enum_value">2</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">TUNGSTEN</span>
+ <span class="entry_type_enum_value">3</span>
+ <span class="entry_type_enum_notes">Incandescent light</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FLASH</span>
+ <span class="entry_type_enum_value">4</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FINE_WEATHER</span>
+ <span class="entry_type_enum_value">9</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">CLOUDY_WEATHER</span>
+ <span class="entry_type_enum_value">10</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SHADE</span>
+ <span class="entry_type_enum_value">11</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">DAYLIGHT_FLUORESCENT</span>
+ <span class="entry_type_enum_value">12</span>
+ <span class="entry_type_enum_notes">D 5700 - 7100K</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">DAY_WHITE_FLUORESCENT</span>
+ <span class="entry_type_enum_value">13</span>
+ <span class="entry_type_enum_notes">N 4600 - 5400K</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">COOL_WHITE_FLUORESCENT</span>
+ <span class="entry_type_enum_value">14</span>
+ <span class="entry_type_enum_notes">W 3900 - 4500K</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">WHITE_FLUORESCENT</span>
+ <span class="entry_type_enum_value">15</span>
+ <span class="entry_type_enum_notes">WW 3200 - 3700K</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">STANDARD_A</span>
+ <span class="entry_type_enum_value">17</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">STANDARD_B</span>
+ <span class="entry_type_enum_value">18</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">STANDARD_C</span>
+ <span class="entry_type_enum_value">19</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">D55</span>
+ <span class="entry_type_enum_value">20</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">D65</span>
+ <span class="entry_type_enum_value">21</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">D75</span>
+ <span class="entry_type_enum_value">22</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">D50</span>
+ <span class="entry_type_enum_value">23</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ISO_STUDIO_TUNGSTEN</span>
+ <span class="entry_type_enum_value">24</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Light source used to define transform
+ 1
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ [EXIF LightSource tag] Must all these be
+ supported? Need CCT for each!
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ <li><a href="#tag_EXIF">EXIF</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.sensor.referenceIlluminant2">
+ <td class="entry_name">android.<wbr>sensor.<wbr>reference<wbr>Illuminant2</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Light source used to define transform
+ 2
+ </td>
+
+ <td class="entry_units">
+ Same as illuminant 1
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.sensor.exposureTime">
+ <td class="entry_name">android.<wbr>sensor.<wbr>exposure<wbr>Time</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Duration each pixel is exposed to
+ light
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>sensor.<wbr>info.<wbr>exposure<wbr>Time<wbr>Range
+ </td>
+
+ <td class="entry_notes">
+ 1/<wbr>10000 - 30 sec range.<wbr> No bulb mode
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.sensor.frameDuration">
+ <td class="entry_name">android.<wbr>sensor.<wbr>frame<wbr>Duration</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Duration from start of frame exposure to
+ start of next frame exposure
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ see android.<wbr>sensor.<wbr>info.<wbr>max<wbr>Frame<wbr>Duration,<wbr>
+ android.<wbr>scaler.<wbr>info.<wbr>available<wbr>Min<wbr>Frame<wbr>Durations
+ </td>
+
+ <td class="entry_notes">
+ Exposure time has priority,<wbr> so duration is set to
+ max(duration,<wbr> exposure time + overhead)
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.sensor.sensitivity">
+ <td class="entry_name">android.<wbr>sensor.<wbr>sensitivity</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Gain applied to image data.<wbr> Must be
+ implemented through analog gain only if set to values
+ below 'maximum analog sensitivity'.<wbr>
+ </td>
+
+ <td class="entry_units">
+ ISO arithmetic units
+ </td>
+
+ <td class="entry_range">
+ android.<wbr>sensor.<wbr>info.<wbr>sensitivity<wbr>Range
+ </td>
+
+ <td class="entry_notes">
+ ISO 12232:2006 REI method
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.sensor.timestamp">
+ <td class="entry_name">android.<wbr>sensor.<wbr>timestamp</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int64</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Time at start of exposure of first
+ row
+ </td>
+
+ <td class="entry_units">
+ nanoseconds
+ </td>
+
+ <td class="entry_range">
+ > 0
+ </td>
+
+ <td class="entry_notes">
+ Monotonic,<wbr> should be synced to other timestamps in
+ system
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_shading" class="section">shading</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.shading.mode">
+ <td class="entry_name">android.<wbr>shading.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No shading correction is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Quality of lens shading correction applied
+ to the image data
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.shading.strength">
+ <td class="entry_name">android.<wbr>shading.<wbr>strength</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Control the amount of shading correction
+ applied to the images
+ </td>
+
+ <td class="entry_units">
+ unitless: 1-10; 10 is full shading
+ compensation
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_ADV">ADV</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.shading.mode">
+ <td class="entry_name">android.<wbr>shading.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ <span class="entry_type_enum_notes">No shading correction is applied</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Quality of lens shading correction applied
+ to the image data
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_statistics" class="section">statistics</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.statistics.faceDetectMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Detect<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SIMPLE</span>
+ <span class="entry_type_enum_notes">Optional Return rectangle and confidence
+ only</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FULL</span>
+ <span class="entry_type_enum_notes">Optional Return all face
+ metadata</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ State of the face detector
+ unit
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+
+ android.<wbr>statistics.<wbr>available<wbr>Face<wbr>Detect<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.statistics.histogramMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>histogram<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operating mode for histogram
+ generation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.statistics.sharpnessMapMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>sharpness<wbr>Map<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operating mode for sharpness map
+ generation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.statistics.info.availableFaceDetectModes">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>available<wbr>Face<wbr>Detect<wbr>Modes</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+ <div class="entry_type_notes">List of enums</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Which face detection modes are available,<wbr>
+ if any
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ OFF
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.statistics.info.histogramBucketCount">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>histogram<wbr>Bucket<wbr>Count</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Number of histogram buckets
+ supported
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 64
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.statistics.info.maxFaceCount">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>max<wbr>Face<wbr>Count</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ If face detection is supported,<wbr> how many
+ faces can be detected at once
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 4 if availableFaceDetectionModes lists
+ modes besides OFF,<wbr> otherwise 0
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.statistics.info.maxHistogramCount">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>max<wbr>Histogram<wbr>Count</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum value possible for a histogram
+ bucket
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.statistics.info.maxSharpnessMapValue">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>max<wbr>Sharpness<wbr>Map<wbr>Value</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum value possible for a sharpness map
+ region.<wbr>
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="static_android.statistics.info.sharpnessMapSize">
+ <td class="entry_name">android.<wbr>statistics.<wbr>info.<wbr>sharpness<wbr>Map<wbr>Size</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 2
+ </span>
+
+ <div class="entry_type_notes">width x height</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Dimensions of the sharpness
+ map
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Must be at least 32 x 32
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.statistics.faceDetectMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Detect<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">SIMPLE</span>
+ <span class="entry_type_enum_notes">Optional Return rectangle and confidence
+ only</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FULL</span>
+ <span class="entry_type_enum_notes">Optional Return all face
+ metadata</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ State of the face detector
+ unit
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+
+ android.<wbr>statistics.<wbr>available<wbr>Face<wbr>Detect<wbr>Modes
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.faceIds">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Ids</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of unique IDs for detected
+ faces
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Only available if faceDetectMode == FULL
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.faceLandmarks">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Landmarks</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 6
+ </span>
+
+ <div class="entry_type_notes">(leftEyeX,<wbr> leftEyeY,<wbr> rightEyeX,<wbr> rightEyeY,<wbr> mouthX,<wbr> mouthY)</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of landmarks for detected
+ faces
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Only available if faceDetectMode == FULL
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.faceRectangles">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Rectangles</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 4
+ </span>
+
+ <div class="entry_type_notes">(xmin,<wbr> ymin,<wbr> xmax,<wbr> ymax).<wbr> (0,<wbr>0) is top-left of active pixel area</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of the bounding rectangles for detected
+ faces
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ Only available if faceDetectMode != OFF
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.faceScores">
+ <td class="entry_name">android.<wbr>statistics.<wbr>face<wbr>Scores</td>
+ <td class="entry_type">
+ <span class="entry_type_name">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ List of the face confidence scores for
+ detected faces
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 0-100
+ </td>
+
+ <td class="entry_notes">
+ Only available if faceDetectMode != OFF
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_BC">BC</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.histogram">
+ <td class="entry_name">android.<wbr>statistics.<wbr>histogram</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 3
+ </span>
+
+ <div class="entry_type_notes">count of pixels for each color channel that fall into each histogram bucket,<wbr> scaled to be between 0 and maxHistogramCount</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A 3-channel histogram based on the raw
+ sensor data
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ The k'th bucket (0-based) covers the input range
+ (with w = android.<wbr>sensor.<wbr>info.<wbr>white<wbr>Level) of [ k * w/<wbr>N,<wbr>
+ (k + 1) * w /<wbr> N ).<wbr> If only a monochrome sharpness map is
+ supported,<wbr> all channels should have the same data
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.histogramMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>histogram<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operating mode for histogram
+ generation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.sharpnessMap">
+ <td class="entry_name">android.<wbr>statistics.<wbr>sharpness<wbr>Map</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x m x 3
+ </span>
+
+ <div class="entry_type_notes">estimated sharpness for each region of the input image.<wbr> Normalized to be between 0 and maxSharpnessMapValue.<wbr> Higher values mean sharper (better focused)</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A 3-channel sharpness map,<wbr> based on the raw
+ sensor data
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ If only a monochrome sharpness map is supported,<wbr>
+ all channels should have the same data
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.statistics.sharpnessMapMode">
+ <td class="entry_name">android.<wbr>statistics.<wbr>sharpness<wbr>Map<wbr>Mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Operating mode for sharpness map
+ generation
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_V1">V1</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_tonemap" class="section">tonemap</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.tonemap.curveBlue">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Blue</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping blue input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_range">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.tonemap.curveGreen">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Green</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping green input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_range">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.tonemap.curveRed">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Red</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 2
+ </span>
+
+ <div class="entry_type_notes">A 1D array of pairs of floats.<wbr> mapping a 0-1 input range to a 0-1 output range.<wbr></div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping red input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 0-1 on input and output coordinates.<wbr> Max entry
+ count speciied by android.<wbr>tonemap.<wbr>max<wbr>Curve<wbr>Points
+ </td>
+
+ <td class="entry_notes">
+ .<wbr>The input range must be monotonically increasing
+ with N,<wbr> and values between entries should be linearly
+ interpolated.<wbr> For example,<wbr> if the array is: [0.<wbr>0,<wbr> 0.<wbr>0,<wbr>
+ 0.<wbr>3,<wbr> 0.<wbr>5,<wbr> 1.<wbr>0,<wbr> 1.<wbr>0],<wbr> then the input->output mapping
+ for a few sample points would be: 0 -> 0,<wbr> 0.<wbr>15 ->
+ 0.<wbr>25,<wbr> 0.<wbr>3 -> 0.<wbr>5,<wbr> 0.<wbr>5 -> 0.<wbr>64
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="controls_android.tonemap.mode">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">CONTRAST_CURVE</span>
+ <span class="entry_type_enum_notes">Use the tone mapping curve specified in
+ android.<wbr>tonemap.<wbr>curve</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.tonemap.maxCurvePoints">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>max<wbr>Curve<wbr>Points</td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Maximum number of supported points in the
+ tonemap curve
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ >= 128
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.tonemap.curveBlue">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Blue</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping blue input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_range">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.tonemap.curveGreen">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Green</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+
+
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping green input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_range">
+ same as android.<wbr>tonemap.<wbr>curve<wbr>Red
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.tonemap.curveRed">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Red</td>
+ <td class="entry_type">
+ <span class="entry_type_name">float</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n x 2
+ </span>
+
+ <div class="entry_type_notes">A 1D array of pairs of floats.<wbr> mapping a 0-1 input range to a 0-1 output range.<wbr></div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ Table mapping red input values to output
+ values
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ 0-1 on input and output coordinates.<wbr> Max entry
+ count speciied by android.<wbr>tonemap.<wbr>max<wbr>Curve<wbr>Points
+ </td>
+
+ <td class="entry_notes">
+ .<wbr>The input range must be monotonically increasing
+ with N,<wbr> and values between entries should be linearly
+ interpolated.<wbr> For example,<wbr> if the array is: [0.<wbr>0,<wbr> 0.<wbr>0,<wbr>
+ 0.<wbr>3,<wbr> 0.<wbr>5,<wbr> 1.<wbr>0,<wbr> 1.<wbr>0],<wbr> then the input->output mapping
+ for a few sample points would be: 0 -> 0,<wbr> 0.<wbr>15 ->
+ 0.<wbr>25,<wbr> 0.<wbr>3 -> 0.<wbr>5,<wbr> 0.<wbr>5 -> 0.<wbr>64
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_DNG">DNG</a></li>
+ </ul>
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+ <tr class="entry" id="dynamic_android.tonemap.mode">
+ <td class="entry_name">android.<wbr>tonemap.<wbr>mode</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">CONTRAST_CURVE</span>
+ <span class="entry_type_enum_notes">Use the tone mapping curve specified in
+ android.<wbr>tonemap.<wbr>curve</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FAST</span>
+ <span class="entry_type_enum_notes">Must not slow down frame rate relative to raw
+ bayer output</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">HIGH_QUALITY</span>
+ <span class="entry_type_enum_notes">Frame rate may be reduced by high
+ quality</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_led" class="section">led</td></tr>
+
+
+ <tr><td colspan="7" class="kind">controls</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="controls_android.led.transmit">
+ <td class="entry_name">android.<wbr>led.<wbr>transmit</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ This LED is nominally used to indicate to the user
+ that the camera is powered on and may be streaming images back to the
+ Application Processor.<wbr> In certain rare circumstances,<wbr> the OS may
+ disable this when video is processed locally and not transmitted to
+ any untrusted applications.<wbr>
+<br>
+<br> In particular,<wbr> the LED *must* always be on when the data could be
+ transmitted off the device.<wbr> The LED *should* always be on whenever
+ data is stored locally on the device.<wbr>
+<br>
+<br> The LED *may* be off if a trusted application is using the data that
+ doesn't violate the above rules.<wbr>
+
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">dynamic</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="dynamic_android.led.transmit">
+ <td class="entry_name">android.<wbr>led.<wbr>transmit</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">OFF</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">ON</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ This LED is nominally used to indicate to the user
+ that the camera is powered on and may be streaming images back to the
+ Application Processor.<wbr> In certain rare circumstances,<wbr> the OS may
+ disable this when video is processed locally and not transmitted to
+ any untrusted applications.<wbr>
+<br>
+<br> In particular,<wbr> the LED *must* always be on when the data could be
+ transmitted off the device.<wbr> The LED *should* always be on whenever
+ data is stored locally on the device.<wbr>
+<br>
+<br> The LED *may* be off if a trusted application is using the data that
+ doesn't violate the above rules.<wbr>
+
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.led.availableLeds">
+ <td class="entry_name">android.<wbr>led.<wbr>available<wbr>Leds</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ n
+ </span>
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">TRANSMIT</span>
+ <span class="entry_type_enum_notes">android.<wbr>led.<wbr>transmit control is used</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ A list of camera LEDs that are available on this system.<wbr>
+
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+ <tr><td colspan="7" id="section_info" class="section">info</td></tr>
+
+
+ <tr><td colspan="7" class="kind">static</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+
+
+
+
+
+
+
+
+ <tr class="entry" id="static_android.info.supportedHardwareLevel">
+ <td class="entry_name">android.<wbr>info.<wbr>supported<wbr>Hardware<wbr>Level</td>
+ <td class="entry_type">
+ <span class="entry_type_name entry_type_name_enum">byte</span>
+
+
+
+ <ul class="entry_type_enum">
+ <li>
+ <span class="entry_type_enum_name">LIMITED</span>
+ </li>
+ <li>
+ <span class="entry_type_enum_name">FULL</span>
+ </li>
+ </ul>
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+
+ The camera 3 HAL device can implement one of two possible operational modes;
+ limited and full.<wbr> Full support is expected from new higher-end
+ devices.<wbr> Limited mode has hardware requirements roughly in line with those
+ for a camera HAL device v1 implementation,<wbr> and is expected from older or
+ inexpensive devices.<wbr> Full is a strict superset of limited,<wbr> and they share the
+ same essential operational flow.<wbr>
+<br>
+<br> For full details refer to "S3.<wbr> Operational Modes" in camera3.<wbr>h
+
+ </td>
+
+ <td class="entry_units">
+ </td>
+
+ <td class="entry_range">
+ Optional.<wbr> Default value is LIMITED.<wbr>
+ </td>
+
+ <td class="entry_notes">
+ </td>
+
+ <td class="entry_tags">
+ </td>
+
+ </tr> <!-- end of entry -->
+
+
+
+ <!-- end of kind -->
+ </tbody>
+
+ <!-- end of section -->
+<!-- </namespace> -->
+ </table>
+
+ <div class="tags" id="tag_index">
+ <h2>Tags</h2>
+ <ul>
+ <li id="tag_AWB">AWB -
+ Needed for auto white balance
+
+ <ul class="tags_entries">
+ <li><a href="#controls_android.control.awbMode">android.control.awbMode</a> (controls)</li>
+ </ul>
+ </li> <!-- tag_AWB -->
+ <li id="tag_BC">BC -
+ Needed for backwards compatibility with old Java API
+
+ <ul class="tags_entries">
+ <li><a href="#controls_android.control.aeExposureCompensation">android.control.aeExposureCompensation</a> (controls)</li>
+ <li><a href="#controls_android.control.aeLock">android.control.aeLock</a> (controls)</li>
+ <li><a href="#controls_android.control.aeMode">android.control.aeMode</a> (controls)</li>
+ <li><a href="#controls_android.control.aeRegions">android.control.aeRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.aeTargetFpsRange">android.control.aeTargetFpsRange</a> (controls)</li>
+ <li><a href="#controls_android.control.aePrecaptureTrigger">android.control.aePrecaptureTrigger</a> (controls)</li>
+ <li><a href="#controls_android.control.afMode">android.control.afMode</a> (controls)</li>
+ <li><a href="#controls_android.control.afRegions">android.control.afRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.afTrigger">android.control.afTrigger</a> (controls)</li>
+ <li><a href="#controls_android.control.awbLock">android.control.awbLock</a> (controls)</li>
+ <li><a href="#controls_android.control.awbMode">android.control.awbMode</a> (controls)</li>
+ <li><a href="#controls_android.control.awbRegions">android.control.awbRegions</a> (controls)</li>
+ <li><a href="#controls_android.control.captureIntent">android.control.captureIntent</a> (controls)</li>
+ <li><a href="#controls_android.control.effectMode">android.control.effectMode</a> (controls)</li>
+ <li><a href="#controls_android.control.mode">android.control.mode</a> (controls)</li>
+ <li><a href="#controls_android.control.sceneMode">android.control.sceneMode</a> (controls)</li>
+ <li><a href="#controls_android.control.videoStabilizationMode">android.control.videoStabilizationMode</a> (controls)</li>
+ <li><a href="#static_android.control.aeCompensationRange">android.control.aeCompensationRange</a> (static)</li>
+ <li><a href="#static_android.control.aeCompensationStep">android.control.aeCompensationStep</a> (static)</li>
+ <li><a href="#static_android.control.afAvailableModes">android.control.afAvailableModes</a> (static)</li>
+ <li><a href="#static_android.control.availableEffects">android.control.availableEffects</a> (static)</li>
+ <li><a href="#static_android.control.availableSceneModes">android.control.availableSceneModes</a> (static)</li>
+ <li><a href="#static_android.control.availableVideoStabilizationModes">android.control.availableVideoStabilizationModes</a> (static)</li>
+ <li><a href="#static_android.control.awbAvailableModes">android.control.awbAvailableModes</a> (static)</li>
+ <li><a href="#static_android.control.maxRegions">android.control.maxRegions</a> (static)</li>
+ <li><a href="#static_android.control.sceneModeOverrides">android.control.sceneModeOverrides</a> (static)</li>
+ <li><a href="#controls_android.flash.mode">android.flash.mode</a> (controls)</li>
+ <li><a href="#static_android.flash.info.available">android.flash.info.available</a> (static)</li>
+ <li><a href="#controls_android.jpeg.gpsCoordinates">android.jpeg.gpsCoordinates</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.gpsProcessingMethod">android.jpeg.gpsProcessingMethod</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.gpsTimestamp">android.jpeg.gpsTimestamp</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.orientation">android.jpeg.orientation</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.quality">android.jpeg.quality</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.thumbnailQuality">android.jpeg.thumbnailQuality</a> (controls)</li>
+ <li><a href="#controls_android.jpeg.thumbnailSize">android.jpeg.thumbnailSize</a> (controls)</li>
+ <li><a href="#static_android.jpeg.availableThumbnailSizes">android.jpeg.availableThumbnailSizes</a> (static)</li>
+ <li><a href="#controls_android.lens.focusDistance">android.lens.focusDistance</a> (controls)</li>
+ <li><a href="#static_android.lens.info.availableFocalLengths">android.lens.info.availableFocalLengths</a> (static)</li>
+ <li><a href="#static_android.lens.info.hyperfocalDistance">android.lens.info.hyperfocalDistance</a> (static)</li>
+ <li><a href="#dynamic_android.lens.focusRange">android.lens.focusRange</a> (dynamic)</li>
+ <li><a href="#static_android.request.maxNumOutputStreams">android.request.maxNumOutputStreams</a> (static)</li>
+ <li><a href="#controls_android.scaler.cropRegion">android.scaler.cropRegion</a> (controls)</li>
+ <li><a href="#static_android.scaler.availableFormats">android.scaler.availableFormats</a> (static)</li>
+ <li><a href="#static_android.scaler.availableJpegMinDurations">android.scaler.availableJpegMinDurations</a> (static)</li>
+ <li><a href="#static_android.scaler.availableJpegSizes">android.scaler.availableJpegSizes</a> (static)</li>
+ <li><a href="#static_android.scaler.availableMaxDigitalZoom">android.scaler.availableMaxDigitalZoom</a> (static)</li>
+ <li><a href="#static_android.scaler.availableProcessedMinDurations">android.scaler.availableProcessedMinDurations</a> (static)</li>
+ <li><a href="#static_android.scaler.availableProcessedSizes">android.scaler.availableProcessedSizes</a> (static)</li>
+ <li><a href="#static_android.scaler.availableRawMinDurations">android.scaler.availableRawMinDurations</a> (static)</li>
+ <li><a href="#controls_android.sensor.frameDuration">android.sensor.frameDuration</a> (controls)</li>
+ <li><a href="#static_android.sensor.info.availableSensitivities">android.sensor.info.availableSensitivities</a> (static)</li>
+ <li><a href="#static_android.sensor.info.maxFrameDuration">android.sensor.info.maxFrameDuration</a> (static)</li>
+ <li><a href="#static_android.sensor.info.physicalSize">android.sensor.info.physicalSize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
+ <li><a href="#static_android.sensor.orientation">android.sensor.orientation</a> (static)</li>
+ <li><a href="#dynamic_android.sensor.timestamp">android.sensor.timestamp</a> (dynamic)</li>
+ <li><a href="#controls_android.statistics.faceDetectMode">android.statistics.faceDetectMode</a> (controls)</li>
+ <li><a href="#dynamic_android.statistics.faceIds">android.statistics.faceIds</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceLandmarks">android.statistics.faceLandmarks</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceRectangles">android.statistics.faceRectangles</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.faceScores">android.statistics.faceScores</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.focalLength">android.lens.focalLength</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.focusDistance">android.lens.focusDistance</a> (dynamic)</li>
+ </ul>
+ </li> <!-- tag_BC -->
+ <li id="tag_V1">V1 -
+ New features for first camera 2 release (API1)
+
+ <ul class="tags_entries">
+ <li><a href="#controls_android.demosaic.mode">android.demosaic.mode</a> (controls)</li>
+ <li><a href="#controls_android.flash.firingPower">android.flash.firingPower</a> (controls)</li>
+ <li><a href="#controls_android.flash.firingTime">android.flash.firingTime</a> (controls)</li>
+ <li><a href="#static_android.flash.info.chargeDuration">android.flash.info.chargeDuration</a> (static)</li>
+ <li><a href="#controls_android.hotPixel.mode">android.hotPixel.mode</a> (controls)</li>
+ <li><a href="#controls_android.lens.aperture">android.lens.aperture</a> (controls)</li>
+ <li><a href="#controls_android.lens.filterDensity">android.lens.filterDensity</a> (controls)</li>
+ <li><a href="#controls_android.lens.focalLength">android.lens.focalLength</a> (controls)</li>
+ <li><a href="#controls_android.lens.focusDistance">android.lens.focusDistance</a> (controls)</li>
+ <li><a href="#controls_android.lens.opticalStabilizationMode">android.lens.opticalStabilizationMode</a> (controls)</li>
+ <li><a href="#static_android.lens.info.availableApertures">android.lens.info.availableApertures</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableFilterDensities">android.lens.info.availableFilterDensities</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableFocalLengths">android.lens.info.availableFocalLengths</a> (static)</li>
+ <li><a href="#static_android.lens.info.availableOpticalStabilization">android.lens.info.availableOpticalStabilization</a> (static)</li>
+ <li><a href="#static_android.lens.info.geometricCorrectionMapSize">android.lens.info.geometricCorrectionMapSize</a> (static)</li>
+ <li><a href="#static_android.lens.info.minimumFocusDistance">android.lens.info.minimumFocusDistance</a> (static)</li>
+ <li><a href="#static_android.lens.info.shadingMapSize">android.lens.info.shadingMapSize</a> (static)</li>
+ <li><a href="#static_android.lens.position">android.lens.position</a> (static)</li>
+ <li><a href="#dynamic_android.lens.state">android.lens.state</a> (dynamic)</li>
+ <li><a href="#controls_android.noiseReduction.mode">android.noiseReduction.mode</a> (controls)</li>
+ <li><a href="#controls_android.request.id">android.request.id</a> (controls)</li>
+ <li><a href="#controls_android.sensor.exposureTime">android.sensor.exposureTime</a> (controls)</li>
+ <li><a href="#controls_android.sensor.frameDuration">android.sensor.frameDuration</a> (controls)</li>
+ <li><a href="#controls_android.sensor.sensitivity">android.sensor.sensitivity</a> (controls)</li>
+ <li><a href="#static_android.sensor.info.availableSensitivities">android.sensor.info.availableSensitivities</a> (static)</li>
+ <li><a href="#static_android.sensor.info.exposureTimeRange">android.sensor.info.exposureTimeRange</a> (static)</li>
+ <li><a href="#static_android.sensor.info.maxFrameDuration">android.sensor.info.maxFrameDuration</a> (static)</li>
+ <li><a href="#static_android.sensor.info.physicalSize">android.sensor.info.physicalSize</a> (static)</li>
+ <li><a href="#static_android.sensor.baseGainFactor">android.sensor.baseGainFactor</a> (static)</li>
+ <li><a href="#static_android.sensor.maxAnalogSensitivity">android.sensor.maxAnalogSensitivity</a> (static)</li>
+ <li><a href="#static_android.sensor.noiseModelCoefficients">android.sensor.noiseModelCoefficients</a> (static)</li>
+ <li><a href="#controls_android.statistics.histogramMode">android.statistics.histogramMode</a> (controls)</li>
+ <li><a href="#controls_android.statistics.sharpnessMapMode">android.statistics.sharpnessMapMode</a> (controls)</li>
+ <li><a href="#dynamic_android.statistics.histogram">android.statistics.histogram</a> (dynamic)</li>
+ <li><a href="#dynamic_android.statistics.sharpnessMap">android.statistics.sharpnessMap</a> (dynamic)</li>
+ <li><a href="#dynamic_android.hotPixel.mode">android.hotPixel.mode</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.aperture">android.lens.aperture</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.filterDensity">android.lens.filterDensity</a> (dynamic)</li>
+ <li><a href="#dynamic_android.lens.opticalStabilizationMode">android.lens.opticalStabilizationMode</a> (dynamic)</li>
+ </ul>
+ </li> <!-- tag_V1 -->
+ <li id="tag_ADV">ADV - None
+ <ul class="tags_entries">
+ <li><a href="#static_android.flash.colorTemperature">android.flash.colorTemperature</a> (static)</li>
+ <li><a href="#static_android.flash.maxEnergy">android.flash.maxEnergy</a> (static)</li>
+ <li><a href="#controls_android.geometric.strength">android.geometric.strength</a> (controls)</li>
+ <li><a href="#static_android.hotPixel.info.map">android.hotPixel.info.map</a> (static)</li>
+ <li><a href="#static_android.lens.opticalAxisAngle">android.lens.opticalAxisAngle</a> (static)</li>
+ <li><a href="#controls_android.shading.strength">android.shading.strength</a> (controls)</li>
+ </ul>
+ </li> <!-- tag_ADV -->
+ <li id="tag_DNG">DNG -
+ Needed for DNG file support
+
+ <ul class="tags_entries">
+ <li><a href="#static_android.lens.info.geometricCorrectionMap">android.lens.info.geometricCorrectionMap</a> (static)</li>
+ <li><a href="#static_android.lens.info.shadingMap">android.lens.info.shadingMap</a> (static)</li>
+ <li><a href="#static_android.sensor.info.activeArraySize">android.sensor.info.activeArraySize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.colorFilterArrangement">android.sensor.info.colorFilterArrangement</a> (static)</li>
+ <li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
+ <li><a href="#static_android.sensor.info.whiteLevel">android.sensor.info.whiteLevel</a> (static)</li>
+ <li><a href="#static_android.sensor.blackLevelPattern">android.sensor.blackLevelPattern</a> (static)</li>
+ <li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a> (static)</li>
+ <li><a href="#static_android.sensor.calibrationTransform2">android.sensor.calibrationTransform2</a> (static)</li>
+ <li><a href="#static_android.sensor.colorTransform1">android.sensor.colorTransform1</a> (static)</li>
+ <li><a href="#static_android.sensor.colorTransform2">android.sensor.colorTransform2</a> (static)</li>
+ <li><a href="#static_android.sensor.forwardMatrix1">android.sensor.forwardMatrix1</a> (static)</li>
+ <li><a href="#static_android.sensor.forwardMatrix2">android.sensor.forwardMatrix2</a> (static)</li>
+ <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
+ <li><a href="#controls_android.tonemap.curveRed">android.tonemap.curveRed</a> (controls)</li>
+ </ul>
+ </li> <!-- tag_DNG -->
+ <li id="tag_EXIF">EXIF - None
+ <ul class="tags_entries">
+ <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
+ </ul>
+ </li> <!-- tag_EXIF -->
+ </ul>
+ </div>
+
+ [ <a href="#">top</a> ]
+
+</body>
+</html>
diff --git a/camera/docs/html.mako b/camera/docs/html.mako
new file mode 100644
index 00000000..b1b97597
--- /dev/null
+++ b/camera/docs/html.mako
@@ -0,0 +1,308 @@
+## -*- coding: utf-8 -*-
+<!DOCTYPE html>
+<html>
+<!-- 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.
+-->
+<head>
+ <!-- automatically generated from html.mako. do NOT edit directly -->
+ <meta charset="utf-8" />
+ <title>Android Camera HAL2.0 Properties</title>
+ <style type="text/css">
+ .section { font-size: 1.5em; font-weight: bold; background-color: beige; padding: 0.5em 0em 0.5em 0.1em }
+ .kind { font-size: 1.2em; font-weight: bold; padding-left: 0.5em; background-color: gray }
+ .entry { background-color: burlywood }
+
+ /* table column sizes */
+ table { table-layout: fixed; width: 100%; word-wrap: break-word }
+ td,th { border: 1px solid; }
+ .th_name { width: 20% }
+ .th_units { width: 10% }
+ .th_tags { width: 5% }
+ .th_notes { width: 30% }
+ .th_type { width: 20% }
+ td { font-size: 0.9em; }
+
+ /* hide the first thead, we need it there only to enforce column sizes */
+ .thead_dummy { visibility: hidden; }
+
+ /* Entry flair */
+ .entry_name { font-family: monospace; font-style: italic; }
+
+ /* Entry type flair */
+ .entry_type_name { color: darkgreen; font-weight: bold; }
+ .entry_type_name_enum:after { color: darkgreen; font-weight: bold; content:" (enum)" }
+ .entry_type_enum_name { font-family: monospace; font-weight: bolder; }
+ .entry_type_enum_notes:before { content:" - " }
+ .entry_type_enum_value:before { content:" = " }
+ .entry_type_enum_value { font-family: monospace; }
+ .entry ul { margin: 0 0 0 0; list-style-position: inside; padding-left: 0.5em; }
+ .entry ul li { padding: 0 0 0 0; margin: 0 0 0 0;}
+
+ /* Entry tags flair */
+ .entry_tags ul { list-style-type: none; }
+
+
+ /* TODO: generate abbr element for each tag link? */
+ /* TODO for each x.y.z try to link it to the entry */
+
+ </style>
+
+ <style>
+
+ {
+ /* broken...
+ supposedly there is a bug in chrome that it lays out tables before
+ it knows its being printed, so the page-break-* styles are ignored
+ */
+ tr { page-break-after: always; page-break-inside: avoid; }
+ }
+
+ </style>
+</head>
+
+<%!
+ import re
+
+ # insert word break hints for the browser
+ def wbr(text):
+ new_txt = text
+
+ # for johnyOrange.appleCider.redGuardian also insert wbr before the caps
+ # => johny<wbr>Orange.apple<wbr>Cider.red<wbr>Guardian
+ for words in text.split(" "):
+ if len(words.split(".")) >= 3: # match only x.y.z
+ addwbr = lambda x: i.isupper() and ("<wbr>" + i) or i
+ new_word = "".join([addwbr(i) for i in words])
+ new_txt = new_txt.replace(words, new_word)
+
+ # e.g. X/Y/Z -> X/<wbr>Y/<wbr>/Z. also for X.Y.Z, X_Y_Z.
+ replace_chars=['.', '/', '_', ',']
+ for i in replace_chars:
+ new_txt = new_txt.replace(i, i + "<wbr>")
+
+ return new_txt
+
+ # insert line breaks after every two \n\n
+ def br(text):
+ return re.sub(r"(\r?\n)(\r?\n)", r"\1<br>\2<br>", text)
+%>
+
+
+<body>
+ <h1>Android Camera HAL2.0 Properties</h1>
+
+ <h2>Table of Contents</h2>
+ <ul class="toc">
+ <li><a href="#tag_index">Tags</a></li>
+
+
+ % for section in metadata.find_all(lambda x: isinstance(x, metadata_model.Section)):
+ <li><p class="toc_section"><a href="#section_${section.name}">${section.name}</a></p>
+ <ul class="toc_section">
+ % for prop in section.find_all(lambda x: isinstance(x, metadata_model.Entry)):
+ <li><a href="#${prop.kind}_${prop.name}">${prop.name}</a> (${prop.kind})</li>
+ % endfor
+ </ul>
+ </li> <!-- toc_section -->
+ % endfor
+ </ul>
+
+ <h1>Properties</h1>
+ <table class="properties">
+
+ <thead class="thead_dummy">
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead> <!-- so that the first occurrence of thead is not
+ above the first occurrence of tr -->
+% for root in metadata.outer_namespaces:
+<!-- <namespace name="${root.name}"> -->
+ % for section in root.sections:
+ <tr><td colspan="7" id="section_${section.name}" class="section">${section.name}</td></tr>
+
+ % if section.description is not None:
+ <tr class="description"><td>${section.description}</td></tr>
+ % endif
+
+ % for kind in section.merged_kinds: # dynamic,static,controls
+ <tr><td colspan="7" class="kind">${kind.name}</td></tr>
+
+ <thead>
+ <tr>
+ <th class="th_name">Property Name</th>
+ <th class="th_type">Type</th>
+ <th class="th_description">Description</th>
+ <th class="th_units">Units</th>
+ <th class="th_range">Range</th>
+ <th class="th_notes">Notes</th>
+ <th class="th_tags">Tags</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+ <%def name="insert_body(node)">
+ % for nested in node.namespaces:
+ ${insert_namespace(nested)}
+ % endfor
+
+ % for entry in node.merged_entries:
+ ${insert_entry(entry)}
+ % endfor
+ </%def>
+
+ <%def name="insert_namespace(namespace)">
+ ${insert_body(namespace)}
+ </%def>
+
+ <%def name="insert_entry(prop)">
+ % if False: #prop.is_clone():
+ <clone entry="${prop.name}" kind="${prop.target_kind}">
+
+ % if prop.notes is not None:
+ <notes>${prop.notes | h,wbr}</notes>
+ % endif
+
+ % for tag in prop.tags:
+ <tag id="${tag.id}" />
+ % endfor
+
+ </clone>
+ % else:
+ <tr class="entry" id="${prop.kind}_${prop.name}">
+ <td class="entry_name">${prop.name | wbr}</td>
+ <td class="entry_type">
+ % if prop.enum:
+ <span class="entry_type_name entry_type_name_enum">${prop.type}</span>
+ % else:
+ <span class="entry_type_name">${prop.type}</span>
+ % endif
+ % if prop.container is not None:
+ <span class="entry_type_container">x</span>
+ % endif
+
+ % if prop.container == 'array':
+ <span class="entry_type_array">
+ ${" x ".join(prop.container_sizes)}
+ </span>
+ % elif prop.container == 'tuple':
+ <ul class="entry_type_tuple">
+ % for val in prop.tuple_values:
+ <li>${val}</li>
+ % endfor
+ </ul>
+ % endif
+
+ % if prop.type_notes is not None:
+ <div class="entry_type_notes">${prop.type_notes | wbr}</div>
+ % endif
+
+ % if prop.enum:
+ <ul class="entry_type_enum">
+ % for value in prop.enum.values:
+ <li>
+ <span class="entry_type_enum_name">${value.name}</span>
+ % if value.optional:
+ <span class="entry_type_enum_optional">optional</span>
+ % endif:
+ % if value.id is not None:
+ <span class="entry_type_enum_value">${value.id}</span>
+ % endif
+ % if value.notes is not None:
+ <span class="entry_type_enum_notes">${value.notes | wbr}</span>
+ % endif
+ </li>
+ % endfor
+ </ul>
+ % endif
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ % if prop.description is not None:
+ ${prop.description | wbr, br}
+ % endif
+ </td>
+
+ <td class="entry_units">
+ % if prop.units is not None:
+ ${prop.units | wbr}
+ % endif
+ </td>
+
+ <td class="entry_range">
+ % if prop.range is not None:
+ ${prop.range | wbr}
+ % endif
+ </td>
+
+ <td class="entry_notes">
+ % if prop.notes is not None:
+ ${prop.notes | wbr, br}
+ % endif
+ </td>
+
+ <td class="entry_tags">
+ % if next(prop.tags, None):
+ <ul class="entry_tags">
+ % for tag in prop.tags:
+ <li><a href="#tag_${tag.id}">${tag.id}</a></li>
+ % endfor
+ </ul>
+ % endif
+ </td>
+
+ </tr> <!-- end of entry -->
+ % endif
+ </%def>
+
+ ${insert_body(kind)}
+
+ <!-- end of kind -->
+ </tbody>
+ % endfor # for each kind
+
+ <!-- end of section -->
+ % endfor
+<!-- </namespace> -->
+% endfor
+ </table>
+
+ <div class="tags" id="tag_index">
+ <h2>Tags</h2>
+ <ul>
+ % for tag in metadata.tags:
+ <li id="tag_${tag.id}">${tag.id} - ${tag.description}
+ <ul class="tags_entries">
+ % for prop in tag.entries:
+ <li><a href="#${prop.kind}_${prop.name}">${prop.name}</a> (${prop.kind})</li>
+ % endfor
+ </ul>
+ </li> <!-- tag_${tag.id} -->
+ % endfor
+ </ul>
+ </div>
+
+ [ <a href="#">top</a> ]
+
+</body>
+</html>
diff --git a/camera/docs/metadata-check-dependencies b/camera/docs/metadata-check-dependencies
new file mode 100755
index 00000000..d4f768ab
--- /dev/null
+++ b/camera/docs/metadata-check-dependencies
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+packager=""
+retcode=0
+if [[ "$OSTYPE" == "darwin"* ]]
+then
+ packager="macports"
+
+ if ! which port >& /dev/null
+ then
+ echo "Missing port binary, please install from http://www.macports.org/" >& 2
+ fi
+elif [[ "$OSTYPE" == "linux-gnu" ]] && which apt-get >& /dev/null
+then
+ packager="apt-get"
+fi
+
+function packager_install
+{
+ if [[ $packager == "macports" ]]
+ then
+ echo "sudo port install $1"
+ elif [[ $packager == "apt-get" ]]
+ then
+ echo "sudo apt-get install $1"
+ else
+ echo "<your package manager> install $1"
+ fi
+}
+
+function binary_check()
+{
+ local bin=$1
+ local macports=$2
+ local aptget=$3
+
+ local pkg=""
+
+ if type -f "$bin" >& /dev/null
+ then
+ return 0
+ fi
+
+ if [[ $packager == "macports" ]]
+ then
+ pkg="$macports"
+ elif [[ $packager == "apt-get" ]]
+ then
+ pkg="$aptget"
+ fi
+
+ if [[ -n $pkg ]]
+ then
+ echo "Missing $bin binary please install with '$(packager_install $pkg)'"
+ fi
+
+ retcode=1
+ return 1
+}
+
+function python_check()
+{
+ local mod=$1
+ local macports=$2
+ local aptget=$3
+
+ local pkg=""
+
+ if python -c "import $mod" >& /dev/null
+ then
+ return 0
+ fi
+
+ if [[ $packager == "macports" ]]
+ then
+ pkg="$macports"
+ elif [[ $packager == "apt-get" ]]
+ then
+ pkg="$aptget"
+ fi
+
+ if [[ -n $pkg ]]
+ then
+ echo "Missing python module $mod, please install with '$(packager_install $pkg)'"
+ fi
+
+ retcode=1
+ return 1
+}
+
+binary_check xmllint libxml2 libxml2-utils
+binary_check tidy tidy tidy
+binary_check python python27 python2.7
+python_check bs4 py27-beautifulsoup4 python-bs4
+python_check mako py27-mako python-mako
+
+exit $retcode
+
diff --git a/camera/docs/metadata-generate b/camera/docs/metadata-generate
new file mode 100755
index 00000000..59aaff28
--- /dev/null
+++ b/camera/docs/metadata-generate
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+#
+# Generate all files we have templates for:
+# docs.html
+# ../src/camera_metadata_tag_info.c
+# ../src/camera_metadata_tags.h
+#
+
+thisdir=$(cd "$(dirname "$0")"; pwd)
+
+function relpath() {
+ python -c "import os.path; print os.path.relpath('$1', '$PWD')"
+}
+
+function gen_file() {
+ local in=$thisdir/$1
+ local out=$thisdir/$2
+
+ python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $in $out
+
+ local succ=$?
+
+ if [[ $succ -eq 0 ]]
+ then
+ echo "OK: Generated $(relpath "$out")"
+ else
+ echo "FAIL: Errors while generating $(relpath "$out")" >& 2
+ fi
+
+ return $succ
+}
+
+$thisdir/metadata-check-dependencies || exit 1
+$thisdir/metadata-validate $thisdir/metadata_properties.xml || exit 1
+$thisdir/metadata-parser-sanity-check || exit 1
+gen_file html.mako docs.html || exit 1
+gen_file camera_metadata_tag_info.mako ../src/camera_metadata_tag_info.c || exit 1
+gen_file camera_metadata_tags.mako ../include/system/camera_metadata_tags.h || exit 1
+
+echo "Successfully generated all metadata source files"
+
+exit 0
diff --git a/camera/docs/metadata-parser-sanity-check b/camera/docs/metadata-parser-sanity-check
new file mode 100755
index 00000000..76afc482
--- /dev/null
+++ b/camera/docs/metadata-parser-sanity-check
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+#
+# Sanity check the XML parser by making sure it's generating the same data
+# as the original parsed data.
+#
+
+thisdir=$(cd "$(dirname "$0")"; pwd)
+
+$thisdir/metadata-check-dependencies || exit 1
+
+tmp_out=$(mktemp -t tmp.XXXXXXXXXX)
+tmp_tidy1=$(mktemp -t tmp.XXXXXXXXXX)
+tmp_tidy2=$(mktemp -t tmp.XXXXXXXXXX)
+
+python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $thisdir/metadata_template.mako $tmp_out || exit 1
+tidy -indent -xml -quiet $thisdir/metadata_properties.xml > $tmp_tidy1
+tidy -indent -xml -quiet $tmp_out > $tmp_tidy2
+
+diff $tmp_tidy1 $tmp_tidy2
+exit_code=$?
+rm $tmp_out $tmp_tidy1 $tmp_tidy2
+
+if [[ $exit_code -ne 0 ]]
+then
+ echo "ERROR: Files differ, please check parser logic" 1>&2
+else
+ echo "SUCCESS: Files are the same!" 1>&2
+fi
+
+exit $exit_code
diff --git a/camera/docs/metadata-validate b/camera/docs/metadata-validate
new file mode 100755
index 00000000..d507d8e4
--- /dev/null
+++ b/camera/docs/metadata-validate
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+thisdir=$(cd "$(dirname "$0")"; pwd)
+$thisdir/metadata-check-dependencies || exit 1
+
+if [[ $# -lt 1 ]]
+then
+ echo "Usage: ${BASH_SOURCE##*/} <properties-file-name.xml>" 1>&2
+ exit
+fi
+
+schema=$thisdir/metadata_properties.xsd
+doc=$1
+
+xmllint --noout --schema $schema $out $doc || exit 1
+python $thisdir/metadata_validate.py $doc || exit 1
+
diff --git a/camera/docs/metadata_helpers.py b/camera/docs/metadata_helpers.py
new file mode 100644
index 00000000..fd09d982
--- /dev/null
+++ b/camera/docs/metadata_helpers.py
@@ -0,0 +1,243 @@
+#
+# 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.
+#
+
+"""
+A set of helpers for rendering Mako templates with a Metadata model.
+"""
+
+import metadata_model
+from collections import OrderedDict
+
+_context_buf = None
+
+def _is_sec_or_ins(x):
+ return isinstance(x, metadata_model.Section) or \
+ isinstance(x, metadata_model.InnerNamespace)
+
+##
+## Metadata Helpers
+##
+
+def find_all_sections(root):
+ """
+ Find all descendants that are Section or InnerNamespace instances.
+
+ Args:
+ root: a Metadata instance
+
+ Returns:
+ A list of Section/InnerNamespace instances
+
+ Remarks:
+ These are known as "sections" in the generated C code.
+ """
+ return root.find_all(_is_sec_or_ins)
+
+def find_parent_section(entry):
+ """
+ Find the closest ancestor that is either a Section or InnerNamespace.
+
+ Args:
+ entry: an Entry or Clone node
+
+ Returns:
+ An instance of Section or InnerNamespace
+ """
+ return entry.find_parent_first(_is_sec_or_ins)
+
+# find uniquely named entries (w/o recursing through inner namespaces)
+def find_unique_entries(node):
+ """
+ Find all uniquely named entries, without recursing through inner namespaces.
+
+ Args:
+ node: a Section or InnerNamespace instance
+
+ Yields:
+ A sequence of MergedEntry nodes representing an entry
+
+ Remarks:
+ This collapses multiple entries with the same fully qualified name into
+ one entry (e.g. if there are multiple entries in different kinds).
+ """
+ if not isinstance(node, metadata_model.Section) and \
+ not isinstance(node, metadata_model.InnerNamespace):
+ raise TypeError("expected node to be a Section or InnerNamespace")
+
+ d = OrderedDict()
+ # remove the 'kinds' from the path between sec and the closest entries
+ # then search the immediate children of the search path
+ search_path = isinstance(node, metadata_model.Section) and node.kinds \
+ or [node]
+ for i in search_path:
+ for entry in i.entries:
+ d[entry.name] = entry
+
+ for k,v in d.iteritems():
+ yield v.merge()
+
+def path_name(node):
+ """
+ Calculate a period-separated string path from the root to this element,
+ by joining the names of each node and excluding the Metadata/Kind nodes
+ from the path.
+
+ Args:
+ node: a Node instance
+
+ Returns:
+ A string path
+ """
+
+ isa = lambda x,y: isinstance(x, y)
+ fltr = lambda x: not isa(x, metadata_model.Metadata) and \
+ not isa(x, metadata_model.Kind)
+
+ path = node.find_parents(fltr)
+ path = list(path)
+ path.reverse()
+ path.append(node)
+
+ return ".".join((i.name for i in path))
+
+##
+## Filters
+##
+
+# abcDef.xyz -> ABC_DEF_XYZ
+def csym(name):
+ """
+ Convert an entry name string into an uppercase C symbol.
+
+ Returns:
+ A string
+
+ Example:
+ csym('abcDef.xyz') == 'ABC_DEF_XYZ'
+ """
+ newstr = name
+ newstr = "".join([i.isupper() and ("_" + i) or i for i in newstr]).upper()
+ newstr = newstr.replace(".", "_")
+ return newstr
+
+# abcDef.xyz -> abc_def_xyz
+def csyml(name):
+ """
+ Convert an entry name string into a lowercase C symbol.
+
+ Returns:
+ A string
+
+ Example:
+ csyml('abcDef.xyz') == 'abc_def_xyz'
+ """
+ return csym(name).lower()
+
+# pad with spaces to make string len == size. add new line if too big
+def ljust(size, indent=4):
+ """
+ Creates a function that given a string will pad it with spaces to make
+ the string length == size. Adds a new line if the string was too big.
+
+ Args:
+ size: an integer representing how much spacing should be added
+ indent: an integer representing the initial indendation level
+
+ Returns:
+ A function that takes a string and returns a string.
+
+ Example:
+ ljust(8)("hello") == 'hello '
+
+ Remarks:
+ Deprecated. Use pad instead since it works for non-first items in a
+ Mako template.
+ """
+ def inner(what):
+ newstr = what.ljust(size)
+ if len(newstr) > size:
+ return what + "\n" + "".ljust(indent + size)
+ else:
+ return newstr
+ return inner
+
+def _find_new_line():
+
+ if _context_buf is None:
+ raise ValueError("Context buffer was not set")
+
+ buf = _context_buf
+ x = -1 # since the first read is always ''
+ cur_pos = buf.tell()
+ while buf.tell() > 0 and buf.read(1) != '\n':
+ buf.seek(cur_pos - x)
+ x = x + 1
+
+ buf.seek(cur_pos)
+
+ return int(x)
+
+# Pad the string until the buffer reaches the desired column.
+# If string is too long, insert a new line with 'col' spaces instead
+def pad(col):
+ """
+ Create a function that given a string will pad it to the specified column col.
+ If the string overflows the column, put the string on a new line and pad it.
+
+ Args:
+ col: an integer specifying the column number
+
+ Returns:
+ A function that given a string will produce a padded string.
+
+ Example:
+ pad(8)("hello") == 'hello '
+
+ Remarks:
+ This keeps track of the line written by Mako so far, so it will always
+ align to the column number correctly.
+ """
+ def inner(what):
+ wut = int(col)
+ current_col = _find_new_line()
+
+ if len(what) > wut - current_col:
+ return what + "\n".ljust(col)
+ else:
+ return what.ljust(wut - current_col)
+ return inner
+
+# int32 -> TYPE_INT32, byte -> TYPE_BYTE, etc. note that enum -> TYPE_INT32
+def ctype_enum(what):
+ """
+ Generate a camera_metadata_type_t symbol from a type string.
+
+ Args:
+ what: a type string
+
+ Returns:
+ A string representing the camera_metadata_type_t
+
+ Example:
+ ctype_enum('int32') == 'TYPE_INT32'
+ ctype_enum('int64') == 'TYPE_INT64'
+ ctype_enum('float') == 'TYPE_FLOAT'
+
+ Remarks:
+ An enum is coerced to a byte since the rest of the camera_metadata
+ code doesn't support enums directly yet.
+ """
+ return 'TYPE_%s' %(what.upper())
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
new file mode 100644
index 00000000..fa85a58e
--- /dev/null
+++ b/camera/docs/metadata_model.py
@@ -0,0 +1,1175 @@
+#!/usr/bin/python
+
+#
+# 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.
+#
+
+"""
+A set of classes (models) each closely representing an XML node in the
+metadata_properties.xml file.
+
+ Node: Base class for most nodes.
+ Entry: A node corresponding to <entry> elements.
+ Clone: A node corresponding to <clone> elements.
+ Kind: A node corresponding to <dynamic>, <static>, <controls> elements.
+ InnerNamespace: A node corresponding to a <namespace> nested under a <kind>.
+ OuterNamespace: A node corresponding to a <namespace> with <kind> children.
+ Section: A node corresponding to a <section> element.
+ Enum: A class corresponding an <enum> element within an <entry>
+ Value: A class corresponding to a <value> element within an Enum
+ Metadata: Root node that also provides tree construction functionality.
+ Tag: A node corresponding to a top level <tag> element.
+"""
+
+import sys
+import itertools
+from collections import OrderedDict
+
+class Node(object):
+ """
+ Base class for most nodes that are part of the Metadata graph.
+
+ Attributes (Read-Only):
+ parent: An edge to a parent Node.
+ name: A string describing the name, usually but not always the 'name'
+ attribute of the corresponding XML node.
+ """
+
+ def __init__(self):
+ self._parent = None
+ self._name = None
+
+ @property
+ def parent(self):
+ return self._parent
+
+ @property
+ def name(self):
+ return self._name
+
+ def find_all(self, pred):
+ """
+ Find all descendants that match the predicate.
+
+ Args:
+ pred: a predicate function that acts as a filter for a Node
+
+ Yields:
+ A sequence of all descendants for which pred(node) is true,
+ in a pre-order visit order.
+ """
+ if pred(self):
+ yield self
+
+ if self._get_children() is None:
+ return
+
+ for i in self._get_children():
+ for j in i.find_all(pred):
+ yield j
+
+
+ def find_first(self, pred):
+ """
+ Find the first descendant that matches the predicate.
+
+ Args:
+ pred: a predicate function that acts as a filter for a Node
+
+ Returns:
+ The first Node from find_all(pred), or None if there were no results.
+ """
+ for i in self.find_all(pred):
+ return i
+
+ return None
+
+ def find_parent_first(self, pred):
+ """
+ Find the first ancestor that matches the predicate.
+
+ Args:
+ pred: A predicate function that acts as a filter for a Node
+
+ Returns:
+ The first ancestor closest to the node for which pred(node) is true.
+ """
+ for i in self.find_parents(pred):
+ return i
+
+ return None
+
+ def find_parents(self, pred):
+ """
+ Find all ancestors that match the predicate.
+
+ Args:
+ pred: A predicate function that acts as a filter for a Node
+
+ Yields:
+ A sequence of all ancestors (closest to furthest) from the node,
+ where pred(node) is true.
+ """
+ parent = self.parent
+
+ while parent is not None:
+ if pred(parent):
+ yield parent
+ parent = parent.parent
+
+ def sort_children(self):
+ """
+ Sorts the immediate children in-place.
+ """
+ self._sort_by_name(self._children)
+
+ def _sort_by_name(self, what):
+ what.sort(key=lambda x: x.name)
+
+ def _get_name(self):
+ return lambda x: x.name
+
+ # Iterate over all children nodes. None when node doesn't support children.
+ def _get_children(self):
+ return (i for i in self._children)
+
+ def _children_name_map_matching(self, match=lambda x: True):
+ d = {}
+ for i in _get_children():
+ if match(i):
+ d[i.name] = i
+ return d
+
+ @staticmethod
+ def _dictionary_by_name(values):
+ d = OrderedDict()
+ for i in values:
+ d[i.name] = i
+
+ return d
+
+ def validate_tree(self):
+ """
+ Sanity check the tree recursively, ensuring for a node n, all children's
+ parents are also n.
+
+ Returns:
+ True if validation succeeds, False otherwise.
+ """
+ succ = True
+ children = self._get_children()
+ if children is None:
+ return True
+
+ for child in self._get_children():
+ if child.parent != self:
+ print >> sys.stderr, ("ERROR: Node '%s' doesn't match the parent" + \
+ "(expected: %s, actual %s)") \
+ %(child, self, child.parent)
+ succ = False
+
+ succ = child.validate_tree() and succ
+
+ return succ
+
+ def __str__(self):
+ return "<%s name='%s'>" %(self.__class__, self.name)
+
+class Metadata(Node):
+ """
+ A node corresponding to a <metadata> entry.
+
+ Attributes (Read-Only):
+ parent: An edge to the parent Node. This is always None for Metadata.
+ outer_namespaces: A sequence of immediate OuterNamespace children.
+ tags: A sequence of all Tag instances available in the graph.
+ """
+
+ def __init__(self):
+ """
+ Initialize with no children. Use insert_* functions and then
+ construct_graph() to build up the Metadata from some source.
+ """
+
+# Private
+ self._entries = []
+ # kind => { name => entry }
+ self._entry_map = { 'static': {}, 'dynamic': {}, 'controls': {} }
+ self._entries_ordered = [] # list of ordered Entry/Clone instances
+ self._clones = []
+
+# Public (Read Only)
+ self._parent = None
+ self._outer_namespaces = None
+ self._tags = []
+
+ @property
+ def outer_namespaces(self):
+ if self._outer_namespaces is None:
+ return None
+ else:
+ return (i for i in self._outer_namespaces)
+
+ @property
+ def tags(self):
+ return (i for i in self._tags)
+
+ def _get_properties(self):
+
+ for i in self._entries:
+ yield i
+
+ for i in self._clones:
+ yield i
+
+ def insert_tag(self, tag, description=""):
+ """
+ Insert a tag into the metadata.
+
+ Args:
+ tag: A string identifier for a tag.
+ description: A string description for a tag.
+
+ Example:
+ metadata.insert_tag("BC", "Backwards Compatibility for old API")
+
+ Remarks:
+ Subsequent calls to insert_tag with the same tag are safe (they will
+ be ignored).
+ """
+ tag_ids = [tg.name for tg in self.tags if tg.name == tag]
+ if not tag_ids:
+ self._tags.append(Tag(tag, self, description))
+
+ def insert_entry(self, entry):
+ """
+ Insert an entry into the metadata.
+
+ Args:
+ entry: A key-value dictionary describing an entry. Refer to
+ Entry#__init__ for the keys required/optional.
+
+ Remarks:
+ Subsequent calls to insert_entry with the same entry+kind name are safe
+ (they will be ignored).
+ """
+ e = Entry(**entry)
+ self._entries.append(e)
+ self._entry_map[e.kind][e.name] = e
+ self._entries_ordered.append(e)
+
+ def insert_clone(self, clone):
+ """
+ Insert a clone into the metadata.
+
+ Args:
+ clone: A key-value dictionary describing a clone. Refer to
+ Clone#__init__ for the keys required/optional.
+
+ Remarks:
+ Subsequent calls to insert_clone with the same clone+kind name are safe
+ (they will be ignored). Also the target entry need not be inserted
+ ahead of the clone entry.
+ """
+ entry_name = clone['name']
+ # figure out corresponding entry later. allow clone insert, entry insert
+ entry = None
+ c = Clone(entry, **clone)
+ self._entry_map[c.kind][c.name] = c
+ self._clones.append(c)
+ self._entries_ordered.append(c)
+
+ def prune_clones(self):
+ """
+ Remove all clones that don't point to an existing entry.
+
+ Remarks:
+ This should be called after all insert_entry/insert_clone calls have
+ finished.
+ """
+ remove_list = []
+ for p in self._clones:
+ if p.entry is None:
+ remove_list.append(p)
+
+ for p in remove_list:
+
+ # remove from parent's entries list
+ if p.parent is not None:
+ p.parent._entries.remove(p)
+ # remove from parents' _leafs list
+ for ancestor in p.find_parents(lambda x: not isinstance(x, MetadataSet)):
+ ancestor._leafs.remove(p)
+
+ # remove from global list
+ self._clones.remove(p)
+ self._entry_map[p.kind].pop(p.name)
+ self._entries_ordered.remove(p)
+
+
+ # After all entries/clones are inserted,
+ # invoke this to generate the parent/child node graph all these objects
+ def construct_graph(self):
+ """
+ Generate the graph recursively, after which all Entry nodes will be
+ accessible recursively by crawling through the outer_namespaces sequence.
+
+ Remarks:
+ This is safe to be called multiple times at any time. It should be done at
+ least once or there will be no graph.
+ """
+ self.validate_tree()
+ self._construct_tags()
+ self.validate_tree()
+ self._construct_clones()
+ self.validate_tree()
+ self._construct_outer_namespaces()
+ self.validate_tree()
+
+ def _construct_tags(self):
+ tag_dict = self._dictionary_by_name(self.tags)
+ for p in self._get_properties():
+ p._tags = []
+ for tag_id in p._tag_ids:
+ tag = tag_dict.get(tag_id)
+
+ if tag not in p._tags:
+ p._tags.append(tag)
+
+ if p not in tag.entries:
+ tag._entries.append(p)
+
+ def _construct_clones(self):
+ for p in self._clones:
+ target_kind = p.target_kind
+ target_entry = self._entry_map[target_kind].get(p.name)
+ p._entry = target_entry
+
+ # should not throw if we pass validation
+ # but can happen when importing obsolete CSV entries
+ if target_entry is None:
+ print >> sys.stderr, ("WARNING: Clone entry '%s' target kind '%s'" + \
+ " has no corresponding entry") \
+ %(p.name, p.target_kind)
+
+ def _construct_outer_namespaces(self):
+
+ if self._outer_namespaces is None: #the first time this runs
+ self._outer_namespaces = []
+
+ root = self._dictionary_by_name(self._outer_namespaces)
+ for ons_name, ons in root.iteritems():
+ ons._leafs = []
+
+ for p in self._entries_ordered:
+ ons_name = p.get_outer_namespace()
+ ons = root.get(ons_name, OuterNamespace(ons_name, self))
+ root[ons_name] = ons
+
+ if p not in ons._leafs:
+ ons._leafs.append(p)
+
+ for ons_name, ons in root.iteritems():
+
+ ons.validate_tree()
+
+ self._construct_sections(ons)
+
+ if ons not in self._outer_namespaces:
+ self._outer_namespaces.append(ons)
+
+ ons.validate_tree()
+
+ def _construct_sections(self, outer_namespace):
+
+ sections_dict = self._dictionary_by_name(outer_namespace.sections)
+ for sec_name, sec in sections_dict.iteritems():
+ sec._leafs = []
+ sec.validate_tree()
+
+ for p in outer_namespace._leafs:
+ does_exist = sections_dict.get(p.get_section())
+
+ sec = sections_dict.get(p.get_section(), \
+ Section(p.get_section(), outer_namespace))
+ sections_dict[p.get_section()] = sec
+
+ sec.validate_tree()
+
+ if p not in sec._leafs:
+ sec._leafs.append(p)
+
+ for sec_name, sec in sections_dict.iteritems():
+
+ if not sec.validate_tree():
+ print >> sys.stderr, ("ERROR: Failed to validate tree in " + \
+ "construct_sections (start), with section = '%s'")\
+ %(sec)
+
+ self._construct_kinds(sec)
+
+ if sec not in outer_namespace.sections:
+ outer_namespace._sections.append(sec)
+
+ if not sec.validate_tree():
+ print >> sys.stderr, ("ERROR: Failed to validate tree in " + \
+ "construct_sections (end), with section = '%s'") \
+ %(sec)
+
+ # 'controls', 'static' 'dynamic'. etc
+ def _construct_kinds(self, section):
+ for kind in section.kinds:
+ kind._leafs = []
+ section.validate_tree()
+
+ group_entry_by_kind = itertools.groupby(section._leafs, lambda x: x.kind)
+ leaf_it = ((k, g) for k, g in group_entry_by_kind)
+
+ # allow multiple kinds with the same name. merge if adjacent
+ # e.g. dynamic,dynamic,static,static,dynamic -> dynamic,static,dynamic
+ # this helps maintain ABI compatibility when adding an entry in a new kind
+ for idx, (kind_name, entry_it) in enumerate(leaf_it):
+ if idx >= len(section._kinds):
+ kind = Kind(kind_name, section)
+ section._kinds.append(kind)
+ section.validate_tree()
+
+ kind = section._kinds[idx]
+
+ for p in entry_it:
+ if p not in kind._leafs:
+ kind._leafs.append(p)
+
+ for kind in section._kinds:
+ kind.validate_tree()
+ self._construct_inner_namespaces(kind)
+ kind.validate_tree()
+ self._construct_entries(kind)
+ kind.validate_tree()
+
+ if not section.validate_tree():
+ print >> sys.stderr, ("ERROR: Failed to validate tree in " + \
+ "construct_kinds, with kind = '%s'") %(kind)
+
+ if not kind.validate_tree():
+ print >> sys.stderr, ("ERROR: Failed to validate tree in " + \
+ "construct_kinds, with kind = '%s'") %(kind)
+
+ def _construct_inner_namespaces(self, parent, depth=0):
+ #parent is InnerNamespace or Kind
+ ins_dict = self._dictionary_by_name(parent.namespaces)
+ for name, ins in ins_dict.iteritems():
+ ins._leafs = []
+
+ for p in parent._leafs:
+ ins_list = p.get_inner_namespace_list()
+
+ if len(ins_list) > depth:
+ ins_str = ins_list[depth]
+ ins = ins_dict.get(ins_str, InnerNamespace(ins_str, parent))
+ ins_dict[ins_str] = ins
+
+ if p not in ins._leafs:
+ ins._leafs.append(p)
+
+ for name, ins in ins_dict.iteritems():
+ ins.validate_tree()
+ # construct children INS
+ self._construct_inner_namespaces(ins, depth + 1)
+ ins.validate_tree()
+ # construct children entries
+ self._construct_entries(ins, depth + 1)
+
+ if ins not in parent.namespaces:
+ parent._namespaces.append(ins)
+
+ if not ins.validate_tree():
+ print >> sys.stderr, ("ERROR: Failed to validate tree in " + \
+ "construct_inner_namespaces, with ins = '%s'") \
+ %(ins)
+
+ # doesnt construct the entries, so much as links them
+ def _construct_entries(self, parent, depth=0):
+ #parent is InnerNamespace or Kind
+ entry_dict = self._dictionary_by_name(parent.entries)
+ for p in parent._leafs:
+ ins_list = p.get_inner_namespace_list()
+
+ if len(ins_list) == depth:
+ entry = entry_dict.get(p.name, p)
+ entry_dict[p.name] = entry
+
+ for name, entry in entry_dict.iteritems():
+
+ old_parent = entry.parent
+ entry._parent = parent
+
+ if entry not in parent.entries:
+ parent._entries.append(entry)
+
+ if old_parent is not None and old_parent != parent:
+ print >> sys.stderr, ("ERROR: Parent changed from '%s' to '%s' for " + \
+ "entry '%s'") \
+ %(old_parent.name, parent.name, entry.name)
+
+ def _get_children(self):
+ if self.outer_namespaces is not None:
+ for i in self.outer_namespaces:
+ yield i
+
+ if self.tags is not None:
+ for i in self.tags:
+ yield i
+
+class Tag(Node):
+ """
+ A tag Node corresponding to a top-level <tag> element.
+
+ Attributes (Read-Only):
+ name: alias for id
+ id: The name of the tag, e.g. for <tag id="BC"/> id = 'BC'
+ description: The description of the tag, the contents of the <tag> element.
+ parent: An edge to the parent, which is always the Metadata root node.
+ entries: A sequence of edges to entries/clones that are using this Tag.
+ """
+ def __init__(self, name, parent, description=""):
+ self._name = name # 'id' attribute in XML
+ self._id = name
+ self._description = description
+ self._parent = parent
+
+ # all entries that have this tag, including clones
+ self._entries = [] # filled in by Metadata#construct_tags
+
+ @property
+ def id(self):
+ return self._id
+
+ @property
+ def description(self):
+ return self._description
+
+ @property
+ def entries(self):
+ return (i for i in self._entries)
+
+ def _get_children(self):
+ return None
+
+class OuterNamespace(Node):
+ """
+ A node corresponding to a <namespace> element under <metadata>
+
+ Attributes (Read-Only):
+ name: The name attribute of the <namespace name="foo"> element.
+ parent: An edge to the parent, which is always the Metadata root node.
+ sections: A sequence of Section children.
+ """
+ def __init__(self, name, parent, sections=[]):
+ self._name = name
+ self._parent = parent # MetadataSet
+ self._sections = sections[:]
+ self._leafs = []
+
+ self._children = self._sections
+
+ @property
+ def sections(self):
+ return (i for i in self._sections)
+
+class Section(Node):
+ """
+ A node corresponding to a <section> element under <namespace>
+
+ Attributes (Read-Only):
+ name: The name attribute of the <section name="foo"> element.
+ parent: An edge to the parent, which is always an OuterNamespace instance.
+ description: A string description of the section, or None.
+ kinds: A sequence of Kind children.
+ merged_kinds: A sequence of virtual Kind children,
+ with each Kind's children merged by the kind.name
+ """
+ def __init__(self, name, parent, description=None, kinds=[]):
+ self._name = name
+ self._parent = parent
+ self._description = description
+ self._kinds = kinds[:]
+
+ self._leafs = []
+
+
+ @property
+ def description(self):
+ return self._description
+
+ @property
+ def kinds(self):
+ return (i for i in self._kinds)
+
+ def sort_children(self):
+ self.validate_tree()
+ # order is always controls,static,dynamic
+ find_child = lambda x: [i for i in self._get_children() if i.name == x]
+ new_lst = find_child('controls') \
+ + find_child('static') \
+ + find_child('dynamic')
+ self._kinds = new_lst
+ self.validate_tree()
+
+ def _get_children(self):
+ return (i for i in self.kinds)
+
+ @property
+ def merged_kinds(self):
+
+ def aggregate_by_name(acc, el):
+ existing = [i for i in acc if i.name == el.name]
+ if existing:
+ k = existing[0]
+ else:
+ k = Kind(el.name, el.parent)
+ acc.append(k)
+
+ k._namespaces.extend(el._namespaces)
+ k._entries.extend(el._entries)
+
+ return acc
+
+ new_kinds_lst = reduce(aggregate_by_name, self.kinds, [])
+
+ for k in new_kinds_lst:
+ yield k
+
+class Kind(Node):
+ """
+ A node corresponding to one of: <static>,<dynamic>,<controls> under a
+ <section> element.
+
+ Attributes (Read-Only):
+ name: A string which is one of 'static', 'dynamic, or 'controls'.
+ parent: An edge to the parent, which is always a Section instance.
+ namespaces: A sequence of InnerNamespace children.
+ entries: A sequence of Entry/Clone children.
+ merged_entries: A sequence of MergedEntry virtual nodes from entries
+ """
+ def __init__(self, name, parent):
+ self._name = name
+ self._parent = parent
+ self._namespaces = []
+ self._entries = []
+
+ self._leafs = []
+
+ @property
+ def namespaces(self):
+ return self._namespaces
+
+ @property
+ def entries(self):
+ return self._entries
+
+ @property
+ def merged_entries(self):
+ for i in self.entries:
+ yield i.merge()
+
+ def sort_children(self):
+ self._namespaces.sort(key=self._get_name())
+ self._entries.sort(key=self._get_name())
+
+ def _get_children(self):
+ for i in self.namespaces:
+ yield i
+ for i in self.entries:
+ yield i
+
+class InnerNamespace(Node):
+ """
+ A node corresponding to a <namespace> which is an ancestor of a Kind.
+ These namespaces may have other namespaces recursively, or entries as leafs.
+
+ Attributes (Read-Only):
+ name: Name attribute from the element, e.g. <namespace name="foo"> -> 'foo'
+ parent: An edge to the parent, which is an InnerNamespace or a Kind.
+ namespaces: A sequence of InnerNamespace children.
+ entries: A sequence of Entry/Clone children.
+ merged_entries: A sequence of MergedEntry virtual nodes from entries
+ """
+ def __init__(self, name, parent):
+ self._name = name
+ self._parent = parent
+ self._namespaces = []
+ self._entries = []
+ self._leafs = []
+
+ @property
+ def namespaces(self):
+ return self._namespaces
+
+ @property
+ def entries(self):
+ return self._entries
+
+ @property
+ def merged_entries(self):
+ for i in self.entries:
+ yield i.merge()
+
+ def sort_children(self):
+ self._namespaces.sort(key=self._get_name())
+ self._entries.sort(key=self._get_name())
+
+ def _get_children(self):
+ for i in self.namespaces:
+ yield i
+ for i in self.entries:
+ yield i
+
+class EnumValue(Node):
+ """
+ A class corresponding to a <value> element within an <enum> within an <entry>.
+
+ Attributes (Read-Only):
+ name: A string, e.g. 'ON' or 'OFF'
+ id: An optional numeric string, e.g. '0' or '0xFF'
+ optional: A boolean
+ notes: A string describing the notes, or None.
+ parent: An edge to the parent, always an Enum instance.
+ """
+ def __init__(self, name, parent, id=None, optional=False, notes=None):
+ self._name = name # str, e.g. 'ON' or 'OFF'
+ self._id = id # int, e.g. '0'
+ self._optional = optional # bool
+ self._notes = notes # None or str
+ self._parent = parent
+
+ @property
+ def id(self):
+ return self._id
+
+ @property
+ def optional(self):
+ return self._optional
+
+ @property
+ def notes(self):
+ return self._notes
+
+ def _get_children(self):
+ return None
+
+class Enum(Node):
+ """
+ A class corresponding to an <enum> element within an <entry>.
+
+ Attributes (Read-Only):
+ parent: An edge to the parent, always an Entry instance.
+ values: A sequence of EnumValue children.
+ """
+ def __init__(self, parent, values, ids={}, optionals=[], notes={}):
+ self._values = \
+ [ EnumValue(val, self, ids.get(val), val in optionals, notes.get(val)) \
+ for val in values ]
+
+ self._parent = parent
+ self._name = None
+
+ @property
+ def values(self):
+ return (i for i in self._values)
+
+ def _get_children(self):
+ return (i for i in self._values)
+
+class Entry(Node):
+ """
+ A node corresponding to an <entry> element.
+
+ Attributes (Read-Only):
+ parent: An edge to the parent node, which is an InnerNamespace or Kind.
+ name: The fully qualified name string, e.g. 'android.shading.mode'
+ name_short: The name attribute from <entry name="mode">, e.g. mode
+ type: The type attribute from <entry type="bar">
+ kind: A string ('static', 'dynamic', 'controls') corresponding to the
+ ancestor Kind#name
+ container: The container attribute from <entry container="array">, or None.
+ container_sizes: A sequence of size strings or None if container is None.
+ enum: An Enum instance if the enum attribute is true, None otherwise.
+ tuple_values: A sequence of strings describing the tuple values,
+ None if container is not 'tuple'.
+ description: A string description, or None.
+ range: A string range, or None.
+ units: A string units, or None.
+ tags: A sequence of Tag nodes associated with this Entry.
+ type_notes: A string describing notes for the type, or None.
+
+ Remarks:
+ Subclass Clone can be used interchangeable with an Entry,
+ for when we don't care about the underlying type.
+
+ parent and tags edges are invalid until after Metadata#construct_graph
+ has been invoked.
+ """
+ def __init__(self, **kwargs):
+ """
+ Instantiate a new Entry node.
+
+ Args:
+ name: A string with the fully qualified name, e.g. 'android.shading.mode'
+ type: A string describing the type, e.g. 'int32'
+ kind: A string describing the kind, e.g. 'static'
+
+ Args (if container):
+ container: A string describing the container, e.g. 'array' or 'tuple'
+ container_sizes: A list of string sizes if a container, or None otherwise
+
+ Args (if container is 'tuple'):
+ tuple_values: A list of tuple values, e.g. ['width', 'height']
+
+ Args (if the 'enum' attribute is true):
+ enum: A boolean, True if this is an enum, False otherwise
+ enum_values: A list of value strings, e.g. ['ON', 'OFF']
+ enum_optionals: A list of optional enum values, e.g. ['OFF']
+ enum_notes: A dictionary of value->notes strings.
+ enum_ids: A dictionary of value->id strings.
+
+ Args (optional):
+ description: A string with a description of the entry.
+ range: A string with the range of the values of the entry, e.g. '>= 0'
+ units: A string with the units of the values, e.g. 'inches'
+ notes: A string with the notes for the entry
+ tag_ids: A list of tag ID strings, e.g. ['BC', 'V1']
+ type_notes: A string with the notes for the type
+ """
+
+ if kwargs.get('type') is None:
+ print >> sys.stderr, "ERROR: Missing type for entry '%s' kind '%s'" \
+ %(kwargs.get('name'), kwargs.get('kind'))
+
+ # Attributes are Read-Only, but edges may be mutated by
+ # Metadata, particularly during construct_graph
+
+ self._name = kwargs['name']
+ self._type = kwargs['type']
+ self._kind = kwargs['kind'] # static, dynamic, or controls
+
+ self._init_common(**kwargs)
+
+ @property
+ def type(self):
+ return self._type
+
+ @property
+ def kind(self):
+ return self._kind
+
+ @property
+ def name_short(self):
+ return self.get_name_minimal()
+
+ @property
+ def container(self):
+ return self._container
+
+ @property
+ def container_sizes(self):
+ if self._container_sizes is None:
+ return None
+ else:
+ return (i for i in self._container_sizes)
+
+ @property
+ def tuple_values(self):
+ if self._tuple_values is None:
+ return None
+ else:
+ return (i for i in self._tuple_values)
+
+ @property
+ def description(self):
+ return self._description
+
+ @property
+ def range(self):
+ return self._range
+
+ @property
+ def units(self):
+ return self._units
+
+ @property
+ def notes(self):
+ return self._notes
+
+ @property
+ def tags(self):
+ if self._tags is None:
+ return None
+ else:
+ return (i for i in self._tags)
+
+ @property
+ def type_notes(self):
+ return self._type_notes
+
+ @property
+ def enum(self):
+ return self._enum
+
+ def _get_children(self):
+ if self.enum:
+ yield self.enum
+
+ def sort_children(self):
+ return None
+
+ def is_clone(self):
+ """
+ Whether or not this is a Clone instance.
+
+ Returns:
+ False
+ """
+ return False
+
+ def _init_common(self, **kwargs):
+
+ self._parent = None # filled in by MetadataSet::_construct_entries
+
+ self._container = kwargs.get('container')
+ self._container_sizes = kwargs.get('container_sizes')
+
+ # access these via the 'enum' prop
+ enum_values = kwargs.get('enum_values')
+ enum_optionals = kwargs.get('enum_optionals')
+ enum_notes = kwargs.get('enum_notes') # { value => notes }
+ enum_ids = kwargs.get('enum_ids') # { value => notes }
+ self._tuple_values = kwargs.get('tuple_values')
+
+ self._description = kwargs.get('description')
+ self._range = kwargs.get('range')
+ self._units = kwargs.get('units')
+ self._notes = kwargs.get('notes')
+
+ self._tag_ids = kwargs.get('tag_ids', [])
+ self._tags = None # Filled in by MetadataSet::_construct_tags
+
+ self._type_notes = kwargs.get('type_notes')
+
+ if kwargs.get('enum', False):
+ self._enum = Enum(self, enum_values, enum_ids, enum_optionals, enum_notes)
+ else:
+ self._enum = None
+
+ self._property_keys = kwargs
+
+ def merge(self):
+ """
+ Copy the attributes into a new entry, merging it with the target entry
+ if it's a clone.
+ """
+ return MergedEntry(self)
+
+ # Helpers for accessing less than the fully qualified name
+
+ def get_name_as_list(self):
+ """
+ Returns the name as a list split by a period.
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_name_as_list() == ['android', 'lens', 'info', 'shading']
+ """
+ return self.name.split(".")
+
+ def get_inner_namespace_list(self):
+ """
+ Returns the inner namespace part of the name as a list
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_inner_namespace_list() == ['info']
+ """
+ return self.get_name_as_list()[2:-1]
+
+ def get_outer_namespace(self):
+ """
+ Returns the outer namespace as a string.
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_outer_namespace() == 'android'
+
+ Remarks:
+ Since outer namespaces are non-recursive,
+ and each entry has one, this does not need to be a list.
+ """
+ return self.get_name_as_list()[0]
+
+ def get_section(self):
+ """
+ Returns the section as a string.
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_section() == ''
+
+ Remarks:
+ Since outer namespaces are non-recursive,
+ and each entry has one, this does not need to be a list.
+ """
+ return self.get_name_as_list()[1]
+
+ def get_name_minimal(self):
+ """
+ Returns only the last component of the fully qualified name as a string.
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_name_minimal() == 'shading'
+
+ Remarks:
+ entry.name_short it an alias for this
+ """
+ return self.get_name_as_list()[-1]
+
+ def get_path_without_name(self):
+ """
+ Returns a string path to the entry, with the name component excluded.
+
+ For example:
+ entry.name is 'android.lens.info.shading'
+ entry.get_path_without_name() == 'android.lens.info'
+ """
+ return ".".join(self.get_name_as_list()[0:-1])
+
+
+class Clone(Entry):
+ """
+ A Node corresponding to a <clone> element. It has all the attributes of an
+ <entry> element (Entry) plus the additions specified below.
+
+ Attributes (Read-Only):
+ entry: an edge to an Entry object that this targets
+ target_kind: A string describing the kind of the target entry.
+ name: a string of the name, same as entry.name
+ kind: a string of the Kind ancestor, one of 'static', 'controls', 'dynamic'
+ for the <clone> element.
+ type: always None, since a clone cannot override the type.
+ """
+ def __init__(self, entry=None, **kwargs):
+ """
+ Instantiate a new Clone node.
+
+ Args:
+ name: A string with the fully qualified name, e.g. 'android.shading.mode'
+ type: A string describing the type, e.g. 'int32'
+ kind: A string describing the kind, e.g. 'static'
+ target_kind: A string for the kind of the target entry, e.g. 'dynamic'
+
+ Args (if container):
+ container: A string describing the container, e.g. 'array' or 'tuple'
+ container_sizes: A list of string sizes if a container, or None otherwise
+
+ Args (if container is 'tuple'):
+ tuple_values: A list of tuple values, e.g. ['width', 'height']
+
+ Args (if the 'enum' attribute is true):
+ enum: A boolean, True if this is an enum, False otherwise
+ enum_values: A list of value strings, e.g. ['ON', 'OFF']
+ enum_optionals: A list of optional enum values, e.g. ['OFF']
+ enum_notes: A dictionary of value->notes strings.
+ enum_ids: A dictionary of value->id strings.
+
+ Args (optional):
+ entry: An edge to the corresponding target Entry.
+ description: A string with a description of the entry.
+ range: A string with the range of the values of the entry, e.g. '>= 0'
+ units: A string with the units of the values, e.g. 'inches'
+ notes: A string with the notes for the entry
+ tag_ids: A list of tag ID strings, e.g. ['BC', 'V1']
+ type_notes: A string with the notes for the type
+
+ Remarks:
+ Note that type is not specified since it has to be the same as the
+ entry.type.
+ """
+ self._entry = entry # Entry object
+ self._target_kind = kwargs['target_kind']
+ self._name = kwargs['name'] # same as entry.name
+ self._kind = kwargs['kind']
+
+ # illegal to override the type, it should be the same as the entry
+ self._type = None
+ # the rest of the kwargs are optional
+ # can be used to override the regular entry data
+ self._init_common(**kwargs)
+
+ @property
+ def entry(self):
+ return self._entry
+
+ @property
+ def target_kind(self):
+ return self._target_kind
+
+ def is_clone(self):
+ """
+ Whether or not this is a Clone instance.
+
+ Returns:
+ True
+ """
+ return True
+
+class MergedEntry(Entry):
+ """
+ A MergedEntry has all the attributes of a Clone and its target Entry merged
+ together.
+
+ Remarks:
+ Useful when we want to 'unfold' a clone into a real entry by copying out
+ the target entry data. In this case we don't care about distinguishing
+ a clone vs an entry.
+ """
+ def __init__(self, entry):
+ """
+ Create a new instance of MergedEntry.
+
+ Args:
+ entry: An Entry or Clone instance
+ """
+ props_distinct = ['description', 'units', 'range', 'notes', 'tags', 'kind']
+
+ for p in props_distinct:
+ p = '_' + p
+ if entry.is_clone():
+ setattr(self, p, getattr(entry, p) or getattr(entry.entry, p))
+ else:
+ setattr(self, p, getattr(entry, p))
+
+ props_common = ['parent', 'name', 'container',
+ 'container_sizes', 'enum',
+ 'tuple_values',
+ 'type',
+ 'type_notes',
+ ]
+
+ for p in props_common:
+ p = '_' + p
+ if entry.is_clone():
+ setattr(self, p, getattr(entry.entry, p))
+ else:
+ setattr(self, p, getattr(entry, p))
diff --git a/camera/docs/metadata_parser_xml.py b/camera/docs/metadata_parser_xml.py
new file mode 100755
index 00000000..7b552738
--- /dev/null
+++ b/camera/docs/metadata_parser_xml.py
@@ -0,0 +1,268 @@
+#!/usr/bin/python
+
+#
+# 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.
+#
+
+"""
+A parser for metadata_properties.xml can also render the resulting model
+over a Mako template.
+
+Usage:
+ metadata_parser_xml.py <filename.xml> <template.mako> [<output_file>]
+ - outputs the resulting template to output_file (stdout if none specified)
+
+Module:
+ The parser is also available as a module import (MetadataParserXml) to use
+ in other modules.
+
+Dependencies:
+ BeautifulSoup - an HTML/XML parser available to download from
+ http://www.crummy.com/software/BeautifulSoup/
+ Mako - a template engine for Python, available to download from
+ http://www.makotemplates.org/
+"""
+
+import sys
+import os
+import StringIO
+
+from bs4 import BeautifulSoup
+from bs4 import NavigableString
+
+from mako.template import Template
+from mako.lookup import TemplateLookup
+from mako.runtime import Context
+
+from metadata_model import *
+import metadata_model
+from metadata_validate import *
+import metadata_helpers
+
+class MetadataParserXml:
+ """
+ A class to parse any XML file that passes validation with metadata-validate.
+ It builds a metadata_model.Metadata graph and then renders it over a
+ Mako template.
+
+ Attributes (Read-Only):
+ soup: an instance of BeautifulSoup corresponding to the XML contents
+ metadata: a constructed instance of metadata_model.Metadata
+ """
+ def __init__(self, file_name):
+ """
+ Construct a new MetadataParserXml, immediately try to parse it into a
+ metadata model.
+
+ Args:
+ file_name: path to an XML file that passes metadata-validate
+
+ Raises:
+ ValueError: if the XML file failed to pass metadata_validate.py
+ """
+ self._soup = validate_xml(file_name)
+
+ if self._soup is None:
+ raise ValueError("%s has an invalid XML file" %(file_name))
+
+ self._metadata = Metadata()
+ self._parse()
+ self._metadata.construct_graph()
+
+ @property
+ def soup(self):
+ return self._soup
+
+ @property
+ def metadata(self):
+ return self._metadata
+
+ @staticmethod
+ def _find_direct_strings(element):
+ if element.string is not None:
+ return [element.string]
+
+ return [i for i in element.contents if isinstance(i, NavigableString)]
+
+ @staticmethod
+ def _strings_no_nl(element):
+ return "".join([i.strip() for i in MetadataParserXml._find_direct_strings(element)])
+
+ def _parse(self):
+
+ tags = self.soup.tags
+ if tags is not None:
+ for tag in tags.find_all('tag'):
+ self.metadata.insert_tag(tag['id'], tag.string)
+
+ # add all entries, preserving the ordering of the XML file
+ # this is important for future ABI compatibility when generating code
+ entry_filter = lambda x: x.name == 'entry' or x.name == 'clone'
+ for entry in self.soup.find_all(entry_filter):
+ if entry.name == 'entry':
+ d = {
+ 'name': fully_qualified_name(entry),
+ 'type': entry['type'],
+ 'kind': find_kind(entry),
+ 'type_notes': entry.attrs.get('type_notes')
+ }
+
+ d2 = self._parse_entry(entry)
+ insert = self.metadata.insert_entry
+ else:
+ d = {
+ 'name': entry['entry'],
+ 'kind': find_kind(entry),
+ 'target_kind': entry['kind'],
+ # no type since its the same
+ # no type_notes since its the same
+ }
+ d2 = {}
+
+ insert = self.metadata.insert_clone
+
+ d3 = self._parse_entry_optional(entry)
+
+ entry_dict = dict(d.items() + d2.items() + d3.items())
+ insert(entry_dict)
+
+ self.metadata.construct_graph()
+
+ def _parse_entry(self, entry):
+ d = {}
+
+ #
+ # Enum
+ #
+ if entry.get('enum', 'false') == 'true':
+
+ enum_values = []
+ enum_optionals = []
+ enum_notes = {}
+ enum_ids = {}
+ for value in entry.enum.find_all('value'):
+
+ value_body = self._strings_no_nl(value)
+ enum_values.append(value_body)
+
+ if value.attrs.get('optional', 'false') == 'true':
+ enum_optionals.append(value_body)
+
+ notes = value.find('notes')
+ if notes is not None:
+ enum_notes[value_body] = notes.string
+
+ if value.attrs.get('id') is not None:
+ enum_ids[value_body] = value['id']
+
+ d['enum_values'] = enum_values
+ d['enum_optionals'] = enum_optionals
+ d['enum_notes'] = enum_notes
+ d['enum_ids'] = enum_ids
+ d['enum'] = True
+
+ #
+ # Container (Array/Tuple)
+ #
+ if entry.attrs.get('container') is not None:
+ container_name = entry['container']
+
+ array = entry.find('array')
+ if array is not None:
+ array_sizes = []
+ for size in array.find_all('size'):
+ array_sizes.append(size.string)
+ d['container_sizes'] = array_sizes
+
+ tupl = entry.find('tuple')
+ if tupl is not None:
+ tupl_values = []
+ for val in tupl.find_all('value'):
+ tupl_values.append(val.name)
+ d['tuple_values'] = tupl_values
+ d['container_sizes'] = len(tupl_values)
+
+ d['container'] = container_name
+
+ return d
+
+ def _parse_entry_optional(self, entry):
+ d = {}
+
+ optional_elements = ['description', 'range', 'units', 'notes']
+ for i in optional_elements:
+ prop = find_child_tag(entry, i)
+
+ if prop is not None:
+ d[i] = prop.string
+
+ tag_ids = []
+ for tag in entry.find_all('tag'):
+ tag_ids.append(tag['id'])
+
+ d['tag_ids'] = tag_ids
+
+ return d
+
+ def render(self, template, output_name=None):
+ """
+ Render the metadata model using a Mako template as the view.
+
+ The template gets the metadata as an argument, as well as all
+ public attributes from the metadata_helpers module.
+
+ Args:
+ template: path to a Mako template file
+ output_name: path to the output file, or None to use stdout
+ """
+ buf = StringIO.StringIO()
+ metadata_helpers._context_buf = buf
+
+ helpers = [(i, getattr(metadata_helpers, i))
+ for i in dir(metadata_helpers) if not i.startswith('_')]
+ helpers = dict(helpers)
+
+ lookup = TemplateLookup(directories=[os.getcwd()])
+ tpl = Template(filename=template, lookup=lookup)
+
+ ctx = Context(buf, metadata=self.metadata, **helpers)
+ tpl.render_context(ctx)
+
+ tpl_data = buf.getvalue()
+ metadata_helpers._context_buf = None
+ buf.close()
+
+ if output_name is None:
+ print tpl_data
+ else:
+ file(output_name, "w").write(tpl_data)
+
+#####################
+#####################
+
+if __name__ == "__main__":
+ if len(sys.argv) <= 2:
+ print >> sys.stderr, \
+ "Usage: %s <filename.xml> <template.mako> [<output_file>]" \
+ % (sys.argv[0])
+ sys.exit(0)
+
+ file_name = sys.argv[1]
+ template_name = sys.argv[2]
+ output_name = sys.argv[3] if len(sys.argv) > 3 else None
+ parser = MetadataParserXml(file_name)
+ parser.render(template_name, output_name)
+
+ sys.exit(0)
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
new file mode 100644
index 00000000..2980c8d6
--- /dev/null
+++ b/camera/docs/metadata_properties.xml
@@ -0,0 +1,2305 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<metadata xmlns="http://schemas.android.com/service/camera/metadata/"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd">
+
+ <tags>
+ <tag id="AWB">
+ Needed for auto white balance
+ </tag>
+ <tag id="BC">
+ Needed for backwards compatibility with old Java API
+ </tag>
+ <tag id="V1">
+ New features for first camera 2 release (API1)
+ </tag>
+ <tag id="ADV">
+ <!-- TODO: fill the tag description -->
+ </tag>
+ <tag id="DNG">
+ Needed for DNG file support
+ </tag>
+ <tag id="EXIF">
+ <!-- TODO: fill the tag description -->
+ </tag>
+ </tags>
+ <namespace name="android">
+ <section name="colorCorrection">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>TRANSFORM_MATRIX
+ <notes>Use the android.colorCorrection.transform matrix
+ to do color conversion</notes>
+ </value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes>
+ </value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes>
+ </value>
+ </enum>
+ </entry>
+ <entry name="transform" type="float"
+ type_notes="3x3 float matrix in row-major order"
+ container="array">
+ <array>
+ <size>3</size>
+ <size>3</size>
+ </array>
+ <description>A transform matrix to chromatically adapt
+ pixels in the CIE XYZ (1931) color space from the scene
+ illuminant to the sRGB-standard
+ D65-illuminant</description>
+ <range>Output values are expected to be in the range
+ (0,1)</range>
+ <notes>Values outside (0,1) should be clamped. Need to
+ provide utilities to go from CCT (+hue?), or (x,y) white
+ point, (or AWB mode) to matrix; use linear Bradford
+ algorithm.</notes>
+ </entry>
+ </controls>
+ <dynamic>
+ <clone entry="android.colorCorrection.mode"
+ kind="controls"></clone>
+ </dynamic>
+ </section>
+ <section name="control">
+ <controls>
+ <entry name="aeAntibandingMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>50HZ</value>
+ <value>60HZ</value>
+ <value>AUTO</value>
+ </enum>
+ <description>Enum for controlling
+ antibanding</description>
+ <range>
+ android.control.aeAvailableAntibandingModes</range>
+ </entry>
+ <entry name="aeExposureCompensation" type="int32">
+ <description>Adjustment to AE target image
+ brightness</description>
+ <units>count of positive/negative EV steps</units>
+ <notes>For example, if EV step is 0.333, '6' will mean an
+ exposure compensation of +2 EV; -3 will mean an exposure
+ compensation of -1</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="aeLock" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>Autoexposure lock is disabled; the AE algorithm
+ is free to update its parameters.</notes></value>
+ <value>ON
+ <notes>Autoexposure lock is enabled; the AE algorithm
+ must not update the exposure and sensitivity parameters
+ while the lock is active</notes></value>
+ </enum>
+ <description>Whether AE is currently locked to its latest
+ calculated values</description>
+ <notes>Note that even when AE is locked, the flash may be
+ fired if the AE mode is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
+ ON_AUTO_FLASH_REDEYE.</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="aeMode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>Autoexposure is disabled; sensor.exposureTime
+ and sensor.sensitivity are used</notes>
+ </value>
+ <value>ON
+ <notes>Autoexposure is active, no flash
+ control</notes>
+ </value>
+ <value>ON_AUTO_FLASH
+ <notes>if flash exists Autoexposure is active, auto
+ flash control; flash may be fired when precapture
+ trigger is activated, and for captures for which
+ captureIntent = STILL_CAPTURE</notes></value>
+ <value>ON_ALWAYS_FLASH
+ <notes>if flash exists Autoexposure is active, auto
+ flash control for precapture trigger and always flash
+ when captureIntent = STILL_CAPTURE</notes></value>
+ <value>ON_AUTO_FLASH_REDEYE
+ <notes>optional Automatic red eye reduction with flash.
+ If deemed necessary, red eye reduction sequence should
+ fire when precapture trigger is activated, and final
+ flash should fire when captureIntent =
+ STILL_CAPTURE</notes></value>
+ </enum>
+ <description>Whether AE is currently updating the sensor
+ exposure and sensitivity fields</description>
+ <range>android.control.aeAvailableModes</range>
+ <notes>Only effective if android.control.mode =
+ AUTO</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="aeRegions" type="int32" container="array">
+ <array>
+ <size>5</size>
+ <size>area_count</size>
+ </array>
+ <description>List of areas to use for
+ metering</description>
+ <notes>Each area is a rectangle plus weight: xmin, ymin,
+ xmax, ymax, weight. The coordinate system is based on the
+ active pixel array, with (0,0) being the top-left of the
+ active pixel array, and
+ (android.sensor.info.activeArraySize.width,
+ android.sensor.info.activeArraySize.height) being the
+ bottom-right point of the active pixel array. The weight
+ should be nonnegative. If all regions have 0 weight, then
+ no specific metering area needs to be used by the HAL. If
+ the metering region is outside the current
+ android.scaler.cropRegion, the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="aeTargetFpsRange" type="int32"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Range over which fps can be adjusted to
+ maintain exposure</description>
+ <range>android.control.aeAvailableTargetFpsRanges</range>
+ <notes>Only constrains AE algorithm, not manual control
+ of android.sensor.exposureTime</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="aePrecaptureTrigger" type="byte" enum="true">
+ <enum>
+ <value>IDLE
+ <notes>The trigger is idle.</notes>
+ </value>
+ <value>START
+ <notes>The precapture metering sequence
+ must be started. The exact effect of the precapture
+ trigger depends on the current AE mode and
+ state.</notes>
+ </value>
+ </enum>
+ <description>Whether the HAL must trigger precapture
+ metering.</description>
+ <notes>This entry is normally set to IDLE, or is not
+ included at all in the request settings. When included and
+ set to START, the HAL must trigger the autoexposure
+ precapture metering sequence. The effect of AE precapture
+ trigger depends on the current AE mode and state; see the
+ camera HAL device v3 header for details.</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="afMode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>The 3A routines do not control the lens;
+ android.lens.focusPosition is controlled by the
+ application</notes></value>
+ <value>AUTO
+ <notes>if lens is not fixed focus. Use
+ android.lens.minimumFocusDistance to determine if lens
+ is fixed focus In this mode, the lens does not move
+ unless the autofocus trigger action is called. When
+ that trigger is activated, AF must transition to
+ ACTIVE_SCAN, then to the outcome of the scan (FOCUSED
+ or NOT_FOCUSED). Triggering cancel AF resets the lens
+ position to default, and sets the AF state to
+ INACTIVE.</notes></value>
+ <value>MACRO
+ <notes>In this mode, the lens does not move unless the
+ autofocus trigger action is called. When that trigger
+ is activated, AF must transition to ACTIVE_SCAN, then
+ to the outcome of the scan (FOCUSED or NOT_FOCUSED).
+ Triggering cancel AF resets the lens position to
+ default, and sets the AF state to
+ INACTIVE.</notes></value>
+ <value>CONTINUOUS_VIDEO
+ <notes>In this mode, the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream. The focusing behavior
+ should be suitable for good quality video recording;
+ typically this means slower focus movement and no
+ overshoots. When the AF trigger is not involved, the AF
+ algorithm should start in INACTIVE state, and then
+ transition into PASSIVE_SCAN and PASSIVE_FOCUSED states
+ as appropriate. When the AF trigger is activated, the
+ algorithm should immediately transition into AF_FOCUSED
+ or AF_NOT_FOCUSED as appropriate, and lock the lens
+ position until a cancel AF trigger is received. Once
+ cancel is received, the algorithm should transition
+ back to INACTIVE and resume passive scan. Note that
+ this behavior is not identical to CONTINUOUS_PICTURE,
+ since an ongoing PASSIVE_SCAN must immediately be
+ canceled.</notes></value>
+ <value>CONTINUOUS_PICTURE
+ <notes>In this mode, the AF algorithm modifies the lens
+ position continually to attempt to provide a
+ constantly-in-focus image stream. The focusing behavior
+ should be suitable for still image capture; typically
+ this means focusing as fast as possible. When the AF
+ trigger is not involved, the AF algorithm should start
+ in INACTIVE state, and then transition into
+ PASSIVE_SCAN and PASSIVE_FOCUSED states as appropriate
+ as it attempts to maintain focus. When the AF trigger
+ is activated, the algorithm should finish its
+ PASSIVE_SCAN if active, and then transition into
+ AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock
+ the lens position until a cancel AF trigger is
+ received. When the AF cancel trigger is activated, the
+ algorithm should transition back to INACTIVE and then
+ act as if it has just been started.</notes></value>
+ <value>EDOF
+ <notes>Extended depth of field (digital focus). AF
+ trigger is ignored, AF state should always be
+ INACTIVE.</notes></value>
+ </enum>
+ <description>Whether AF is currently enabled, and what
+ mode it is set to</description>
+ <tag id="BC" />
+ </entry>
+ <entry name="afRegions" type="int32" container="array">
+ <array>
+ <size>5</size>
+ <size>area_count</size>
+ </array>
+ <description>List of areas to use for focus
+ estimation</description>
+ <notes>Each area is a rectangle plus weight: xmin, ymin,
+ xmax, ymax, weight. The coordinate system is based on the
+ active pixel array, with (0,0) being the top-left of the
+ active pixel array, and
+ (android.sensor.info.activeArraySize.width,
+ android.sensor.info.activeArraySize.height) being the
+ bottom-right point of the active pixel array. The weight
+ should be nonnegative. If all regions have 0 weight, then
+ no specific focus area needs to be used by the HAL. If
+ the focusing region is outside the current
+ android.scaler.cropRegion, the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="afTrigger" type="byte" enum="true">
+ <enum>
+ <value>IDLE
+ <notes>The trigger is idle.</notes>
+ </value>
+ <value>START
+ <notes>Autofocus must trigger now.</notes>
+ </value>
+ <value>CANCEL
+ <notes>Autofocus must return to initial
+ state, and cancel any active trigger.</notes>
+ </value>
+ </enum>
+ <description>Whether the HAL must trigger autofocus.</description>
+ <notes>This entry is normally set to IDLE, or is not
+ included at all in the request settings. When included and
+ set to START, the HAL must trigger the autofocus
+ algorithm. The effect of AF trigger depends on the current
+ AF mode and state; see the camera HAL device v3 header for
+ details. When set to CANCEL, the HAL must cancel any active
+ trigger, and return to initial AF state.</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="awbLock" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>Auto-whitebalance lock is disabled; the AWB
+ algorithm is free to update its parameters if in AUTO
+ mode.</notes></value>
+ <value>ON
+ <notes>Auto-whitebalance lock is enabled; the AWB
+ algorithm must not update the exposure and sensitivity
+ parameters while the lock is active</notes></value>
+ </enum>
+ <description>Whether AWB is currently locked to its
+ latest calculated values</description>
+ <notes>Note that AWB lock is only meaningful for AUTO
+ mode; in other modes, AWB is already fixed to a specific
+ setting</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="awbMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>AUTO</value>
+ <value>INCANDESCENT</value>
+ <value>FLUORESCENT</value>
+ <value>WARM_FLUORESCENT</value>
+ <value>DAYLIGHT</value>
+ <value>CLOUDY_DAYLIGHT</value>
+ <value>TWILIGHT</value>
+ <value>SHADE</value>
+ </enum>
+ <description>Whether AWB is currently setting the color
+ transform fields, and what its illumination target
+ is</description>
+ <notes>[BC - AWB lock,AWB modes]</notes>
+ <tag id="BC" />
+ <tag id="AWB" />
+ </entry>
+ <entry name="awbRegions" type="int32" container="array">
+ <array>
+ <size>5</size>
+ <size>area_count</size>
+ </array>
+ <description>List of areas to use for illuminant
+ estimation</description>
+ <notes>Only used in AUTO mode. Each area is a rectangle
+ plus weight: xmin, ymin, xmax, ymax, weight. The
+ coordinate system is based on the active pixel array,
+ with (0,0) being the top-left of the active pixel array,
+ and (android.sensor.info.activeArraySize.width,
+ android.sensor.info.activeArraySize.height) being the
+ bottom-right point of the active pixel array. The weight
+ should be nonnegative. If all regions have 0 weight, then
+ no specific metering area needs to be used by the HAL. If
+ the metering region is outside the current
+ android.scaler.cropRegion, the HAL should ignore the
+ sections outside the region and output the used sections
+ in the frame metadata</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="captureIntent" type="byte" enum="true">
+ <enum>
+ <value>CUSTOM
+ <notes>This request doesn't fall into the other
+ categories. Default to preview-like
+ behavior.</notes></value>
+ <value>PREVIEW
+ <notes>This request is for a preview-like usecase. The
+ precapture trigger may be used to start off a metering
+ w/flash sequence</notes></value>
+ <value>STILL_CAPTURE
+ <notes>This request is for a still capture-type
+ usecase.</notes></value>
+ <value>VIDEO_RECORD
+ <notes>This request is for a video recording
+ usecase.</notes></value>
+ <value>VIDEO_SNAPSHOT
+ <notes>This request is for a video snapshot (still
+ image while recording video) usecase</notes></value>
+ <value>ZERO_SHUTTER_LAG
+ <notes>This request is for a ZSL usecase; the
+ application will stream full-resolution images and
+ reprocess one or several later for a final
+ capture</notes></value>
+ </enum>
+ <description>Information to 3A routines about the purpose
+ of this capture, to help decide optimal 3A
+ strategy</description>
+ <range>all must be supported</range>
+ <notes>Only used if android.control.mode != OFF.</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="effectMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value optional="true">MONO</value>
+ <value optional="true">NEGATIVE</value>
+ <value optional="true">SOLARIZE</value>
+ <value optional="true">SEPIA</value>
+ <value optional="true">POSTERIZE</value>
+ <value optional="true">WHITEBOARD</value>
+ <value optional="true">BLACKBOARD</value>
+ <value optional="true">AQUA</value>
+ </enum>
+ <description>Whether any special color effect is in use.
+ Only used if android.control.mode != OFF</description>
+ <range>android.control.availableEffects</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>Full application control of pipeline. All 3A
+ routines are disabled, no other settings in
+ android.control.* have any effect</notes></value>
+ <value>AUTO
+ <notes>Use settings for each individual 3A routine.
+ Manual control of capture parameters is disabled. All
+ controls in android.control.* besides sceneMode take
+ effect</notes></value>
+ <value>USE_SCENE_MODE
+ <notes>Use specific scene mode. Enabling this disables
+ control.aeMode, control.awbMode and control.afMode
+ controls; the HAL must ignore those settings while
+ USE_SCENE_MODE is active (except for FACE_PRIORITY
+ scene mode). Other control entries are still active.
+ This setting can only be used if availableSceneModes !=
+ UNSUPPORTED</notes></value>
+ </enum>
+ <description>Overall mode of 3A control
+ routines</description>
+ <range>all must be supported</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="sceneMode" type="byte" enum="true">
+ <enum>
+ <value id="0">UNSUPPORTED</value>
+ <value>FACE_PRIORITY
+ <notes>if face detection support exists Use face
+ detection data to drive 3A routines. If face detection
+ statistics are disabled, should still operate correctly
+ (but not return face detection statistics to the
+ framework). Unlike the other scene modes, aeMode,
+ awbMode, and afMode remain active when FACE_PRIORITY is
+ set. This is due to compatibility concerns with the old
+ camera API</notes></value>
+ <value optional="true">ACTION</value>
+ <value optional="true">PORTRAIT</value>
+ <value optional="true">LANDSCAPE</value>
+ <value optional="true">NIGHT</value>
+ <value optional="true">NIGHT_PORTRAIT</value>
+ <value optional="true">THEATRE</value>
+ <value optional="true">BEACH</value>
+ <value optional="true">SNOW</value>
+ <value optional="true">SUNSET</value>
+ <value optional="true">STEADYPHOTO</value>
+ <value optional="true">FIREWORKS</value>
+ <value optional="true">SPORTS</value>
+ <value optional="true">PARTY</value>
+ <value optional="true">CANDLELIGHT</value>
+ <value optional="true">BARCODE</value>
+ </enum>
+ <description>Which scene mode is active when
+ android.control.mode = SCENE_MODE</description>
+ <range>android.control.availableSceneModes</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="videoStabilizationMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>ON</value>
+ </enum>
+ <description>Whether video stabilization is
+ active</description>
+ <notes>If enabled, video stabilization can modify the
+ android.scaler.cropRegion to keep the video stream
+ stabilized</notes>
+ <tag id="BC" />
+ </entry>
+ </controls>
+ <static>
+ <entry name="aeAvailableAntibandingModes" type="byte"
+ type_notes="list of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>Which set of antibanding modes are
+ supported</description>
+ </entry>
+ <entry name="aeAvailableModes" type="byte"
+ type_notes="list of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>Which subset of AE modes is
+ supported</description>
+ <range>OFF, ON must be supported.
+ ON_AUTO_FLASH/ON_ALWAYS_FLASH must be supported if flash
+ unit is available</range>
+ </entry>
+ <entry name="aeAvailableTargetFpsRanges" type="int32"
+ type_notes="list of pairs of frame rates"
+ container="array">
+ <array>
+ <size>2</size>
+ <size>n</size>
+ </array>
+ <description>List of frame rate ranges supported by the
+ AE algorithm/hardware</description>
+ </entry>
+ <entry name="aeCompensationRange" type="int32"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Maximum and minimum exposure compensation
+ setting, in counts of
+ android.control.aeCompensationStepSize</description>
+ <range>At least (-2,2)/(exp compensation step
+ size)</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="aeCompensationStep" type="rational">
+ <description>Smallest step by which exposure compensation
+ can be changed</description>
+ <range>&lt;= 1/2</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="afAvailableModes" type="byte"
+ type_notes="List of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of AF modes that can be
+ selected</description>
+ <range>OFF must be included. AUTO must be supported if
+ lens allows for changing focus</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableEffects" type="byte"
+ type_notes="list of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>what subset of the full color effect enum
+ list is supported</description>
+ <range>OFF must be listed</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableSceneModes" type="byte"
+ type_notes="list of enums from android.control.sceneMode, plus UNSUPPORTED to indicate no scene modes are supported"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>what subset of the scene mode enum list is
+ supported.</description>
+ <range>SCENE_MODE_FACE_PRIORITY must be supported if face
+ detection is supported</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableVideoStabilizationModes" type="byte"
+ type_notes="List of enums." container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of video stabilization modes that can
+ be supported</description>
+ <range>OFF must be included</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="awbAvailableModes" type="byte"
+ type_notes="List of enums (android.control.awbMode)"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <range>OFF, AUTO must be included</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="maxRegions" type="int32">
+ <description>For AE, AWB, and AF, how many individual
+ regions can be listed for metering?</description>
+ <range>&gt;= 1</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="sceneModeOverrides" type="byte"
+ container="array">
+ <array>
+ <size>3</size>
+ <size>lengthavailablescenemodes</size>
+ </array>
+ <description>List of AE, AWB, and AF modes to use for
+ each available scene mode</description>
+ <range>For each listed scene mode, lists the aeMode,
+ awbMode, and afMode that the HAL wants to use for that
+ scene mode. For each entry, the order is {aeMode,
+ awbMode, afMode} in order of increasing index</range>
+ <notes>When a scene mode is enabled, the HAL is expected
+ to override aeMode, awbMode, and afMode with its
+ preferred settings for that scene mode. To simplify
+ communication with old camera API applications, the
+ service wants this override list in the static metadata.
+ The order of this list matches that of
+ availableSceneModes, with 3 entires for each scene mode.
+ The overrides listed for SCENE_MODE_FACE_PRIORITY are
+ ignored, since for that mode, the application-set aeMode,
+ awbMode, and afMode are used instead, like they are when
+ android.control.mode is AUTO. It is recommended that for
+ FACE_PRIORITY, the overrides should be set to 0. As an
+ example, if availableSceneModes is { FACE_PRIORITY,
+ ACTION, NIGHT }, then the service expects this field to
+ have 9 entries; for example { 0 , 0, 0, ON_AUTO_FLASH,
+ AUTO, CONTINUOUS_PICTURE, ON_AUTO_FLASH, INCANDESCENT,
+ AUTO }</notes>
+ <tag id="BC" />
+ </entry>
+ </static>
+ <dynamic>
+ <entry name="aePrecaptureId" type="int32">
+ <description>The ID sent with the latest
+ CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
+ <notes>Must be 0 if no
+ CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
+ by HAL. Always updated even if AE algorithm ignores the
+ trigger</notes>
+ </entry>
+ <clone entry="android.control.aeRegions" kind="controls">
+ </clone>
+ <entry name="aeState" type="byte" enum="true">
+ <enum>
+ <value>INACTIVE
+ <notes>AE is off. When a camera device is opened, it starts in
+ this state.</notes></value>
+ <value>SEARCHING
+ <notes>AE doesn't yet have a good set of control values
+ for the current scene</notes></value>
+ <value>CONVERGED
+ <notes>AE has a good set of control values for the
+ current scene</notes></value>
+ <value>LOCKED
+ <notes>AE has been locked (aeMode =
+ LOCKED)</notes></value>
+ <value>FLASH_REQUIRED
+ <notes>AE has a good set of control values, but flash
+ needs to be fired for good quality still
+ capture</notes></value>
+ <value>PRECAPTURE
+ <notes>AE has been asked to do a precapture sequence
+ (through the
+ trigger_action(CAMERA2_TRIGGER_PRECAPTURE_METERING)
+ call), and is currently executing it. Once PRECAPTURE
+ completes, AE will transition to CONVERGED or
+ FLASH_REQUIRED as appropriate</notes></value>
+ </enum>
+ <description>Current state of AE algorithm</description>
+ <notes>Whenever the AE algorithm state changes, a
+ MSG_AUTOEXPOSURE notification must be send if a
+ notification callback is registered.</notes>
+ </entry>
+ <clone entry="android.control.afMode" kind="controls">
+ </clone>
+ <clone entry="android.control.afRegions" kind="controls">
+ </clone>
+ <entry name="afState" type="byte" enum="true">
+ <enum>
+ <value>INACTIVE
+ <notes>AF off or has not yet tried to scan/been asked
+ to scan. When a camera device is opened, it starts in
+ this state.</notes></value>
+ <value>PASSIVE_SCAN
+ <notes>if CONTINUOUS_* modes are supported AF is
+ currently doing an AF scan initiated by a continuous
+ autofocus mode</notes></value>
+ <value>PASSIVE_FOCUSED
+ <notes>if CONTINUOUS_* modes are supported AF currently
+ believes it is in focus, but may restart scanning at
+ any time.</notes></value>
+ <value>ACTIVE_SCAN
+ <notes>if AUTO or MACRO modes are supported AF is doing
+ an AF scan because it was triggered by AF
+ trigger</notes></value>
+ <value>FOCUSED_LOCKED
+ <notes>if any AF mode besides OFF is supported AF
+ believes it is focused correctly and is
+ locked</notes></value>
+ <value>NOT_FOCUSED_LOCKED
+ <notes>if any AF mode besides OFF is supported AF has
+ failed to focus successfully and is
+ locked</notes></value>
+ </enum>
+ <description>Current state of AF algorithm</description>
+ <notes>Whenever the AF algorithm state changes, a
+ MSG_AUTOFOCUS notification must be send if a notification
+ callback is registered.</notes>
+ </entry>
+ <entry name="afTriggerId" type="int32">
+ <description>The ID sent with the latest
+ CAMERA2_TRIGGER_AUTOFOCUS call</description>
+ <notes>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
+ received yet by HAL. Always updated even if AF algorithm
+ ignores the trigger</notes>
+ </entry>
+ <clone entry="android.control.awbMode" kind="controls">
+ </clone>
+ <clone entry="android.control.awbRegions" kind="controls">
+ </clone>
+ <entry name="awbState" type="byte" enum="true">
+ <enum>
+ <value>INACTIVE
+ <notes>AWB is not in auto mode. When a camera device is opened, it
+ starts in this state.</notes></value>
+ <value>SEARCHING
+ <notes>AWB doesn't yet have a good set of control
+ values for the current scene</notes></value>
+ <value>CONVERGED
+ <notes>AWB has a good set of control values for the
+ current scene</notes></value>
+ <value>LOCKED
+ <notes>AE has been locked (aeMode =
+ LOCKED)</notes></value>
+ </enum>
+ <description>Current state of AWB algorithm</description>
+ <notes>Whenever the AWB algorithm state changes, a
+ MSG_AUTOWHITEBALANCE notification must be send if a
+ notification callback is registered.</notes>
+ </entry>
+ <clone entry="android.control.mode" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="demosaic">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>FAST
+ <notes>Minimal or no slowdown of frame rate compared to
+ Bayer RAW output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>High-quality may reduce output frame
+ rate</notes></value>
+ </enum>
+ <description>Controls the quality of the demosaicing
+ processing</description>
+ <tag id="V1" />
+ </entry>
+ </controls>
+ </section>
+ <section name="edge">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>No edge enhancement is applied</notes></value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes></value>
+ </enum>
+ <description>Operation mode for edge
+ enhancement</description>
+ </entry>
+ <entry name="strength" type="byte">
+ <description>Control the amount of edge enhancement
+ applied to the images</description>
+ <units>1-10; 10 is maximum sharpening</units>
+ </entry>
+ </controls>
+ <dynamic>
+ <clone entry="android.edge.mode" kind="controls"></clone>
+ </dynamic>
+ </section>
+ <section name="flash">
+ <controls>
+ <entry name="firingPower" type="byte">
+ <description>Power for flash firing/torch</description>
+ <units>10 is max power; 0 is no flash. Linear</units>
+ <range>0 - 10</range>
+ <notes>Power for snapshot may use a different scale than
+ for torch mode. Only one entry for torch mode will be
+ used</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="firingTime" type="int64">
+ <description>Firing time of flash relative to start of
+ exposure</description>
+ <units>nanoseconds</units>
+ <range>0-(exposure time-flash duration)</range>
+ <notes>Clamped to (0, exposure time - flash
+ duration).</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>Do not fire the flash for this
+ capture</notes></value>
+ <value>SINGLE
+ <notes>if android.flash.available is true Fire flash
+ for this capture based on firingPower,
+ firingTime.</notes></value>
+ <value>TORCH
+ <notes>if android.flash.available is true Flash
+ continuously on, power set by
+ firingPower</notes></value>
+ </enum>
+ <description>Select flash operation mode</description>
+ <tag id="BC" />
+ </entry>
+ </controls>
+ <static>
+ <namespace name="info">
+ <entry name="available" type="byte">
+ <description>Whether this camera has a
+ flash</description>
+ <units>boolean (0 = false, otherwise true)</units>
+ <notes>If no flash, none of the flash controls do
+ anything. All other metadata should return 0</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="chargeDuration" type="int64">
+ <description>Time taken before flash can fire
+ again</description>
+ <units>nanoseconds</units>
+ <range>0-1e9</range>
+ <notes>1 second too long/too short for recharge? Should
+ this be power-dependent?</notes>
+ <tag id="V1" />
+ </entry>
+ </namespace>
+ <entry name="colorTemperature" type="byte">
+ <description>The x,y whitepoint of the
+ flash</description>
+ <units>pair of floats</units>
+ <range>0-1 for both</range>
+ <tag id="ADV" />
+ </entry>
+ <entry name="maxEnergy" type="byte">
+ <description>Max energy output of the flash for a full
+ power single flash</description>
+ <units>lumen-seconds</units>
+ <range>&gt;= 0</range>
+ <tag id="ADV" />
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.flash.firingPower" kind="controls">
+ </clone>
+ <clone entry="android.flash.firingTime" kind="controls">
+ </clone>
+ <clone entry="android.flash.mode" kind="controls"></clone>
+ <entry name="state" type="byte" enum="true">
+ <enum>
+ <value>UNAVAILABLE
+ <notes>No flash on camera</notes></value>
+ <value>CHARGING
+ <notes>if android.flash.available is true Flash is
+ charging and cannot be fired</notes></value>
+ <value>READY
+ <notes>if android.flash.available is true Flash is
+ ready to fire</notes></value>
+ <value>FIRED
+ <notes>if android.flash.available is true Flash fired
+ for this capture</notes></value>
+ </enum>
+ <description>Current state of the flash
+ unit</description>
+ </entry>
+ </dynamic>
+ </section>
+ <section name="geometric">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>No geometric correction is
+ applied</notes></value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes></value>
+ </enum>
+ <description>Operating mode of geometric
+ correction</description>
+ </entry>
+ <entry name="strength" type="byte">
+ <description>Control the amount of shading correction
+ applied to the images</description>
+ <units>unitless: 1-10; 10 is full shading
+ compensation</units>
+ <tag id="ADV" />
+ </entry>
+ </controls>
+ </section>
+ <section name="hotPixel">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>No hot pixel correction can be
+ applied</notes></value>
+ <value>FAST
+ <notes>Frame rate must not be reduced compared to raw
+ Bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes></value>
+ </enum>
+ <description>Set operational mode for hot pixel
+ correction</description>
+ <tag id="V1" />
+ </entry>
+ </controls>
+ <static>
+ <namespace name="info">
+ <entry name="map" type="int32"
+ type_notes="list of coordinates based on android.sensor.pixelArraySize"
+ container="array">
+ <array>
+ <size>2</size>
+ <size>n</size>
+ </array>
+ <description>Location of hot/defective pixels on
+ sensor</description>
+ <tag id="ADV" />
+ </entry>
+ </namespace>
+ </static>
+ <dynamic>
+ <clone entry="android.hotPixel.mode" kind="controls">
+ <tag id="V1" />
+ </clone>
+ </dynamic>
+ </section>
+ <section name="jpeg">
+ <controls>
+ <entry name="gpsCoordinates" type="double"
+ type_notes="latitude, longitude, altitude. First two in degrees, the third in meters"
+ container="array">
+ <array>
+ <size>3</size>
+ </array>
+ <description>GPS coordinates to include in output JPEG
+ EXIF</description>
+ <range>(-180 - 180], [-90,90], [-inf, inf]</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="gpsProcessingMethod" type="byte">
+ <description>32 characters describing GPS algorithm to
+ include in EXIF</description>
+ <units>UTF-8 null-terminated string</units>
+ <tag id="BC" />
+ </entry>
+ <entry name="gpsTimestamp" type="int64">
+ <description>Time GPS fix was made to include in
+ EXIF</description>
+ <units>UTC in seconds since January 1, 1970</units>
+ <tag id="BC" />
+ </entry>
+ <entry name="orientation" type="int32">
+ <description>Orientation of JPEG image to
+ write</description>
+ <units>Degrees in multiples of 90</units>
+ <range>0, 90, 180, 270</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="quality" type="byte">
+ <description>Compression quality of the final JPEG
+ image</description>
+ <range>1-100; larger is higher quality</range>
+ <notes>85-95 is typical usage range</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="thumbnailQuality" type="byte">
+ <description>Compression quality of JPEG
+ thumbnail</description>
+ <range>1-100; larger is higher quality</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="thumbnailSize" type="int32" container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Resolution of embedded JPEG
+ thumbnail</description>
+ <range>from android.jpeg.availableThumbnailSizes</range>
+ <tag id="BC" />
+ </entry>
+ </controls>
+ <static>
+ <entry name="availableThumbnailSizes" type="int32"
+ type_notes="list of resolution pairs" container="array">
+ <array>
+ <size>2</size>
+ <size>n</size>
+ </array>
+ <description>Supported resolutions for the JPEG
+ thumbnail</description>
+ <range>Must include at least one valid resolution, plus
+ (0,0) for no thumbnail generation</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="maxSize" type="int32">
+ <description>Maximum size in bytes for the compressed
+ JPEG buffer</description>
+ <range>Must be large enough to fit any JPEG produced by
+ the camera</range>
+ <notes>This is used for sizing the gralloc buffers for
+ JPEG</notes>
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.jpeg.gpsCoordinates" kind="controls">
+ </clone>
+ <clone entry="android.jpeg.gpsProcessingMethod"
+ kind="controls"></clone>
+ <clone entry="android.jpeg.gpsTimestamp" kind="controls">
+ </clone>
+ <clone entry="android.jpeg.orientation" kind="controls">
+ </clone>
+ <clone entry="android.jpeg.quality" kind="controls">
+ </clone>
+ <entry name="size" type="int32">
+ <description>The size of the compressed JPEG image, in
+ bytes</description>
+ <range>&gt;= 0</range>
+ <notes>If no JPEG output is produced for the request,
+ this must be 0. Otherwise, this describes the real size
+ of the compressed JPEG image placed in the output stream.
+ More specifically, if android.jpeg.maxSize = 1000000, and
+ a specific capture has android.jpeg.size = 500000, then
+ the output buffer from the JPEG stream will be 1000000
+ bytes, of which the first 500000 make up the real
+ data.</notes>
+ </entry>
+ <clone entry="android.jpeg.thumbnailQuality"
+ kind="controls"></clone>
+ <clone entry="android.jpeg.thumbnailSize" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="lens">
+ <controls>
+ <entry name="aperture" type="float">
+ <description>Size of the lens aperture</description>
+ <units>f-number (f/NNN)</units>
+ <range>android.lens.info.availableApertures</range>
+ <notes>Will not be supported on most devices. Can only
+ pick from supported list</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="filterDensity" type="float">
+ <description>State of lens neutral density
+ filter(s)</description>
+ <units>number of stops of filtering</units>
+ <range>android.lens.info.availableFilterDensities</range>
+ <notes>Will not be supported on most devices. Can only
+ pick from supported list</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="focalLength" type="float">
+ <description>Lens optical zoom setting</description>
+ <units>focal length in mm</units>
+ <range>&gt; 0</range>
+ <notes>Will not be supported on most devices.</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="focusDistance" type="float">
+ <description>Distance to plane of sharpest focus,
+ measured from frontmost surface of the lens</description>
+ <units>diopters (1/m)</units>
+ <range>&gt;= 0</range>
+ <notes>0 = infinity focus. Used value should be clamped
+ to (0,minimum focus distance)</notes>
+ <tag id="BC" />
+ <tag id="V1" />
+ </entry>
+ <entry name="opticalStabilizationMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value optional="true">ON</value>
+ </enum>
+ <description>Whether optical image stabilization is
+ enabled.</description>
+ <range>android.lens.availableOpticalStabilization</range>
+ <notes>Will not be supported on most devices.</notes>
+ <tag id="V1" />
+ </entry>
+ </controls>
+ <static>
+ <namespace name="info">
+ <entry name="availableApertures" type="float"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of supported aperture
+ values</description>
+ <range>one entry required, &gt; 0</range>
+ <notes>If variable aperture not available, only setting
+ should be for the fixed aperture</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="availableFilterDensities" type="float"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of supported ND filter
+ values</description>
+ <range>one entry required, &gt;= 0</range>
+ <notes>If not available, only setting is 0. Otherwise,
+ lists the available exposure index values for dimming
+ (2 would mean the filter is set to reduce incoming
+ light by two stops)</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="availableFocalLengths" type="float"
+ type_notes="the list of available focal lengths"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>If fitted with optical zoom, what focal
+ lengths are available. If not, the static focal
+ length</description>
+ <range>&gt; 0</range>
+ <notes>If optical zoom not supported, only one value
+ should be reported</notes>
+ <tag id="BC" />
+ <tag id="V1" />
+ </entry>
+ <entry name="availableOpticalStabilization" type="byte"
+ type_notes="list of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of supported optical image
+ stabilization modes</description>
+ <tag id="V1" />
+ </entry>
+ <entry name="geometricCorrectionMap" type="float"
+ type_notes="2D array of destination coordinate pairs for uniform grid points in source image, per color channel. Size in the range of 2x3x40x30"
+ container="array">
+ <array>
+ <size>2</size>
+ <size>3</size>
+ <size>n</size>
+ <size>m</size>
+ </array>
+ <description>A low-resolution map for correction of
+ geometric distortions and chromatic aberrations, per
+ color channel</description>
+ <range>N, M &gt;= 2</range>
+ <notes>[DNG wants a function instead]. What's easiest
+ for implementers? With an array size (M, N), entry (i,
+ j) provides the destination for pixel (i/(M-1) * width,
+ j/(N-1) * height). Data is row-major, with each array
+ entry being ( (X, Y)_r, (X, Y)_g, (X, Y)_b ) )</notes>
+ <tag id="DNG" />
+ </entry>
+ <entry name="geometricCorrectionMapSize" type="int32"
+ type_notes="width and height of geometric correction map"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Dimensions of geometric correction
+ map</description>
+ <range>Both values &gt;= 2</range>
+ <tag id="V1" />
+ </entry>
+ <entry name="hyperfocalDistance" type="float">
+ <description>Hyperfocal distance for this lens; set to
+ 0 if fixed focus</description>
+ <units>diopters</units>
+ <range>&gt;= 0</range>
+ <notes>The hyperfocal distance is used for the old
+ API's 'fixed' setting</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="minimumFocusDistance" type="float">
+ <description>Shortest distance from frontmost surface
+ of the lens that can be focused correctly</description>
+ <units>diopters</units>
+ <range>&gt;= 0</range>
+ <notes>If the lens is fixed-focus, this should be
+ 0</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="shadingMap" type="float"
+ type_notes="2D array of float gain factors per channel to correct for lens falloff. Should be on the order of 3x40x30"
+ container="array">
+ <array>
+ <size>3</size>
+ <size>n</size>
+ <size>m</size>
+ </array>
+ <description>A low-resolution map of lens shading, per
+ color channel</description>
+ <range>Each gain factor is &gt;= 1</range>
+ <notes>Assume bilinear interpolation of map. The least
+ shaded section of the image should have a gain factor
+ of 1; all other sections should have gains above
+ 1.</notes>
+ <tag id="DNG" />
+ </entry>
+ <entry name="shadingMapSize" type="int32"
+ type_notes="width and height of lens shading map"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Dimensions of lens shading
+ map</description>
+ <range>Both values &gt;= 1</range>
+ <tag id="V1" />
+ </entry>
+ </namespace>
+ <entry name="facing" type="byte" enum="true">
+ <enum>
+ <value>FRONT</value>
+ <value>BACK</value>
+ </enum>
+ <description>Direction the camera faces relative to
+ device screen</description>
+ </entry>
+ <entry name="opticalAxisAngle" type="float"
+ type_notes="degrees. First defines the angle of separation between the perpendicular to the screen and the camera optical axis. The second then defines the clockwise rotation of the optical axis from native device up."
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Relative angle of camera optical axis to the
+ perpendicular axis from the display</description>
+ <range>[0-90) for first angle, [0-360) for second</range>
+ <notes>Examples: (0,0) means that the camera optical axis
+ is perpendicular to the display surface; (45,0) means
+ that the camera points 45 degrees up when device is held
+ upright; (45,90) means the camera points 45 degrees to
+ the right when the device is held upright. Use FACING
+ field to determine perpendicular outgoing
+ direction</notes>
+ <tag id="ADV" />
+ </entry>
+ <entry name="position" type="float" container="array">
+ <array>
+ <size>3, location in mm, in the sensor coordinate
+ system</size>
+ </array>
+ <description>Coordinates of camera optical axis on
+ device</description>
+ <tag id="V1" />
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.lens.aperture" kind="controls">
+ <tag id="V1" />
+ </clone>
+ <clone entry="android.lens.filterDensity" kind="controls">
+ <tag id="V1" />
+ </clone>
+ <clone entry="android.lens.focalLength" kind="controls">
+ <tag id="BC" />
+ </clone>
+ <clone entry="android.lens.focusDistance" kind="controls">
+ <notes>Should be zero for fixed-focus cameras</notes>
+ <tag id="BC" />
+ </clone>
+ <entry name="focusRange" type="float">
+ <description>The range of scene distances that are in
+ sharp focus (depth of field)</description>
+ <units>pair of focus distances in diopters: (near,
+ far)</units>
+ <range>&gt;=0</range>
+ <notes>If variable focus not supported, can still report
+ fixed depth of field range</notes>
+ <tag id="BC" />
+ </entry>
+ <clone entry="android.lens.opticalStabilizationMode"
+ kind="controls">
+ <tag id="V1" />
+ </clone>
+ <entry name="state" type="byte" enum="true">
+ <enum>
+ <value>STATIONARY</value>
+ </enum>
+ <description>Current lens status</description>
+ <tag id="V1" />
+ </entry>
+ </dynamic>
+ </section>
+ <section name="noiseReduction">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>No noise reduction is applied</notes></value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>May slow down frame rate to provide highest
+ quality</notes></value>
+ </enum>
+ <description>Mode of operation for the noise reduction
+ algorithm</description>
+ <range>android.noiseReduction.availableModes</range>
+ <tag id="V1" />
+ </entry>
+ <entry name="strength" type="byte">
+ <description>Control the amount of noise reduction
+ applied to the images</description>
+ <units>1-10; 10 is max noise reduction</units>
+ <range>1 - 10</range>
+ </entry>
+ </controls>
+ <dynamic>
+ <clone entry="android.noiseReduction.mode" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="quirks">
+ <static>
+ <entry name="meteringCropRegion" type="byte">
+ <description>If set to 1, the camera service does not
+ scale 'normalized' coordinates with respect to the crop
+ region. This applies to metering input (a{e,f,wb}Region
+ and output (face rectangles).</description>
+ <notes>Normalized coordinates refer to those in the
+ (-1000,1000) range mentioned in the
+ android.hardware.Camera API. HAL implementations should
+ instead always use and emit sensor array-relative
+ coordinates for all region data. Does not need to be
+ listed in static metadata. Support will be removed in
+ future versions of camera service.</notes>
+ </entry>
+ <entry name="triggerAfWithAuto" type="byte">
+ <description>If set to 1, then the camera service always
+ switches to FOCUS_MODE_AUTO before issuing a AF
+ trigger.</description>
+ <notes>HAL implementations should implement AF trigger
+ modes for AUTO, MACRO, CONTINUOUS_FOCUS, and
+ CONTINUOUS_PICTURE modes instead of using this flag. Does
+ not need to be listed in static metadata. Support will be
+ removed in future versions of camera service</notes>
+ </entry>
+ <entry name="useZslFormat" type="byte">
+ <description>If set to 1, the camera service uses
+ CAMERA2_PIXEL_FORMAT_ZSL instead of
+ HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero
+ shutter lag stream</description>
+ <notes>HAL implementations should use gralloc usage flags
+ to determine that a stream will be used for
+ zero-shutter-lag, instead of relying on an explicit
+ format setting. Does not need to be listed in static
+ metadata. Support will be removed in future versions of
+ camera service.</notes>
+ </entry>
+ </static>
+ </section>
+ <section name="request">
+ <controls>
+ <entry name="frameCount" type="int32">
+ <description>A frame counter set by the framework. Must
+ be maintained unchanged in output frame</description>
+ <units>incrementing integer</units>
+ <range>Any int</range>
+ </entry>
+ <entry name="id" type="int32">
+ <description>An application-specified ID for the current
+ request. Must be maintained unchanged in output
+ frame</description>
+ <units>arbitrary integer assigned by application</units>
+ <range>Any int</range>
+ <tag id="V1" />
+ </entry>
+ <entry name="inputStreams" type="byte">
+ <description>List which camera reprocess stream is used
+ for the source of reprocessing data.</description>
+ <units>List of camera reprocess stream IDs</units>
+ <range>Typically, only one entry allowed, must be a valid
+ reprocess stream ID. If android.jpeg.needsThumbnail is
+ set, then multiple reprocess streams may be included in a
+ single request; they must be different scaled versions of
+ the same image.</range>
+ <notes>Only meaningful when android.request.type ==
+ REPROCESS. Ignored otherwise</notes>
+ </entry>
+ <entry name="metadataMode" type="byte" enum="true">
+ <enum>
+ <value>NONE
+ <notes>No metadata should be produced on output, except
+ for application-bound buffer data. If no
+ application-bound streams exist, no frame should be
+ placed in the output frame queue. If such streams
+ exist, a frame should be placed on the output queue
+ with null metadata but with the necessary output buffer
+ information. Timestamp information should still be
+ included with any output stream buffers</notes></value>
+ <value>FULL
+ <notes>All metadata should be produced. Statistics will
+ only be produced if they are separately
+ enabled</notes></value>
+ </enum>
+ <description>How much metadata to produce on
+ output</description>
+ </entry>
+ <entry name="outputStreams" type="byte">
+ <description>Lists which camera output streams image data
+ from this capture must be sent to</description>
+ <units>List of camera stream IDs</units>
+ <range>List must only include streams that have been
+ created</range>
+ <notes>If no output streams are listed, then the image
+ data should simply be discarded. The image data must
+ still be captured for metadata and statistics production,
+ and the lens and flash must operate as requested.</notes>
+ </entry>
+ <entry name="type" type="byte" enum="true">
+ <enum>
+ <value>CAPTURE
+ <notes>Capture a new image from the imaging hardware,
+ and process it according to the
+ settings</notes></value>
+ <value>REPROCESS
+ <notes>Process previously captured data; the
+ android.request.inputStream parameter determines the
+ source reprocessing stream. TODO: Mark dynamic metadata
+ needed for reprocessing with [RP]</notes></value>
+ </enum>
+ <description>The type of the request; either CAPTURE or
+ REPROCESS</description>
+ </entry>
+ </controls>
+ <static>
+ <entry name="maxNumOutputStreams" type="int32"
+ container="array">
+ <array>
+ <size>3</size>
+ </array>
+ <description>How many output streams can be allocated at
+ the same time for each type of stream</description>
+ <units>The number of raw sensor streams; the number of
+ processed, uncompressed streams; and the number of
+ JPEG-compressed streams</units>
+ <range>&gt;=1 for Raw and JPEG-compressed stream. &gt;= 3
+ for processed, uncompressed streams</range>
+ <notes>Video snapshot with preview callbacks requires 3
+ processed streams (preview, record, app callbacks) and
+ one JPEG stream (snapshot)</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="maxNumReprocessStreams" type="int32"
+ container="array">
+ <array>
+ <size>1</size>
+ </array>
+ <description>How many reprocessing streams of any type
+ can be allocated at the same time</description>
+ <range>&gt;= 1</range>
+ </entry>
+ </static>
+ <dynamic>
+ <entry name="frameCount" type="int32">
+ <description>Number of frames captured since
+ open()</description>
+ <units>count of frames</units>
+ <range>&gt; 0</range>
+ <notes>Reset on release()</notes>
+ </entry>
+ <clone entry="android.request.id" kind="controls"></clone>
+ <clone entry="android.request.metadataMode"
+ kind="controls"></clone>
+ <clone entry="android.request.outputStreams"
+ kind="controls"></clone>
+ </dynamic>
+ </section>
+ <section name="scaler">
+ <controls>
+ <entry name="cropRegion" type="int32" container="array">
+ <array>
+ <size>4</size>
+ </array>
+ <description>(x, y, width, height).
+
+ A rectangle with the top-level corner of (x,y) and size
+ (width, height). The region of the sensor that is used for
+ output. Each stream must use this rectangle to produce its
+ output, cropping to a smaller region if necessary to
+ maintain the stream's aspect ratio.
+
+ HAL2.x uses only (x, y, width)</description>
+ <units>(x,y) of top-left corner, width and height of region
+ in pixels; (0,0) is top-left corner of
+ android.sensor.activeArraySize</units>
+ <notes>
+ Any additional per-stream cropping must be done to
+ maximize the final pixel area of the stream.
+
+ For example, if the crop region is set to a 4:3 aspect
+ ratio, then 4:3 streams should use the exact crop
+ region. 16:9 streams should further crop vertically
+ (letterbox).
+
+ Conversely, if the crop region is set to a 16:9, then 4:3
+ outputs should crop horizontally (pillarbox), and 16:9
+ streams should match exactly. These additional crops must
+ be centered within the crop region.
+
+ The output streams must maintain square pixels at all
+ times, no matter what the relative aspect ratios of the
+ crop region and the stream are. Negative values for
+ corner are allowed for raw output if full pixel array is
+ larger than active pixel array. Width and height may be
+ rounded to nearest larger supportable width, especially
+ for raw output, where only a few fixed scales may be
+ possible. The width and height of the crop region cannot
+ be set to be smaller than floor( activeArraySize.width /
+ android.scaler.maxDigitalZoom ) and floor(
+ activeArraySize.height / android.scaler.maxDigitalZoom),
+ respectively.
+ </notes>
+ <tag id="BC" />
+ </entry>
+ </controls>
+ <static>
+ <entry name="availableFormats" type="int32" enum="true"
+ type_notes="values from HAL_PIXEL_FORMAT_* in /system/core/include/system/graphics.h"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <enum>
+ <value id="0x20">RAW_SENSOR
+ </value>
+ <value id="0x32315659">YV12
+ <notes>YCrCb 4:2:0 Planar</notes>
+ </value>
+ <value id="0x11">YCrCb_420_SP
+ <notes>NV21</notes>
+ </value>
+
+ <value id="0x22">IMPLEMENTATION_DEFINED
+ <notes>Hal Implementation Defined</notes>
+ </value>
+
+ <value id="0x23">YCbCr_420_888
+ <notes>Flexible YUV420 Format</notes>
+ </value>
+
+ <value id="0x21">BLOB
+ <notes>JPEG</notes>
+ </value>
+ </enum>
+ <description>List of app-visible formats</description>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableJpegMinDurations" type="int64"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>The minimum frame duration that is supported
+ for each resolution in availableJpegSizes. Should
+ correspond to the frame duration when only that JPEG
+ stream is active, with all processing set to
+ FAST</description>
+ <notes>When multiple streams are configured, the minimum
+ frame duration will be &gt;= max(individual stream min
+ durations)</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableJpegSizes" type="int32"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>2</size>
+ </array>
+ <description>The resolutions available for output from
+ the JPEG block. Listed as width x height</description>
+ <range>Must include: - sensor maximum resolution Should
+ include: - half/quarter max resolution</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableMaxDigitalZoom" type="float">
+ <description>The maximum ratio between active area width
+ and crop region width, or between active area height and
+ crop region height, if the crop region height is larger
+ than width</description>
+ <range>&gt;=1</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableProcessedMinDurations" type="int64"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>The minimum frame duration that is supported
+ for each resolution in availableProcessedSizes. Should
+ correspond to the frame duration when only that processed
+ stream is active, with all processing set to
+ FAST</description>
+ <notes>When multiple streams are configured, the minimum
+ frame duration will be &gt;= max(individual stream min
+ durations)</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableProcessedSizes" type="int32"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>2</size>
+ </array>
+ <description>The resolutions available for use with
+ processed output streams, such as YV12, NV12, and
+ platform opaque YUV/RGB streams to the GPU or video
+ encoders. Listed as width, height</description>
+ <range>Must include: - sensor maximum resolution -
+ standard QCIF, 240p, 480p, 720p, and 1080p
+ resolutions</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableRawMinDurations" type="int64"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>The minimum frame duration that is supported
+ for each raw resolution in availableRawSizes. Should
+ correspond to the frame duration when only the raw stream
+ is active.</description>
+ <notes>When multiple streams are configured, the minimum
+ frame duration will be &gt;= max(individual stream min
+ durations)</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="availableRawSizes" type="int32"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>2</size>
+ </array>
+ <description>The resolutions available for use with raw
+ sensor output streams, listed as width,
+ height</description>
+ <range>Must include: - sensor maximum resolution</range>
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.scaler.cropRegion" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="sensor">
+ <controls>
+ <entry name="exposureTime" type="int64">
+ <description>Duration each pixel is exposed to
+ light</description>
+ <units>nanoseconds</units>
+ <range>android.sensor.info.exposureTimeRange</range>
+ <notes>1/10000 - 30 sec range. No bulb mode</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="frameDuration" type="int64">
+ <description>Duration from start of frame exposure to
+ start of next frame exposure</description>
+ <units>nanoseconds</units>
+ <range>see android.sensor.info.maxFrameDuration,
+ android.scaler.info.availableMinFrameDurations</range>
+ <notes>Exposure time has priority, so duration is set to
+ max(duration, exposure time + overhead)</notes>
+ <tag id="V1" />
+ <tag id="BC" />
+ </entry>
+ <entry name="sensitivity" type="int32">
+ <description>Gain applied to image data. Must be
+ implemented through analog gain only if set to values
+ below 'maximum analog sensitivity'.</description>
+ <units>ISO arithmetic units</units>
+ <range>android.sensor.info.sensitivityRange</range>
+ <notes>ISO 12232:2006 REI method</notes>
+ <tag id="V1" />
+ </entry>
+ </controls>
+ <static>
+ <namespace name="info">
+ <entry name="activeArraySize" type="int32"
+ type_notes="Four ints defining the active pixel rectangle"
+ container="array">
+ <array>
+ <size>4</size>
+ </array>
+ <description>Area of raw data which corresponds to only
+ active pixels; smaller or equal to
+ pixelArraySize.</description>
+ <units>xmin, ymin, width, height. Top left of full
+ pixel array is (0,0)</units>
+ <tag id="DNG" />
+ </entry>
+ <entry name="availableSensitivities" type="int32"
+ type_notes="List of supported sensitivity values"
+ container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>Range of valid sensitivities</description>
+ <range>Must at least include 100, 200, 400, 800,
+ 1600</range>
+ <tag id="BC" />
+ <tag id="V1" />
+ </entry>
+ <entry name="colorFilterArrangement" type="byte" enum="true">
+ <enum>
+ <value>RGGB</value>
+ <value>GRBG</value>
+ <value>GBRG</value>
+ <value>BGGR</value>
+ <value>RGB
+ <notes>Sensor is not Bayer; output has 3 16-bit
+ values for each pixel, instead of just 1 16-bit value
+ per pixel.</notes></value>
+ </enum>
+ <description>Arrangement of color filters on sensor;
+ represents the colors in the top-left 2x2 section of
+ the sensor, in reading order</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="exposureTimeRange" type="int64"
+ type_notes="nanoseconds" container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Range of valid exposure
+ times</description>
+ <range>Min &lt;= 100e3 (100 us), Max &gt;= 30e9 (30
+ sec)</range>
+ <tag id="V1" />
+ </entry>
+ <entry name="maxFrameDuration" type="int64">
+ <description>Maximum frame duration (minimum frame
+ rate)</description>
+ <units>nanoseconds</units>
+ <range>&gt;= 30e9</range>
+ <notes>Minimum duration is a function of resolution,
+ processing settings. See
+ android.scaler.info.availableMinFrameDurations</notes>
+ <tag id="BC" />
+ <tag id="V1" />
+ </entry>
+ <entry name="physicalSize" type="float"
+ type_notes="width x height in millimeters"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>The physical dimensions of the full pixel
+ array</description>
+ <notes>Needed for FOV calculation for old API</notes>
+ <tag id="V1" />
+ <tag id="BC" />
+ </entry>
+ <entry name="pixelArraySize" type="int32"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Dimensions of full pixel array, possibly
+ including black calibration pixels</description>
+ <notes>Maximum output resolution for raw format must
+ match this in
+ android.scaler.info.availableSizesPerFormat</notes>
+ <tag id="DNG" />
+ <tag id="BC" />
+ </entry>
+ <entry name="whiteLevel" type="int32">
+ <description>Maximum raw value output by
+ sensor</description>
+ <range>&gt; 1024 (10-bit output)</range>
+ <notes>Defines sensor bit depth (10-14 bits is
+ expected)</notes>
+ <tag id="DNG" />
+ </entry>
+ </namespace>
+ <entry name="baseGainFactor" type="rational">
+ <description>Gain factor from electrons to raw units when
+ ISO=100</description>
+ <tag id="V1" />
+ </entry>
+ <entry name="blackLevelPattern" type="int32"
+ type_notes="2x2 raw count block" container="array">
+ <array>
+ <size>4</size>
+ </array>
+ <description>A fixed black level offset for each of the
+ Bayer mosaic channels</description>
+ <range>&gt;= 0 each</range>
+ <notes>As per DNG BlackLevelRepeatDim / BlackLevel
+ tags</notes>
+ <tag id="DNG" />
+ </entry>
+ <entry name="calibrationTransform1" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Per-device calibration on top of color space
+ transform 1</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="calibrationTransform2" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Per-device calibration on top of color space
+ transform 2</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="colorTransform1" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Linear mapping from XYZ (D50) color space to
+ reference linear sensor color, for first reference
+ illuminant</description>
+ <notes>Use as follows XYZ = inv(transform) * clip( (raw -
+ black level(raw) ) / ( white level - max black level) ).
+ At least in the simple case</notes>
+ <tag id="DNG" />
+ </entry>
+ <entry name="colorTransform2" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Linear mapping from XYZ (D50) color space to
+ reference linear sensor color, for second reference
+ illuminant</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="forwardMatrix1" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Used by DNG for better WB
+ adaptation</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="forwardMatrix2" type="rational"
+ type_notes="3x3 matrix in row-major-order"
+ container="array">
+ <array>
+ <size>9</size>
+ </array>
+ <description>Used by DNG for better WB
+ adaptation</description>
+ <tag id="DNG" />
+ </entry>
+ <entry name="maxAnalogSensitivity" type="int32">
+ <description>Maximum sensitivity that is implemented
+ purely through analog gain</description>
+ <notes>For android.sensor.sensitivity values less than or
+ equal to this, all applied gain must be analog. For
+ values above this, it can be a mix of analog and
+ digital</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="noiseModelCoefficients" type="float"
+ type_notes="float constants A, B for the noise variance model"
+ container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Estimation of sensor noise
+ characteristics</description>
+ <units>var(raw pixel value) = electrons * (baseGainFactor
+ * iso/100)^2 + A * (baseGainFactor * iso/100)^2 +
+ B</units>
+ <notes>A represents sensor read noise before analog
+ amplification; B represents noise from A/D conversion and
+ other circuits after amplification. Both noise sources
+ are assumed to be gaussian, independent, and not to vary
+ across the sensor</notes>
+ <tag id="V1" />
+ </entry>
+ <entry name="orientation" type="int32">
+ <description>Clockwise angle through which the output
+ image needs to be rotated to be upright on the device
+ screen in its native orientation. Also defines the
+ direction of rolling shutter readout, which is from top
+ to bottom in the sensor's coordinate system</description>
+ <units>degrees clockwise rotation, only multiples of
+ 90</units>
+ <range>0,90,180,270</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="referenceIlluminant1" type="byte" enum="true">
+ <enum>
+ <value id="1">DAYLIGHT</value>
+ <value id="2">FLUORESCENT</value>
+ <value id="3">TUNGSTEN
+ <notes>Incandescent light</notes></value>
+ <value id="4">FLASH</value>
+ <value id="9">FINE_WEATHER</value>
+ <value id="10">CLOUDY_WEATHER</value>
+ <value id="11">SHADE</value>
+ <value id="12">DAYLIGHT_FLUORESCENT
+ <notes>D 5700 - 7100K</notes></value>
+ <value id="13">DAY_WHITE_FLUORESCENT
+ <notes>N 4600 - 5400K</notes></value>
+ <value id="14">COOL_WHITE_FLUORESCENT
+ <notes>W 3900 - 4500K</notes></value>
+ <value id="15">WHITE_FLUORESCENT
+ <notes>WW 3200 - 3700K</notes></value>
+ <value id="17">STANDARD_A</value>
+ <value id="18">STANDARD_B</value>
+ <value id="19">STANDARD_C</value>
+ <value id="20">D55</value>
+ <value id="21">D65</value>
+ <value id="22">D75</value>
+ <value id="23">D50</value>
+ <value id="24">ISO_STUDIO_TUNGSTEN</value>
+ </enum>
+ <description>Light source used to define transform
+ 1</description>
+ <notes>[EXIF LightSource tag] Must all these be
+ supported? Need CCT for each!</notes>
+ <tag id="DNG" />
+ <tag id="EXIF" />
+ </entry>
+ <entry name="referenceIlluminant2" type="byte">
+ <description>Light source used to define transform
+ 2</description>
+ <units>Same as illuminant 1</units>
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.sensor.exposureTime" kind="controls">
+ </clone>
+ <clone entry="android.sensor.frameDuration"
+ kind="controls"></clone>
+ <clone entry="android.sensor.sensitivity" kind="controls">
+ </clone>
+ <entry name="timestamp" type="int64">
+ <description>Time at start of exposure of first
+ row</description>
+ <units>nanoseconds</units>
+ <range>&gt; 0</range>
+ <notes>Monotonic, should be synced to other timestamps in
+ system</notes>
+ <tag id="BC" />
+ </entry>
+ </dynamic>
+ </section>
+ <section name="shading">
+ <controls>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>OFF
+ <notes>No shading correction is applied</notes></value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes></value>
+ </enum>
+ <description>Quality of lens shading correction applied
+ to the image data</description>
+ </entry>
+ <entry name="strength" type="byte">
+ <description>Control the amount of shading correction
+ applied to the images</description>
+ <units>unitless: 1-10; 10 is full shading
+ compensation</units>
+ <tag id="ADV" />
+ </entry>
+ </controls>
+ <dynamic>
+ <clone entry="android.shading.mode" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="statistics">
+ <controls>
+ <entry name="faceDetectMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>SIMPLE
+ <notes>Optional Return rectangle and confidence
+ only</notes></value>
+ <value>FULL
+ <notes>Optional Return all face
+ metadata</notes></value>
+ </enum>
+ <description>State of the face detector
+ unit</description>
+ <range>
+ android.statistics.availableFaceDetectModes</range>
+ <tag id="BC" />
+ </entry>
+ <entry name="histogramMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>ON</value>
+ </enum>
+ <description>Operating mode for histogram
+ generation</description>
+ <tag id="V1" />
+ </entry>
+ <entry name="sharpnessMapMode" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>ON</value>
+ </enum>
+ <description>Operating mode for sharpness map
+ generation</description>
+ <tag id="V1" />
+ </entry>
+ </controls>
+ <static>
+ <namespace name="info">
+ <entry name="availableFaceDetectModes" type="byte"
+ type_notes="List of enums" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>Which face detection modes are available,
+ if any</description>
+ <range>OFF</range>
+ </entry>
+ <entry name="histogramBucketCount" type="int32">
+ <description>Number of histogram buckets
+ supported</description>
+ <range>&gt;= 64</range>
+ </entry>
+ <entry name="maxFaceCount" type="int32">
+ <description>If face detection is supported, how many
+ faces can be detected at once</description>
+ <range>&gt;= 4 if availableFaceDetectionModes lists
+ modes besides OFF, otherwise 0</range>
+ </entry>
+ <entry name="maxHistogramCount" type="int32">
+ <description>Maximum value possible for a histogram
+ bucket</description>
+ </entry>
+ <entry name="maxSharpnessMapValue" type="int32">
+ <description>Maximum value possible for a sharpness map
+ region.</description>
+ </entry>
+ <entry name="sharpnessMapSize" type="int32"
+ type_notes="width x height" container="array">
+ <array>
+ <size>2</size>
+ </array>
+ <description>Dimensions of the sharpness
+ map</description>
+ <range>Must be at least 32 x 32</range>
+ </entry>
+ </namespace>
+ </static>
+ <dynamic>
+ <clone entry="android.statistics.faceDetectMode"
+ kind="controls"></clone>
+ <entry name="faceIds" type="int32" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of unique IDs for detected
+ faces</description>
+ <notes>Only available if faceDetectMode == FULL</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="faceLandmarks" type="int32"
+ type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>6</size>
+ </array>
+ <description>List of landmarks for detected
+ faces</description>
+ <notes>Only available if faceDetectMode == FULL</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="faceRectangles" type="int32"
+ type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>4</size>
+ </array>
+ <description>List of the bounding rectangles for detected
+ faces</description>
+ <notes>Only available if faceDetectMode != OFF</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="faceScores" type="byte" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <description>List of the face confidence scores for
+ detected faces</description>
+ <range>0-100</range>
+ <notes>Only available if faceDetectMode != OFF</notes>
+ <tag id="BC" />
+ </entry>
+ <entry name="histogram" type="int32"
+ type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>3</size>
+ </array>
+ <description>A 3-channel histogram based on the raw
+ sensor data</description>
+ <notes>The k'th bucket (0-based) covers the input range
+ (with w = android.sensor.info.whiteLevel) of [ k * w/N,
+ (k + 1) * w / N ). If only a monochrome sharpness map is
+ supported, all channels should have the same data</notes>
+ <tag id="V1" />
+ </entry>
+ <clone entry="android.statistics.histogramMode"
+ kind="controls"></clone>
+ <entry name="sharpnessMap" type="int32"
+ type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)"
+ container="array">
+ <array>
+ <size>n</size>
+ <size>m</size>
+ <size>3</size>
+ </array>
+ <description>A 3-channel sharpness map, based on the raw
+ sensor data</description>
+ <notes>If only a monochrome sharpness map is supported,
+ all channels should have the same data</notes>
+ <tag id="V1" />
+ </entry>
+ <clone entry="android.statistics.sharpnessMapMode"
+ kind="controls"></clone>
+ </dynamic>
+ </section>
+ <section name="tonemap">
+ <controls>
+ <entry name="curveBlue" type="float">
+ <description>Table mapping blue input values to output
+ values</description>
+ <units>same as android.tonemap.curveRed</units>
+ <range>same as android.tonemap.curveRed</range>
+ </entry>
+ <entry name="curveGreen" type="float">
+ <description>Table mapping green input values to output
+ values</description>
+ <units>same as android.tonemap.curveRed</units>
+ <range>same as android.tonemap.curveRed</range>
+ </entry>
+ <entry name="curveRed" type="float"
+ type_notes="A 1D array of pairs of floats. mapping a 0-1 input range to a 0-1 output range."
+ container="array">
+ <array>
+ <size>n</size>
+ <size>2</size>
+ </array>
+ <description>Table mapping red input values to output
+ values</description>
+ <range>0-1 on input and output coordinates. Max entry
+ count speciied by android.tonemap.maxCurvePoints</range>
+ <notes>.The input range must be monotonically increasing
+ with N, and values between entries should be linearly
+ interpolated. For example, if the array is: [0.0, 0.0,
+ 0.3, 0.5, 1.0, 1.0], then the input-&gt;output mapping
+ for a few sample points would be: 0 -&gt; 0, 0.15 -&gt;
+ 0.25, 0.3 -&gt; 0.5, 0.5 -&gt; 0.64</notes>
+ <tag id="DNG" />
+ </entry>
+ <entry name="mode" type="byte" enum="true">
+ <enum>
+ <value>CONTRAST_CURVE
+ <notes>Use the tone mapping curve specified in
+ android.tonemap.curve</notes></value>
+ <value>FAST
+ <notes>Must not slow down frame rate relative to raw
+ bayer output</notes></value>
+ <value>HIGH_QUALITY
+ <notes>Frame rate may be reduced by high
+ quality</notes></value>
+ </enum>
+ </entry>
+ </controls>
+ <static>
+ <entry name="maxCurvePoints" type="int32">
+ <description>Maximum number of supported points in the
+ tonemap curve</description>
+ <range>&gt;= 128</range>
+ </entry>
+ </static>
+ <dynamic>
+ <clone entry="android.tonemap.curveBlue" kind="controls">
+ </clone>
+ <clone entry="android.tonemap.curveGreen" kind="controls">
+ </clone>
+ <clone entry="android.tonemap.curveRed" kind="controls">
+ </clone>
+ <clone entry="android.tonemap.mode" kind="controls">
+ </clone>
+ </dynamic>
+ </section>
+ <section name="led">
+ <controls>
+ <entry name="transmit" type="byte" enum="true">
+ <enum>
+ <value>OFF</value>
+ <value>ON</value>
+ </enum>
+ <description>This LED is nominally used to indicate to the user
+ that the camera is powered on and may be streaming images back to the
+ Application Processor. In certain rare circumstances, the OS may
+ disable this when video is processed locally and not transmitted to
+ any untrusted applications.
+
+ In particular, the LED *must* always be on when the data could be
+ transmitted off the device. The LED *should* always be on whenever
+ data is stored locally on the device.
+
+ The LED *may* be off if a trusted application is using the data that
+ doesn't violate the above rules.
+ </description>
+ </entry>
+ </controls>
+ <dynamic>
+ <clone entry="android.led.transmit" kind="controls"></clone>
+ </dynamic>
+ <static>
+ <entry name="availableLeds" type="byte" enum="true" container="array">
+ <array>
+ <size>n</size>
+ </array>
+ <enum>
+ <value>TRANSMIT
+ <notes>android.led.transmit control is used</notes>
+ </value>
+ </enum>
+ <description>A list of camera LEDs that are available on this system.
+ </description>
+ </entry>
+ </static>
+ </section>
+ <section name="info">
+ <static>
+ <entry name="supportedHardwareLevel" type="byte" enum="true">
+ <enum>
+ <value>LIMITED</value>
+ <value>FULL</value>
+ </enum>
+ <description>
+ The camera 3 HAL device can implement one of two possible operational modes;
+ limited and full. Full support is expected from new higher-end
+ devices. Limited mode has hardware requirements roughly in line with those
+ for a camera HAL device v1 implementation, and is expected from older or
+ inexpensive devices. Full is a strict superset of limited, and they share the
+ same essential operational flow.
+
+ For full details refer to "S3. Operational Modes" in camera3.h
+ </description>
+ <range>Optional. Default value is LIMITED.</range>
+ </entry>
+ </static>
+ </section>
+ </namespace>
+</metadata>
diff --git a/camera/docs/metadata_properties.xsd b/camera/docs/metadata_properties.xsd
new file mode 100644
index 00000000..259aebfe
--- /dev/null
+++ b/camera/docs/metadata_properties.xsd
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://schemas.android.com/service/camera/metadata/"
+ targetNamespace="http://schemas.android.com/service/camera/metadata/"
+ elementFormDefault="qualified">
+
+ <element name="metadata" type="tns:MetadataType"></element>
+
+ <complexType name="MetadataType">
+ <sequence>
+ <element name="tags" type="tns:TagsType" maxOccurs="1" minOccurs="0"></element>
+ <element name="namespace" type="tns:NamespaceType"
+ maxOccurs="unbounded" minOccurs="1">
+ </element>
+ </sequence>
+ </complexType>
+
+ <complexType name="NamespaceType">
+ <sequence>
+ <element name="section" type="tns:SectionType" maxOccurs="unbounded" minOccurs="1"></element>
+ </sequence>
+ <attribute name="name" type="string" use="required"></attribute>
+ </complexType>
+
+ <complexType name="SectionType">
+ <sequence>
+ <choice maxOccurs="unbounded">
+ <element name="controls" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
+ <element name="static" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
+ <element name="dynamic" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
+ </choice>
+ </sequence>
+ <attribute name="name" type="string" use="required"></attribute>
+ </complexType>
+
+ <complexType name="SectionKindType">
+ <complexContent>
+ <extension base="tns:BaseNamespaceOrSectionKindType">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="InnerNamespaceType">
+ <complexContent>
+ <extension base="tns:BaseNamespaceOrSectionKindType">
+ <attribute name="name" type="string" use="required"></attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="BaseNamespaceOrSectionKindType">
+ <sequence maxOccurs="unbounded">
+ <choice>
+ <element name="namespace" type="tns:InnerNamespaceType"></element>
+ <element name="entry" type="tns:EntryType"></element>
+ <element name="clone" type="tns:CloneType"></element>
+ </choice>
+ </sequence>
+ </complexType>
+
+ <complexType name="TagsType">
+ <sequence>
+ <element name="tag" type="tns:TagType" maxOccurs="unbounded" minOccurs="0"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="TagType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="id" type="string" use="required"></attribute>
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ <group name="BaseEntryGroup">
+ <sequence>
+ <element name="description" type="string" maxOccurs="1"
+ minOccurs="0">
+ </element>
+ <element name="units" type="string" maxOccurs="1"
+ minOccurs="0">
+ </element>
+ <element name="range" type="string" maxOccurs="1"
+ minOccurs="0">
+ </element>
+ <element name="notes" type="string" maxOccurs="1"
+ minOccurs="0">
+ </element>
+
+ <element name="tag" type="tns:TagType" maxOccurs="unbounded"
+ minOccurs="0">
+ </element>
+ </sequence>
+ </group>
+
+ <complexType name="EntryType">
+ <sequence>
+ <element name="array" type="tns:ArrayType" maxOccurs="1" minOccurs="0"></element>
+ <element name="enum" type="tns:EnumType" maxOccurs="1" minOccurs="0"></element>
+ <element name="tuple" type="tns:TupleType" maxOccurs="1" minOccurs="0"></element>
+
+ <group ref="tns:BaseEntryGroup" />
+ </sequence>
+
+ <attribute name="name" type="string" use="required" />
+ <attribute name="type" use="required">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="byte" />
+ <enumeration value="int32" />
+ <enumeration value="int64" />
+ <enumeration value="float" />
+ <enumeration value="double" />
+ <enumeration value="rational" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="type_notes" type="string" />
+ <attribute name="container">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="array" />
+ <enumeration value="tuple" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="enum">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="true"></enumeration>
+ <enumeration value="false"></enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+
+ <complexType name="EnumType">
+ <sequence>
+ <element name="value" type="tns:EnumValueType" maxOccurs="unbounded"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="TupleType">
+ <sequence>
+ <element name="value" type="string" minOccurs="1" maxOccurs="unbounded"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="ArrayType">
+ <sequence>
+ <element name="size" type="string" minOccurs="1" maxOccurs="unbounded"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="EnumValueType" mixed="true">
+
+ <sequence>
+ <element name="notes" type="string" minOccurs="0" maxOccurs="1" />
+ </sequence>
+
+ <attribute name="optional">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="true"></enumeration>
+ <enumeration value="false"></enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="id" type="string" />
+ </complexType>
+
+ <complexType name="CloneType">
+ <sequence>
+ <group ref="tns:BaseEntryGroup" />
+ </sequence>
+
+ <!--
+ the semantic correctness of the next 2 attributes
+ are validated by metadata_validate.py
+
+ due to the inability of XSD to generate paths recursively
+ -->
+ <attribute name="entry">
+ </attribute>
+ <attribute name="kind">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="controls"></enumeration>
+ <enumeration value="static"></enumeration>
+ <enumeration value="dynamic"></enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+</schema>
diff --git a/camera/docs/metadata_template.mako b/camera/docs/metadata_template.mako
new file mode 100644
index 00000000..253db61a
--- /dev/null
+++ b/camera/docs/metadata_template.mako
@@ -0,0 +1,152 @@
+## -*- coding: utf-8 -*-
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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.
+-->
+<metadata
+ xmlns="http://schemas.android.com/service/camera/metadata/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd">
+
+<tags>
+% for tag in metadata.tags:
+ % if tag.description and tag.description.strip():
+ <tag id="${tag.id}">${tag.description | x}</tag>
+ % else:
+ <tag id="${tag.id}"><!-- TODO: fill the tag description --></tag>
+ % endif
+% endfor
+</tags>
+
+% for root in metadata.outer_namespaces:
+<namespace name="${root.name}">
+ % for section in root.sections:
+ <section name="${section.name}">
+
+ % if section.description is not None:
+ <description>${section.description}</description>
+ % endif
+
+ % for kind in section.kinds: # dynamic,static,controls
+ <${kind.name}>
+
+ <%def name="insert_body(node)">
+ % for nested in node.namespaces:
+ ${insert_namespace(nested)}
+ % endfor
+
+ % for entry in node.entries:
+ ${insert_entry(entry)}
+ % endfor
+ </%def>
+
+ <%def name="insert_namespace(namespace)">
+ <namespace name="${namespace.name}">
+ ${insert_body(namespace)}
+ </namespace>
+ </%def>
+
+ <%def name="insert_entry(prop)">
+ % if prop.is_clone():
+ <clone entry="${prop.name}" kind="${prop.target_kind}">
+
+ % if prop.notes is not None:
+ <notes>${prop.notes}</notes>
+ % endif
+
+ % for tag in prop.tags:
+ <tag id="${tag.id}" />
+ % endfor
+
+ </clone>
+ % else:
+ <entry name="${prop.name_short}" type="${prop.type}"
+ % if prop.enum:
+ enum="true"
+ % endif
+ % if prop.type_notes is not None:
+ type_notes="${prop.type_notes}"
+ % endif
+ % if prop.container is not None:
+ container="${prop.container}"
+ % endif
+ >
+
+ % if prop.container == 'array':
+ <array>
+ % for size in prop.container_sizes:
+ <size>${size}</size>
+ % endfor
+ </array>
+ % elif prop.container == 'tuple':
+ <tuple>
+ % for size in prop.container_sizes:
+ <value /> <!-- intentionally generated empty. manually fix -->
+ % endfor
+ </tuple>
+ % endif
+ % if prop.enum:
+ <enum>
+ % for value in prop.enum.values:
+ <value
+ % if value.optional:
+ optional="true"
+ % endif:
+ % if value.id is not None:
+ id="${value.id}"
+ % endif
+ >${value.name}
+ % if value.notes is not None:
+ <notes>${value.notes}</notes>
+ % endif
+ </value>
+ % endfor
+ </enum>
+ % endif
+
+ % if prop.description is not None:
+ <description>${prop.description | x}</description>
+ % endif
+
+ % if prop.units is not None:
+ <units>${prop.units | x}</units>
+ % endif
+
+ % if prop.range is not None:
+ <range>${prop.range | x}</range>
+ % endif
+
+ % if prop.notes is not None:
+ <notes>${prop.notes | x}</notes>
+ % endif
+
+ % for tag in prop.tags:
+ <tag id="${tag.id}" />
+ % endfor
+
+ </entry>
+ % endif
+ </%def>
+
+ ${insert_body(kind)}
+
+ </${kind.name}>
+ % endfor # for each kind
+
+ </section>
+ % endfor
+</namespace>
+% endfor
+
+</metadata>
diff --git a/camera/docs/metadata_validate.py b/camera/docs/metadata_validate.py
new file mode 100755
index 00000000..0dc4ae98
--- /dev/null
+++ b/camera/docs/metadata_validate.py
@@ -0,0 +1,307 @@
+#!/usr/bin/python
+
+#
+# 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.
+#
+
+"""
+Usage:
+ metadata_validate.py <filename.xml>
+ - validates that the metadata properties defined in filename.xml are
+ semantically correct.
+ - does not do any XSD validation, use xmllint for that (in metadata-validate)
+
+Module:
+ A set of helpful functions for dealing with BeautifulSoup element trees.
+ Especially the find_* and fully_qualified_name functions.
+
+Dependencies:
+ BeautifulSoup - an HTML/XML parser available to download from
+ http://www.crummy.com/software/BeautifulSoup/
+"""
+
+from bs4 import BeautifulSoup
+from bs4 import Tag
+import sys
+
+
+#####################
+#####################
+
+def fully_qualified_name(entry):
+ """
+ Calculates the fully qualified name for an entry by walking the path
+ to the root node.
+
+ Args:
+ entry: a BeautifulSoup Tag corresponding to an <entry ...> XML node
+
+ Returns:
+ A string with the full name, e.g. "android.lens.info.availableApertureSizes"
+ """
+ filter_tags = ['namespace', 'section']
+ parents = [i['name'] for i in entry.parents if i.name in filter_tags]
+
+ name = entry['name']
+
+ parents.reverse()
+ parents.append(name)
+
+ fqn = ".".join(parents)
+
+ return fqn
+
+def find_parent_by_name(element, names):
+ """
+ Find the ancestor for an element whose name matches one of those
+ in names.
+
+ Args:
+ element: A BeautifulSoup Tag corresponding to an XML node
+
+ Returns:
+ A BeautifulSoup element corresponding to the matched parent, or None.
+
+ For example, assuming the following XML structure:
+ <static>
+ <anything>
+ <entry name="Hello" /> # this is in variable 'Hello'
+ </anything>
+ </static>
+
+ el = find_parent_by_name(Hello, ['static'])
+ # el is now a value pointing to the '<static>' element
+ """
+ matching_parents = [i.name for i in element.parents if i.name in names]
+
+ if matching_parents:
+ return matching_parents[0]
+ else:
+ return None
+
+def find_all_child_tags(element, tag):
+ """
+ Finds all the children that are a Tag (as opposed to a NavigableString),
+ with a name of tag. This is useful to filter out the NavigableString out
+ of the children.
+
+ Args:
+ element: A BeautifulSoup Tag corresponding to an XML node
+ tag: A string representing the name of the tag
+
+ Returns:
+ A list of Tag instances
+
+ For example, given the following XML structure:
+ <enum> # This is the variable el
+ Hello world # NavigableString
+ <value>Apple</value> # this is the variale apple (Tag)
+ <value>Orange</value> # this is the variable orange (Tag)
+ Hello world again # NavigableString
+ </enum>
+
+ lst = find_all_child_tags(el, 'value')
+ # lst is [apple, orange]
+
+ """
+ matching_tags = [i for i in element.children if isinstance(i, Tag) and i.name == tag]
+ return matching_tags
+
+def find_child_tag(element, tag):
+ """
+ Finds the first child that is a Tag with the matching name.
+
+ Args:
+ element: a BeautifulSoup Tag
+ tag: A String representing the name of the tag
+
+ Returns:
+ An instance of a Tag, or None if there was no matches.
+
+ For example, given the following XML structure:
+ <enum> # This is the variable el
+ Hello world # NavigableString
+ <value>Apple</value> # this is the variale apple (Tag)
+ <value>Orange</value> # this is the variable orange (Tag)
+ Hello world again # NavigableString
+ </enum>
+
+ res = find_child_tag(el, 'value')
+ # res is apple
+ """
+ matching_tags = find_all_child_tags(element, tag)
+ if matching_tags:
+ return matching_tags[0]
+ else:
+ return None
+
+def find_kind(element):
+ """
+ Finds the kind Tag ancestor for an element.
+
+ Args:
+ element: a BeautifulSoup Tag
+
+ Returns:
+ a BeautifulSoup tag, or None if there was no matches
+
+ Remarks:
+ This function only makes sense to be called for an Entry, Clone, or
+ InnerNamespace XML types. It will always return 'None' for other nodes.
+ """
+ kinds = ['dynamic', 'static', 'controls']
+ parent_kind = find_parent_by_name(element, kinds)
+ return parent_kind
+
+def validate_error(msg):
+ """
+ Print a validation error to stderr.
+
+ Args:
+ msg: a string you want to be printed
+ """
+ print >> sys.stderr, "Validation error: " + msg
+
+
+def validate_clones(soup):
+ """
+ Validate that all <clone> elements point to an existing <entry> element.
+
+ Args:
+ soup - an instance of BeautifulSoup
+
+ Returns:
+ True if the validation succeeds, False otherwise
+ """
+ success = True
+
+ for clone in soup.find_all("clone"):
+ clone_entry = clone['entry']
+ clone_kind = clone['kind']
+
+ parent_kind = find_kind(clone)
+
+ find_entry = lambda x: x.name == 'entry' \
+ and find_kind(x) == clone_kind \
+ and fully_qualified_name(x) == clone_entry
+ matching_entry = soup.find(find_entry)
+
+ if matching_entry is None:
+ error_msg = ("Did not find corresponding clone entry '%s' " + \
+ "with kind '%s'") %(clone_entry, clone_kind)
+ validate_error(error_msg)
+ success = False
+
+ return success
+
+# All <entry> elements with container=$foo have a <$foo> child
+# If type="enum", <enum> tag is present
+# In <enum> for all <value id="$x">, $x is numeric
+def validate_entries(soup):
+ """
+ Validate all <entry> elements with the following rules:
+ * If there is a container="$foo" attribute, there is a <$foo> child
+ * If there is a type="enum" attribute, there is an <enum> child
+ * In the <enum> child, all <value id="$x"> have a numeric $x
+
+ Args:
+ soup - an instance of BeautifulSoup
+
+ Returns:
+ True if the validation succeeds, False otherwise
+ """
+ success = True
+ for entry in soup.find_all("entry"):
+ entry_container = entry.attrs.get('container')
+
+ if entry_container is not None:
+ container_tag = entry.find(entry_container)
+
+ if container_tag is None:
+ success = False
+ validate_error(("Entry '%s' in kind '%s' has type '%s' but " + \
+ "missing child element <%s>") \
+ %(fully_qualified_name(entry), find_kind(entry), \
+ entry_container, entry_container))
+
+ enum = entry.attrs.get('enum')
+ if enum and enum == 'true':
+ if entry.enum is None:
+ validate_error(("Entry '%s' in kind '%s' is missing enum") \
+ % (fully_qualified_name(entry), find_kind(entry),
+ ))
+ success = False
+
+ else:
+ for value in entry.enum.find_all('value'):
+ value_id = value.attrs.get('id')
+
+ if value_id is not None:
+ try:
+ id_int = int(value_id, 0) #autoguess base
+ except ValueError:
+ validate_error(("Entry '%s' has id '%s', which is not" + \
+ " numeric.") \
+ %(fully_qualified_name(entry), value_id))
+ success = False
+ else:
+ if entry.enum:
+ validate_error(("Entry '%s' kind '%s' has enum el, but no enum attr") \
+ % (fully_qualified_name(entry), find_kind(entry),
+ ))
+ success = False
+
+ return success
+
+def validate_xml(file_name):
+ """
+ Validate all XML nodes according to the rules in validate_clones and
+ validate_entries.
+
+ Args:
+ file_name - a string path to an XML file we wish to validate
+
+ Returns:
+ a BeautifulSoup instance if validation succeeds, None otherwise
+ """
+
+ xml = file(file_name).read()
+ soup = BeautifulSoup(xml, features='xml')
+
+ succ = validate_clones(soup)
+ succ = validate_entries(soup) and succ
+
+ if succ:
+ return soup
+ else:
+ return None
+
+#####################
+#####################
+
+if __name__ == "__main__":
+ if len(sys.argv) <= 1:
+ print >> sys.stderr, "Usage: %s <filename.xml>" % (sys.argv[0])
+ sys.exit(0)
+
+ file_name = sys.argv[1]
+ succ = validate_xml(file_name) is not None
+
+ if succ:
+ print "%s: SUCCESS! Document validated" %(file_name)
+ sys.exit(0)
+ else:
+ print >> sys.stderr, "%s: ERRORS: Document failed to validate" %(file_name)
+ sys.exit(1)
diff --git a/camera/include/system/camera_metadata.h b/camera/include/system/camera_metadata.h
index 3396312e..a0e5cd13 100644
--- a/camera/include/system/camera_metadata.h
+++ b/camera/include/system/camera_metadata.h
@@ -165,6 +165,18 @@ camera_metadata_t *allocate_camera_metadata(size_t entry_capacity,
size_t data_capacity);
/**
+ * 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
@@ -253,6 +265,23 @@ camera_metadata_t *copy_camera_metadata(void *dst, size_t dst_size,
const camera_metadata_t *src);
/**
+ * 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. A non-0 value is returned on error.
+ */
+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
@@ -462,6 +491,16 @@ void dump_indented_camera_metadata(const camera_metadata_t *metadata,
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
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index 796e5713..646c7ec9 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -20,6 +20,12 @@
* 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 */
/**
@@ -28,83 +34,67 @@
* New sections must be added right before ANDROID_SECTION_COUNT to maintain
* existing enumerations.
*/
-enum {
- ANDROID_REQUEST = 0,
- ANDROID_LENS,
- ANDROID_LENS_INFO,
- ANDROID_SENSOR,
- ANDROID_SENSOR_INFO,
+typedef enum camera_metadata_section {
+ ANDROID_COLOR_CORRECTION,
+ ANDROID_CONTROL,
+ ANDROID_DEMOSAIC,
+ ANDROID_EDGE,
ANDROID_FLASH,
ANDROID_FLASH_INFO,
+ ANDROID_GEOMETRIC,
ANDROID_HOT_PIXEL,
ANDROID_HOT_PIXEL_INFO,
- ANDROID_DEMOSAIC,
- ANDROID_DEMOSAIC_INFO,
- ANDROID_NOISE,
- ANDROID_NOISE_INFO,
+ ANDROID_JPEG,
+ ANDROID_LENS,
+ ANDROID_LENS_INFO,
+ ANDROID_NOISE_REDUCTION,
+ ANDROID_QUIRKS,
+ ANDROID_REQUEST,
+ ANDROID_SCALER,
+ ANDROID_SENSOR,
+ ANDROID_SENSOR_INFO,
ANDROID_SHADING,
- ANDROID_SHADING_INFO,
- ANDROID_GEOMETRIC,
- ANDROID_GEOMETRIC_INFO,
- ANDROID_COLOR,
- ANDROID_COLOR_INFO,
+ ANDROID_STATISTICS,
+ ANDROID_STATISTICS_INFO,
ANDROID_TONEMAP,
- ANDROID_TONEMAP_INFO,
- ANDROID_EDGE,
- ANDROID_EDGE_INFO,
- ANDROID_SCALER,
- ANDROID_SCALER_INFO,
- ANDROID_JPEG,
- ANDROID_JPEG_INFO,
- ANDROID_STATS,
- ANDROID_STATS_INFO,
- ANDROID_CONTROL,
- ANDROID_CONTROL_INFO,
- ANDROID_QUIRKS_INFO,
+ ANDROID_LED,
+ ANDROID_INFO,
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
*/
-enum {
- ANDROID_REQUEST_START = ANDROID_REQUEST << 16,
- ANDROID_LENS_START = ANDROID_LENS << 16,
- ANDROID_LENS_INFO_START = ANDROID_LENS_INFO << 16,
- ANDROID_SENSOR_START = ANDROID_SENSOR << 16,
- ANDROID_SENSOR_INFO_START = ANDROID_SENSOR_INFO << 16,
- ANDROID_FLASH_START = ANDROID_FLASH << 16,
- ANDROID_FLASH_INFO_START = ANDROID_FLASH_INFO << 16,
- ANDROID_HOT_PIXEL_START = ANDROID_HOT_PIXEL << 16,
- ANDROID_HOT_PIXEL_INFO_START = ANDROID_HOT_PIXEL_INFO << 16,
- ANDROID_DEMOSAIC_START = ANDROID_DEMOSAIC << 16,
- ANDROID_DEMOSAIC_INFO_START = ANDROID_DEMOSAIC_INFO << 16,
- ANDROID_NOISE_START = ANDROID_NOISE << 16,
- ANDROID_NOISE_INFO_START = ANDROID_NOISE_INFO << 16,
- ANDROID_SHADING_START = ANDROID_SHADING << 16,
- ANDROID_SHADING_INFO_START = ANDROID_SHADING_INFO << 16,
- ANDROID_GEOMETRIC_START = ANDROID_GEOMETRIC << 16,
- ANDROID_GEOMETRIC_INFO_START = ANDROID_GEOMETRIC_INFO << 16,
- ANDROID_COLOR_START = ANDROID_COLOR << 16,
- ANDROID_COLOR_INFO_START = ANDROID_COLOR_INFO << 16,
- ANDROID_TONEMAP_START = ANDROID_TONEMAP << 16,
- ANDROID_TONEMAP_INFO_START = ANDROID_TONEMAP_INFO << 16,
- ANDROID_EDGE_START = ANDROID_EDGE << 16,
- ANDROID_EDGE_INFO_START = ANDROID_EDGE_INFO << 16,
- ANDROID_SCALER_START = ANDROID_SCALER << 16,
- ANDROID_SCALER_INFO_START = ANDROID_SCALER_INFO << 16,
- ANDROID_JPEG_START = ANDROID_JPEG << 16,
- ANDROID_JPEG_INFO_START = ANDROID_JPEG_INFO << 16,
- ANDROID_STATS_START = ANDROID_STATS << 16,
- ANDROID_STATS_INFO_START = ANDROID_STATS_INFO << 16,
- ANDROID_CONTROL_START = ANDROID_CONTROL << 16,
- ANDROID_CONTROL_INFO_START = ANDROID_CONTROL_INFO << 16,
- ANDROID_QUIRKS_INFO_START = ANDROID_QUIRKS_INFO << 16,
- VENDOR_SECTION_START = VENDOR_SECTION << 16
-};
+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_GEOMETRIC_START = ANDROID_GEOMETRIC << 16,
+ ANDROID_HOT_PIXEL_START = ANDROID_HOT_PIXEL << 16,
+ ANDROID_HOT_PIXEL_INFO_START = ANDROID_HOT_PIXEL_INFO << 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,
+ VENDOR_SECTION_START = VENDOR_SECTION << 16
+} camera_metadata_section_start_t;
/**
* Main enum for defining camera metadata tags. New entries must always go
@@ -112,318 +102,328 @@ enum {
* addition, the name and type of the tag needs to be added to
* system/media/camera/src/camera_metadata_tag_info.c
*/
-enum {
- ANDROID_REQUEST_ID = ANDROID_REQUEST_START,
- ANDROID_REQUEST_TYPE,
- ANDROID_REQUEST_METADATA_MODE,
- ANDROID_REQUEST_OUTPUT_STREAMS,
- ANDROID_REQUEST_INPUT_STREAMS,
- ANDROID_REQUEST_FRAME_COUNT,
- ANDROID_REQUEST_END,
-
- ANDROID_LENS_FOCUS_DISTANCE = ANDROID_LENS_START,
- ANDROID_LENS_APERTURE,
- ANDROID_LENS_FOCAL_LENGTH,
- ANDROID_LENS_FILTER_DENSITY,
- ANDROID_LENS_OPTICAL_STABILIZATION_MODE,
- ANDROID_LENS_FOCUS_RANGE,
- ANDROID_LENS_END,
-
- ANDROID_LENS_MINIMUM_FOCUS_DISTANCE = ANDROID_LENS_INFO_START,
- ANDROID_LENS_HYPERFOCAL_DISTANCE,
- ANDROID_LENS_AVAILABLE_FOCAL_LENGTHS,
- ANDROID_LENS_AVAILABLE_APERTURES,
- ANDROID_LENS_AVAILABLE_FILTER_DENSITY,
- ANDROID_LENS_AVAILABLE_OPTICAL_STABILIZATION,
- ANDROID_LENS_SHADING_MAP_SIZE,
- ANDROID_LENS_SHADING_MAP,
- ANDROID_LENS_GEOMETRIC_CORRECTION_MAP_SIZE,
- ANDROID_LENS_GEOMETRIC_CORRECTION_MAP,
- ANDROID_LENS_FACING,
- ANDROID_LENS_POSITION,
- ANDROID_LENS_INFO_END,
+typedef enum camera_metadata_tag {
+ ANDROID_COLOR_CORRECTION_MODE = ANDROID_COLOR_CORRECTION_START,
+ ANDROID_COLOR_CORRECTION_TRANSFORM,
+ ANDROID_COLOR_CORRECTION_END,
+
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE
+ = ANDROID_CONTROL_START,
+ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
+ ANDROID_CONTROL_AE_LOCK,
+ ANDROID_CONTROL_AE_MODE,
+ ANDROID_CONTROL_AE_REGIONS,
+ ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
+ ANDROID_CONTROL_AF_MODE,
+ ANDROID_CONTROL_AF_REGIONS,
+ ANDROID_CONTROL_AF_TRIGGER,
+ ANDROID_CONTROL_AWB_LOCK,
+ ANDROID_CONTROL_AWB_MODE,
+ ANDROID_CONTROL_AWB_REGIONS,
+ ANDROID_CONTROL_CAPTURE_INTENT,
+ ANDROID_CONTROL_EFFECT_MODE,
+ ANDROID_CONTROL_MODE,
+ ANDROID_CONTROL_SCENE_MODE,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE,
+ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES,
+ ANDROID_CONTROL_AE_AVAILABLE_MODES,
+ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
+ ANDROID_CONTROL_AE_COMPENSATION_RANGE,
+ ANDROID_CONTROL_AE_COMPENSATION_STEP,
+ ANDROID_CONTROL_AF_AVAILABLE_MODES,
+ ANDROID_CONTROL_AVAILABLE_EFFECTS,
+ ANDROID_CONTROL_AVAILABLE_SCENE_MODES,
+ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
+ ANDROID_CONTROL_AWB_AVAILABLE_MODES,
+ ANDROID_CONTROL_MAX_REGIONS,
+ ANDROID_CONTROL_SCENE_MODE_OVERRIDES,
+ ANDROID_CONTROL_AE_PRECAPTURE_ID,
+ ANDROID_CONTROL_AE_STATE,
+ ANDROID_CONTROL_AF_STATE,
+ ANDROID_CONTROL_AF_TRIGGER_ID,
+ ANDROID_CONTROL_AWB_STATE,
+ ANDROID_CONTROL_END,
- ANDROID_SENSOR_EXPOSURE_TIME = ANDROID_SENSOR_START,
- ANDROID_SENSOR_FRAME_DURATION,
- ANDROID_SENSOR_SENSITIVITY,
- ANDROID_SENSOR_TIMESTAMP,
- ANDROID_SENSOR_END,
+ ANDROID_DEMOSAIC_MODE = ANDROID_DEMOSAIC_START,
+ ANDROID_DEMOSAIC_END,
- ANDROID_SENSOR_EXPOSURE_TIME_RANGE = ANDROID_SENSOR_INFO_START,
- ANDROID_SENSOR_MAX_FRAME_DURATION,
- ANDROID_SENSOR_AVAILABLE_SENSITIVITIES,
- ANDROID_SENSOR_COLOR_FILTER_ARRANGEMENT,
- ANDROID_SENSOR_PHYSICAL_SIZE,
- ANDROID_SENSOR_PIXEL_ARRAY_SIZE,
- ANDROID_SENSOR_ACTIVE_ARRAY_SIZE,
- ANDROID_SENSOR_WHITE_LEVEL,
- ANDROID_SENSOR_BLACK_LEVEL_PATTERN,
- ANDROID_SENSOR_COLOR_TRANSFORM_1,
- ANDROID_SENSOR_COLOR_TRANSFORM_2,
- ANDROID_SENSOR_REFERENCE_ILLUMINANT_1,
- ANDROID_SENSOR_REFERENCE_ILLUMINANT_2,
- ANDROID_SENSOR_FORWARD_MATRIX_1,
- ANDROID_SENSOR_FORWARD_MATRIX_2,
- ANDROID_SENSOR_CALIBRATION_TRANSFORM_1,
- ANDROID_SENSOR_CALIBRATION_TRANSFORM_2,
- ANDROID_SENSOR_BASE_GAIN_FACTOR,
- ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,
- ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS,
- ANDROID_SENSOR_ORIENTATION,
- ANDROID_SENSOR_INFO_END,
+ ANDROID_EDGE_MODE = ANDROID_EDGE_START,
+ ANDROID_EDGE_STRENGTH,
+ ANDROID_EDGE_END,
- ANDROID_FLASH_MODE = ANDROID_FLASH_START,
- ANDROID_FLASH_FIRING_POWER,
+ ANDROID_FLASH_FIRING_POWER = ANDROID_FLASH_START,
ANDROID_FLASH_FIRING_TIME,
+ ANDROID_FLASH_MODE,
+ ANDROID_FLASH_COLOR_TEMPERATURE,
+ ANDROID_FLASH_MAX_ENERGY,
+ ANDROID_FLASH_STATE,
ANDROID_FLASH_END,
- ANDROID_FLASH_AVAILABLE = ANDROID_FLASH_INFO_START,
- ANDROID_FLASH_CHARGE_DURATION,
+ ANDROID_FLASH_INFO_AVAILABLE = ANDROID_FLASH_INFO_START,
+ ANDROID_FLASH_INFO_CHARGE_DURATION,
ANDROID_FLASH_INFO_END,
- ANDROID_HOT_PIXEL_MODE = ANDROID_HOT_PIXEL_START,
+ ANDROID_GEOMETRIC_MODE = ANDROID_GEOMETRIC_START,
+ ANDROID_GEOMETRIC_STRENGTH,
+ ANDROID_GEOMETRIC_END,
+
+ ANDROID_HOT_PIXEL_MODE = ANDROID_HOT_PIXEL_START,
ANDROID_HOT_PIXEL_END,
- ANDROID_HOT_PIXEL_INFO_END = ANDROID_HOT_PIXEL_INFO_START,
+ ANDROID_HOT_PIXEL_INFO_MAP = ANDROID_HOT_PIXEL_INFO_START,
+ ANDROID_HOT_PIXEL_INFO_END,
- ANDROID_DEMOSAIC_MODE = ANDROID_DEMOSAIC_START,
- ANDROID_DEMOSAIC_END,
+ ANDROID_JPEG_GPS_COORDINATES = ANDROID_JPEG_START,
+ ANDROID_JPEG_GPS_PROCESSING_METHOD,
+ ANDROID_JPEG_GPS_TIMESTAMP,
+ ANDROID_JPEG_ORIENTATION,
+ ANDROID_JPEG_QUALITY,
+ ANDROID_JPEG_THUMBNAIL_QUALITY,
+ ANDROID_JPEG_THUMBNAIL_SIZE,
+ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
+ ANDROID_JPEG_MAX_SIZE,
+ ANDROID_JPEG_SIZE,
+ ANDROID_JPEG_END,
- ANDROID_DEMOSAIC_INFO_END = ANDROID_DEMOSAIC_INFO_START,
+ ANDROID_LENS_APERTURE = ANDROID_LENS_START,
+ ANDROID_LENS_FILTER_DENSITY,
+ ANDROID_LENS_FOCAL_LENGTH,
+ ANDROID_LENS_FOCUS_DISTANCE,
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE,
+ ANDROID_LENS_FACING,
+ ANDROID_LENS_OPTICAL_AXIS_ANGLE,
+ ANDROID_LENS_POSITION,
+ ANDROID_LENS_FOCUS_RANGE,
+ ANDROID_LENS_STATE,
+ ANDROID_LENS_END,
- ANDROID_NOISE_MODE = ANDROID_NOISE_START,
- ANDROID_NOISE_STRENGTH,
- ANDROID_NOISE_END,
+ ANDROID_LENS_INFO_AVAILABLE_APERTURES
+ = ANDROID_LENS_INFO_START,
+ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES,
+ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS,
+ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
+ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP,
+ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE,
+ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE,
+ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE,
+ ANDROID_LENS_INFO_SHADING_MAP,
+ ANDROID_LENS_INFO_SHADING_MAP_SIZE,
+ ANDROID_LENS_INFO_END,
- ANDROID_NOISE_INFO_END = ANDROID_NOISE_INFO_START,
+ ANDROID_NOISE_REDUCTION_MODE = ANDROID_NOISE_REDUCTION_START,
+ ANDROID_NOISE_REDUCTION_STRENGTH,
+ ANDROID_NOISE_REDUCTION_END,
- ANDROID_SHADING_MODE = ANDROID_SHADING_START,
- ANDROID_SHADING_END,
+ ANDROID_QUIRKS_METERING_CROP_REGION
+ = ANDROID_QUIRKS_START,
+ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO,
+ ANDROID_QUIRKS_USE_ZSL_FORMAT,
+ ANDROID_QUIRKS_END,
- ANDROID_SHADING_INFO_END = ANDROID_SHADING_INFO_START,
+ ANDROID_REQUEST_FRAME_COUNT = ANDROID_REQUEST_START,
+ ANDROID_REQUEST_ID,
+ ANDROID_REQUEST_INPUT_STREAMS,
+ ANDROID_REQUEST_METADATA_MODE,
+ ANDROID_REQUEST_OUTPUT_STREAMS,
+ ANDROID_REQUEST_TYPE,
+ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
+ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS,
+ ANDROID_REQUEST_END,
- ANDROID_GEOMETRIC_MODE = ANDROID_GEOMETRIC_START,
- ANDROID_GEOMETRIC_END,
+ ANDROID_SCALER_CROP_REGION = ANDROID_SCALER_START,
+ ANDROID_SCALER_AVAILABLE_FORMATS,
+ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_JPEG_SIZES,
+ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM,
+ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES,
+ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_RAW_SIZES,
+ ANDROID_SCALER_END,
- ANDROID_GEOMETRIC_INFO_END = ANDROID_GEOMETRIC_INFO_START,
+ ANDROID_SENSOR_EXPOSURE_TIME = ANDROID_SENSOR_START,
+ ANDROID_SENSOR_FRAME_DURATION,
+ ANDROID_SENSOR_SENSITIVITY,
+ ANDROID_SENSOR_BASE_GAIN_FACTOR,
+ ANDROID_SENSOR_BLACK_LEVEL_PATTERN,
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM1,
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM2,
+ ANDROID_SENSOR_COLOR_TRANSFORM1,
+ ANDROID_SENSOR_COLOR_TRANSFORM2,
+ ANDROID_SENSOR_FORWARD_MATRIX1,
+ ANDROID_SENSOR_FORWARD_MATRIX2,
+ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,
+ ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS,
+ ANDROID_SENSOR_ORIENTATION,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT2,
+ ANDROID_SENSOR_TIMESTAMP,
+ ANDROID_SENSOR_END,
- ANDROID_COLOR_MODE = ANDROID_COLOR_START,
- ANDROID_COLOR_TRANSFORM,
- ANDROID_COLOR_END,
+ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE
+ = ANDROID_SENSOR_INFO_START,
+ ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
+ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
+ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION,
+ ANDROID_SENSOR_INFO_PHYSICAL_SIZE,
+ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,
+ ANDROID_SENSOR_INFO_WHITE_LEVEL,
+ ANDROID_SENSOR_INFO_END,
- ANDROID_COLOR_INFO_END = ANDROID_COLOR_INFO_START,
+ ANDROID_SHADING_MODE = ANDROID_SHADING_START,
+ ANDROID_SHADING_STRENGTH,
+ ANDROID_SHADING_END,
- ANDROID_TONEMAP_MODE = ANDROID_TONEMAP_START,
- ANDROID_TONEMAP_CURVE_RED,
+ ANDROID_STATISTICS_FACE_DETECT_MODE
+ = ANDROID_STATISTICS_START,
+ ANDROID_STATISTICS_HISTOGRAM_MODE,
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE,
+ ANDROID_STATISTICS_FACE_IDS,
+ ANDROID_STATISTICS_FACE_LANDMARKS,
+ ANDROID_STATISTICS_FACE_RECTANGLES,
+ ANDROID_STATISTICS_FACE_SCORES,
+ ANDROID_STATISTICS_HISTOGRAM,
+ ANDROID_STATISTICS_SHARPNESS_MAP,
+ ANDROID_STATISTICS_END,
+
+ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
+ = ANDROID_STATISTICS_INFO_START,
+ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE,
+ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE,
+ ANDROID_STATISTICS_INFO_END,
+
+ ANDROID_TONEMAP_CURVE_BLUE = ANDROID_TONEMAP_START,
ANDROID_TONEMAP_CURVE_GREEN,
- ANDROID_TONEMAP_CURVE_BLUE,
+ ANDROID_TONEMAP_CURVE_RED,
+ ANDROID_TONEMAP_MODE,
+ ANDROID_TONEMAP_MAX_CURVE_POINTS,
ANDROID_TONEMAP_END,
- ANDROID_TONEMAP_MAX_CURVE_POINTS = ANDROID_TONEMAP_INFO_START,
- ANDROID_TONEMAP_INFO_END,
-
- ANDROID_EDGE_MODE = ANDROID_EDGE_START,
- ANDROID_EDGE_STRENGTH,
- ANDROID_EDGE_END,
-
- ANDROID_EDGE_INFO_END = ANDROID_EDGE_INFO_START,
+ ANDROID_LED_TRANSMIT = ANDROID_LED_START,
+ ANDROID_LED_AVAILABLE_LEDS,
+ ANDROID_LED_END,
- ANDROID_SCALER_CROP_REGION = ANDROID_SCALER_START,
- ANDROID_SCALER_END,
-
- ANDROID_SCALER_AVAILABLE_FORMATS = ANDROID_SCALER_INFO_START,
- ANDROID_SCALER_AVAILABLE_RAW_SIZES,
- ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS,
- ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES,
- ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS,
- ANDROID_SCALER_AVAILABLE_JPEG_SIZES,
- ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS,
- ANDROID_SCALER_AVAILABLE_MAX_ZOOM,
- ANDROID_SCALER_INFO_END,
-
- ANDROID_JPEG_QUALITY = ANDROID_JPEG_START,
- ANDROID_JPEG_THUMBNAIL_SIZE,
- ANDROID_JPEG_THUMBNAIL_QUALITY,
- ANDROID_JPEG_GPS_COORDINATES,
- ANDROID_JPEG_GPS_PROCESSING_METHOD,
- ANDROID_JPEG_GPS_TIMESTAMP,
- ANDROID_JPEG_ORIENTATION,
- ANDROID_JPEG_SIZE,
- ANDROID_JPEG_END,
-
- ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES = ANDROID_JPEG_INFO_START,
- ANDROID_JPEG_MAX_SIZE,
- ANDROID_JPEG_INFO_END,
-
- ANDROID_STATS_FACE_DETECT_MODE = ANDROID_STATS_START,
- ANDROID_STATS_FACE_RECTANGLES,
- ANDROID_STATS_FACE_SCORES,
- ANDROID_STATS_FACE_LANDMARKS,
- ANDROID_STATS_FACE_IDS,
- ANDROID_STATS_HISTOGRAM_MODE,
- ANDROID_STATS_HISTOGRAM,
- ANDROID_STATS_SHARPNESS_MAP_MODE,
- ANDROID_STATS_SHARPNESS_MAP,
- ANDROID_STATS_END,
-
- ANDROID_STATS_AVAILABLE_FACE_DETECT_MODES = ANDROID_STATS_INFO_START,
- ANDROID_STATS_MAX_FACE_COUNT,
- ANDROID_STATS_HISTOGRAM_BUCKET_COUNT,
- ANDROID_STATS_MAX_HISTOGRAM_COUNT,
- ANDROID_STATS_SHARPNESS_MAP_SIZE,
- ANDROID_STATS_MAX_SHARPNESS_MAP_VALUE,
- ANDROID_STATS_INFO_END,
-
- ANDROID_CONTROL_CAPTURE_INTENT = ANDROID_CONTROL_START,
- ANDROID_CONTROL_MODE,
- ANDROID_CONTROL_EFFECT_MODE,
- ANDROID_CONTROL_SCENE_MODE,
- ANDROID_CONTROL_VIDEO_STABILIZATION_MODE,
- ANDROID_CONTROL_AE_MODE,
- ANDROID_CONTROL_AE_LOCK,
- ANDROID_CONTROL_AE_REGIONS,
- ANDROID_CONTROL_AE_EXP_COMPENSATION,
- ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
- ANDROID_CONTROL_AE_ANTIBANDING_MODE,
- ANDROID_CONTROL_AE_STATE,
- ANDROID_CONTROL_AE_PRECAPTURE_ID,
- ANDROID_CONTROL_AWB_MODE,
- ANDROID_CONTROL_AWB_LOCK,
- ANDROID_CONTROL_AWB_REGIONS,
- ANDROID_CONTROL_AWB_STATE,
- ANDROID_CONTROL_AF_MODE,
- ANDROID_CONTROL_AF_REGIONS,
- ANDROID_CONTROL_AF_STATE,
- ANDROID_CONTROL_AF_TRIGGER_ID,
- ANDROID_CONTROL_END,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL
+ = ANDROID_INFO_START,
+ ANDROID_INFO_END,
- ANDROID_CONTROL_AVAILABLE_SCENE_MODES = ANDROID_CONTROL_INFO_START,
- ANDROID_CONTROL_AVAILABLE_EFFECTS,
- ANDROID_CONTROL_MAX_REGIONS,
- ANDROID_CONTROL_AE_AVAILABLE_MODES,
- ANDROID_CONTROL_AE_EXP_COMPENSATION_STEP,
- ANDROID_CONTROL_AE_EXP_COMPENSATION_RANGE,
- ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
- ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES,
- ANDROID_CONTROL_AWB_AVAILABLE_MODES,
- ANDROID_CONTROL_AF_AVAILABLE_MODES,
- ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
- ANDROID_CONTROL_SCENE_MODE_OVERRIDES,
- ANDROID_CONTROL_INFO_END,
-
- ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO = ANDROID_QUIRKS_INFO_START,
- ANDROID_QUIRKS_USE_ZSL_FORMAT,
- ANDROID_QUIRKS_METERING_CROP_REGION,
- ANDROID_QUIRKS_INFO_END
-};
+} camera_metadata_tag_t;
/**
* Enumeration definitions for the various entries that need them
*/
-// ANDROID_REQUEST_METADATA_TYPE
-enum {
- ANDROID_REQUEST_TYPE_CAPTURE = 0,
- ANDROID_REQUEST_TYPE_REPROCESS
-};
+// ANDROID_COLOR_CORRECTION_MODE
+typedef enum camera_metadata_enum_android_color_correction_mode {
+ ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX,
+ ANDROID_COLOR_CORRECTION_MODE_FAST,
+ ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_color_correction_mode_t;
-// ANDROID_REQUEST_METADATA_MODE
-enum {
- ANDROID_REQUEST_METADATA_NONE = 0,
- ANDROID_REQUEST_METADATA_FULL
-};
-// ANDROID_LENS_OPTICAL_STABILIZATION_MODE
-enum {
- ANDROID_LENS_OPTICAL_STABILIZATION_OFF = 0,
- ANDROID_LENS_OPTICAL_STABILIZATION_ON
-};
+// ANDROID_CONTROL_AE_ANTIBANDING_MODE
+typedef enum camera_metadata_enum_android_control_ae_antibanding_mode {
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO,
+} camera_metadata_enum_android_control_ae_antibanding_mode_t;
-// ANDROID_LENS_FACING
-enum {
- ANDROID_LENS_FACING_BACK = 0,
- ANDROID_LENS_FACING_FRONT
-};
+// ANDROID_CONTROL_AE_LOCK
+typedef enum camera_metadata_enum_android_control_ae_lock {
+ ANDROID_CONTROL_AE_LOCK_OFF,
+ ANDROID_CONTROL_AE_LOCK_ON,
+} camera_metadata_enum_android_control_ae_lock_t;
-// ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
-enum {
- ANDROID_SENSOR_RGGB = 0,
- ANDROID_SENSOR_GRBG,
- ANDROID_SENSOR_GBRG,
- ANDROID_SENSOR_BGGR,
- ANDROID_SENSOR_RGB
-};
+// ANDROID_CONTROL_AE_MODE
+typedef enum camera_metadata_enum_android_control_ae_mode {
+ ANDROID_CONTROL_AE_MODE_OFF,
+ ANDROID_CONTROL_AE_MODE_ON,
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH,
+ ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH,
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE,
+} 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,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START,
+} camera_metadata_enum_android_control_ae_precapture_trigger_t;
-// ANDROID_FLASH_MODE
-enum {
- ANDROID_FLASH_OFF = 0,
- ANDROID_FLASH_SINGLE,
- ANDROID_FLASH_TORCH
-};
-
-// General processing block modes
-enum {
- ANDROID_PROCESSING_OFF = 0,
- ANDROID_PROCESSING_FAST,
- ANDROID_PROCESSING_HIGH_QUALITY
-};
+// ANDROID_CONTROL_AF_MODE
+typedef enum camera_metadata_enum_android_control_af_mode {
+ ANDROID_CONTROL_AF_MODE_OFF,
+ ANDROID_CONTROL_AF_MODE_AUTO,
+ ANDROID_CONTROL_AF_MODE_MACRO,
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO,
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE,
+ ANDROID_CONTROL_AF_MODE_EDOF,
+} 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,
+ ANDROID_CONTROL_AF_TRIGGER_START,
+ ANDROID_CONTROL_AF_TRIGGER_CANCEL,
+} camera_metadata_enum_android_control_af_trigger_t;
-// ANDROID_DEMOSAIC_MODE
-enum {
- ANDROID_DEMOSAIC_FAST = 1,
- ANDROID_DEMOSAIC_HIGH_QUALITY
-};
-
-// ANDROID_COLOR_MODE
-enum {
- ANDROID_COLOR_FAST = 1,
- ANDROID_COLOR_HIGH_QUALITY,
- ANDROID_COLOR_TRANSFORM_MATRIX
-};
+// ANDROID_CONTROL_AWB_LOCK
+typedef enum camera_metadata_enum_android_control_awb_lock {
+ ANDROID_CONTROL_AWB_LOCK_OFF,
+ ANDROID_CONTROL_AWB_LOCK_ON,
+} camera_metadata_enum_android_control_awb_lock_t;
-// ANDROID_TONEMAP_MODE
-enum {
- ANDROID_TONEMAP_FAST = 1,
- ANDROID_TONEMAP_HIGH_QUALITY,
- ANDROID_TONEMAP_CONTRAST_CURVE
-};
-
-// ANDROID_SCALER_AVAILABLE_FORMATS uses HAL_PIXEL_FORMAT_* from
-// system/graphics.h
-
-// ANDROID_STATS_FACE_DETECTION_MODE
-enum {
- ANDROID_STATS_FACE_DETECTION_OFF = 0,
- ANDROID_STATS_FACE_DETECTION_SIMPLE,
- ANDROID_STATS_FACE_DETECTION_FULL
-};
-
-// ANDROID_STATS_HISTOGRAM/SHARPNESS_MAP_MODE
-enum {
- ANDROID_STATS_OFF = 0,
- ANDROID_STATS_ON
-};
+// ANDROID_CONTROL_AWB_MODE
+typedef enum camera_metadata_enum_android_control_awb_mode {
+ ANDROID_CONTROL_AWB_MODE_OFF,
+ ANDROID_CONTROL_AWB_MODE_AUTO,
+ ANDROID_CONTROL_AWB_MODE_INCANDESCENT,
+ ANDROID_CONTROL_AWB_MODE_FLUORESCENT,
+ ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT,
+ ANDROID_CONTROL_AWB_MODE_DAYLIGHT,
+ ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT,
+ ANDROID_CONTROL_AWB_MODE_TWILIGHT,
+ ANDROID_CONTROL_AWB_MODE_SHADE,
+} camera_metadata_enum_android_control_awb_mode_t;
// ANDROID_CONTROL_CAPTURE_INTENT
-enum {
- ANDROID_CONTROL_INTENT_CUSTOM = 0,
- ANDROID_CONTROL_INTENT_PREVIEW,
- ANDROID_CONTROL_INTENT_STILL_CAPTURE,
- ANDROID_CONTROL_INTENT_VIDEO_RECORD,
- ANDROID_CONTROL_INTENT_VIDEO_SNAPSHOT,
- ANDROID_CONTROL_INTENT_ZERO_SHUTTER_LAG
-};
+typedef enum camera_metadata_enum_android_control_capture_intent {
+ ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM,
+ ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW,
+ ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE,
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD,
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT,
+ ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG,
+} 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,
+ ANDROID_CONTROL_EFFECT_MODE_MONO,
+ ANDROID_CONTROL_EFFECT_MODE_NEGATIVE,
+ ANDROID_CONTROL_EFFECT_MODE_SOLARIZE,
+ ANDROID_CONTROL_EFFECT_MODE_SEPIA,
+ ANDROID_CONTROL_EFFECT_MODE_POSTERIZE,
+ ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD,
+ ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD,
+ ANDROID_CONTROL_EFFECT_MODE_AQUA,
+} camera_metadata_enum_android_control_effect_mode_t;
// ANDROID_CONTROL_MODE
-enum {
- ANDROID_CONTROL_OFF = 0,
- ANDROID_CONTROL_AUTO,
- ANDROID_CONTROL_USE_SCENE_MODE
-};
+typedef enum camera_metadata_enum_android_control_mode {
+ ANDROID_CONTROL_MODE_OFF,
+ ANDROID_CONTROL_MODE_AUTO,
+ ANDROID_CONTROL_MODE_USE_SCENE_MODE,
+} camera_metadata_enum_android_control_mode_t;
// ANDROID_CONTROL_SCENE_MODE
-enum {
- ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED = 0, // Only for availableSceneModes
+typedef enum camera_metadata_enum_android_control_scene_mode {
+ ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED = 0,
ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY,
ANDROID_CONTROL_SCENE_MODE_ACTION,
ANDROID_CONTROL_SCENE_MODE_PORTRAIT,
@@ -439,104 +439,233 @@ enum {
ANDROID_CONTROL_SCENE_MODE_SPORTS,
ANDROID_CONTROL_SCENE_MODE_PARTY,
ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT,
- ANDROID_CONTROL_SCENE_MODE_BARCODE
-};
-
-// ANDROID_CONTROL_EFFECT_MODE
-enum {
- ANDROID_CONTROL_EFFECT_OFF = 0,
- ANDROID_CONTROL_EFFECT_MONO,
- ANDROID_CONTROL_EFFECT_NEGATIVE,
- ANDROID_CONTROL_EFFECT_SOLARIZE,
- ANDROID_CONTROL_EFFECT_SEPIA,
- ANDROID_CONTROL_EFFECT_POSTERIZE,
- ANDROID_CONTROL_EFFECT_WHITEBOARD,
- ANDROID_CONTROL_EFFECT_BLACKBOARD,
- ANDROID_CONTROL_EFFECT_AQUA
-};
+ ANDROID_CONTROL_SCENE_MODE_BARCODE,
+} camera_metadata_enum_android_control_scene_mode_t;
-// ANDROID_CONTROL_AE_MODE
-enum {
- ANDROID_CONTROL_AE_OFF = 0,
- ANDROID_CONTROL_AE_ON,
- ANDROID_CONTROL_AE_ON_AUTO_FLASH,
- ANDROID_CONTROL_AE_ON_ALWAYS_FLASH,
- ANDROID_CONTROL_AE_ON_AUTO_FLASH_REDEYE
-};
-
-// ANDROID_CONTROL_AE_LOCK
-enum {
- ANDROID_CONTROL_AE_LOCK_OFF = 0,
- ANDROID_CONTROL_AE_LOCK_ON
-};
-
-// ANDROID_CONTROL_AE_ANTIBANDING_MODE
-enum {
- ANDROID_CONTROL_AE_ANTIBANDING_OFF = 0,
- ANDROID_CONTROL_AE_ANTIBANDING_50HZ,
- ANDROID_CONTROL_AE_ANTIBANDING_60HZ,
- ANDROID_CONTROL_AE_ANTIBANDING_AUTO
-};
+// ANDROID_CONTROL_VIDEO_STABILIZATION_MODE
+typedef enum camera_metadata_enum_android_control_video_stabilization_mode {
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON,
+} camera_metadata_enum_android_control_video_stabilization_mode_t;
// ANDROID_CONTROL_AE_STATE
-enum {
- ANDROID_CONTROL_AE_STATE_INACTIVE = 0,
+typedef enum camera_metadata_enum_android_control_ae_state {
+ ANDROID_CONTROL_AE_STATE_INACTIVE,
ANDROID_CONTROL_AE_STATE_SEARCHING,
ANDROID_CONTROL_AE_STATE_CONVERGED,
ANDROID_CONTROL_AE_STATE_LOCKED,
ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED,
- ANDROID_CONTROL_AE_STATE_PRECAPTURE
-};
+ ANDROID_CONTROL_AE_STATE_PRECAPTURE,
+} camera_metadata_enum_android_control_ae_state_t;
-// ANDROID_CONTROL_AWB_MODE
-enum {
- ANDROID_CONTROL_AWB_OFF = 0,
- ANDROID_CONTROL_AWB_AUTO,
- ANDROID_CONTROL_AWB_INCANDESCENT,
- ANDROID_CONTROL_AWB_FLUORESCENT,
- ANDROID_CONTROL_AWB_WARM_FLUORESCENT,
- ANDROID_CONTROL_AWB_DAYLIGHT,
- ANDROID_CONTROL_AWB_CLOUDY_DAYLIGHT,
- ANDROID_CONTROL_AWB_TWILIGHT,
- ANDROID_CONTROL_AWB_SHADE
-};
-
-// ANDROID_CONTROL_AWB_LOCK
-enum {
- ANDROID_CONTROL_AWB_LOCK_OFF = 0,
- ANDROID_CONTROL_AWB_LOCK_ON
-};
+// ANDROID_CONTROL_AF_STATE
+typedef enum camera_metadata_enum_android_control_af_state {
+ ANDROID_CONTROL_AF_STATE_INACTIVE,
+ ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN,
+ ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED,
+ ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN,
+ ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED,
+ ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED,
+} camera_metadata_enum_android_control_af_state_t;
// ANDROID_CONTROL_AWB_STATE
-enum {
- ANDROID_CONTROL_AWB_STATE_INACTIVE = 0,
+typedef enum camera_metadata_enum_android_control_awb_state {
+ ANDROID_CONTROL_AWB_STATE_INACTIVE,
ANDROID_CONTROL_AWB_STATE_SEARCHING,
ANDROID_CONTROL_AWB_STATE_CONVERGED,
ANDROID_CONTROL_AWB_STATE_LOCKED,
-};
+} camera_metadata_enum_android_control_awb_state_t;
+
+
+// ANDROID_DEMOSAIC_MODE
+typedef enum camera_metadata_enum_android_demosaic_mode {
+ ANDROID_DEMOSAIC_MODE_FAST,
+ ANDROID_DEMOSAIC_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_demosaic_mode_t;
+
+
+// ANDROID_EDGE_MODE
+typedef enum camera_metadata_enum_android_edge_mode {
+ ANDROID_EDGE_MODE_OFF,
+ ANDROID_EDGE_MODE_FAST,
+ ANDROID_EDGE_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_edge_mode_t;
+
+
+// ANDROID_FLASH_MODE
+typedef enum camera_metadata_enum_android_flash_mode {
+ ANDROID_FLASH_MODE_OFF,
+ ANDROID_FLASH_MODE_SINGLE,
+ ANDROID_FLASH_MODE_TORCH,
+} camera_metadata_enum_android_flash_mode_t;
+
+// ANDROID_FLASH_STATE
+typedef enum camera_metadata_enum_android_flash_state {
+ ANDROID_FLASH_STATE_UNAVAILABLE,
+ ANDROID_FLASH_STATE_CHARGING,
+ ANDROID_FLASH_STATE_READY,
+ ANDROID_FLASH_STATE_FIRED,
+} camera_metadata_enum_android_flash_state_t;
+
+
+
+// ANDROID_GEOMETRIC_MODE
+typedef enum camera_metadata_enum_android_geometric_mode {
+ ANDROID_GEOMETRIC_MODE_OFF,
+ ANDROID_GEOMETRIC_MODE_FAST,
+ ANDROID_GEOMETRIC_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_geometric_mode_t;
+
+
+// ANDROID_HOT_PIXEL_MODE
+typedef enum camera_metadata_enum_android_hot_pixel_mode {
+ ANDROID_HOT_PIXEL_MODE_OFF,
+ ANDROID_HOT_PIXEL_MODE_FAST,
+ ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY,
+} 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,
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON,
+} camera_metadata_enum_android_lens_optical_stabilization_mode_t;
+
+// ANDROID_LENS_FACING
+typedef enum camera_metadata_enum_android_lens_facing {
+ ANDROID_LENS_FACING_FRONT,
+ ANDROID_LENS_FACING_BACK,
+} camera_metadata_enum_android_lens_facing_t;
+
+// ANDROID_LENS_STATE
+typedef enum camera_metadata_enum_android_lens_state {
+ ANDROID_LENS_STATE_STATIONARY,
+} camera_metadata_enum_android_lens_state_t;
+
+
+
+// ANDROID_NOISE_REDUCTION_MODE
+typedef enum camera_metadata_enum_android_noise_reduction_mode {
+ ANDROID_NOISE_REDUCTION_MODE_OFF,
+ ANDROID_NOISE_REDUCTION_MODE_FAST,
+ ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_noise_reduction_mode_t;
+
+
+
+// ANDROID_REQUEST_METADATA_MODE
+typedef enum camera_metadata_enum_android_request_metadata_mode {
+ ANDROID_REQUEST_METADATA_MODE_NONE,
+ ANDROID_REQUEST_METADATA_MODE_FULL,
+} camera_metadata_enum_android_request_metadata_mode_t;
+
+// ANDROID_REQUEST_TYPE
+typedef enum camera_metadata_enum_android_request_type {
+ ANDROID_REQUEST_TYPE_CAPTURE,
+ ANDROID_REQUEST_TYPE_REPROCESS,
+} camera_metadata_enum_android_request_type_t;
+
+
+// ANDROID_SCALER_AVAILABLE_FORMATS
+typedef enum camera_metadata_enum_android_scaler_available_formats {
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW_SENSOR = 0x20,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 0x32315659,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP = 0x11,
+ ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED = 0x22,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888 = 0x23,
+ ANDROID_SCALER_AVAILABLE_FORMATS_BLOB = 0x21,
+} camera_metadata_enum_android_scaler_available_formats_t;
+
+
+// ANDROID_SENSOR_REFERENCE_ILLUMINANT1
+typedef enum camera_metadata_enum_android_sensor_reference_illuminant1 {
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55 = 20,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65 = 21,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75 = 22,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50 = 23,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24,
+} camera_metadata_enum_android_sensor_reference_illuminant1_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,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB,
+} camera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
+
+
+// ANDROID_SHADING_MODE
+typedef enum camera_metadata_enum_android_shading_mode {
+ ANDROID_SHADING_MODE_OFF,
+ ANDROID_SHADING_MODE_FAST,
+ ANDROID_SHADING_MODE_HIGH_QUALITY,
+} 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,
+ ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE,
+ ANDROID_STATISTICS_FACE_DETECT_MODE_FULL,
+} 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,
+ ANDROID_STATISTICS_HISTOGRAM_MODE_ON,
+} 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,
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON,
+} camera_metadata_enum_android_statistics_sharpness_map_mode_t;
+
+
+
+// ANDROID_TONEMAP_MODE
+typedef enum camera_metadata_enum_android_tonemap_mode {
+ ANDROID_TONEMAP_MODE_CONTRAST_CURVE,
+ ANDROID_TONEMAP_MODE_FAST,
+ ANDROID_TONEMAP_MODE_HIGH_QUALITY,
+} camera_metadata_enum_android_tonemap_mode_t;
+
+
+// ANDROID_LED_TRANSMIT
+typedef enum camera_metadata_enum_android_led_transmit {
+ ANDROID_LED_TRANSMIT_OFF,
+ ANDROID_LED_TRANSMIT_ON,
+} 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,
+} 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,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
+} camera_metadata_enum_android_info_supported_hardware_level_t;
-// ANDROID_CONTROL_AF_MODE
-enum {
- ANDROID_CONTROL_AF_OFF = 0,
- ANDROID_CONTROL_AF_AUTO,
- ANDROID_CONTROL_AF_MACRO,
- ANDROID_CONTROL_AF_CONTINUOUS_VIDEO,
- ANDROID_CONTROL_AF_CONTINUOUS_PICTURE,
- ANDROID_CONTROL_AF_EDOF
-};
-// ANDROID_CONTROL_AF_STATE
-enum {
- ANDROID_CONTROL_AF_STATE_INACTIVE = 0,
- ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN,
- ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED,
- ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN,
- ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED,
- ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
-};
-
-// ANDROID_CONTROL_VIDEO_STABILIZATION
-enum {
- ANDROID_CONTROL_VIDEO_STABILIZATION_OFF = 0,
- ANDROID_CONTROL_VIDEO_STABILIZATION_ON
-};
diff --git a/camera/src/Android.mk b/camera/src/Android.mk
index d3366182..47e8050b 100644
--- a/camera/src/Android.mk
+++ b/camera/src/Android.mk
@@ -9,7 +9,8 @@ LOCAL_C_INCLUDES:= \
system/media/camera/include
LOCAL_SHARED_LIBRARIES := \
- libcutils
+ libcutils \
+ liblog
LOCAL_MODULE := libcamera_metadata
LOCAL_MODULE_TAGS := optional
@@ -21,5 +22,3 @@ LOCAL_CFLAGS += \
include $(BUILD_SHARED_LIBRARY)
-
-
diff --git a/camera/src/camera_metadata.c b/camera/src/camera_metadata.c
index e5c2f251..76fca9ae 100644
--- a/camera/src/camera_metadata.c
+++ b/camera/src/camera_metadata.c
@@ -15,6 +15,8 @@
*/
#define _GNU_SOURCE // for fdprintf
#include <system/camera_metadata.h>
+
+#define LOG_TAG "camera_metadata"
#include <cutils/log.h>
#include <stdio.h>
#include <stdlib.h>
@@ -34,7 +36,9 @@
#define DATA_ALIGNMENT _Alignas(camera_metadata_data_t)
#define ALIGN_TO(val, alignment) \
- (((uint32_t)(val) + ((alignment) - 1)) & ~((alignment) - 1))
+ (((uintptr_t)(val) + ((alignment) - 1)) & ~((alignment) - 1))
+
+typedef size_t uptrdiff_t;
/**
* A single metadata entry, storing an array of values of a given type. If the
@@ -93,10 +97,10 @@ struct camera_metadata {
uint32_t flags;
size_t entry_count;
size_t entry_capacity;
- ptrdiff_t entries_start; // Offset from camera_metadata
+ uptrdiff_t entries_start; // Offset from camera_metadata
size_t data_count;
size_t data_capacity;
- ptrdiff_t data_start; // Offset from camera_metadata
+ uptrdiff_t data_start; // Offset from camera_metadata
void *user; // User set pointer, not copied with buffer
uint8_t reserved[0];
};
@@ -159,6 +163,26 @@ static uint8_t *get_data(const camera_metadata_t *metadata) {
return (uint8_t*)metadata + metadata->data_start;
}
+camera_metadata_t *allocate_copy_camera_metadata_checked(
+ const camera_metadata_t *src,
+ size_t src_size) {
+
+ if (src == NULL) {
+ return NULL;
+ }
+
+ void *buffer = malloc(src_size);
+ memcpy(buffer, src, src_size);
+
+ camera_metadata_t *metadata = (camera_metadata_t*) buffer;
+ if (validate_camera_metadata_structure(metadata, &src_size) != OK) {
+ free(buffer);
+ return NULL;
+ }
+
+ return metadata;
+}
+
camera_metadata_t *allocate_camera_metadata(size_t entry_capacity,
size_t data_capacity) {
if (entry_capacity == 0) return NULL;
@@ -192,13 +216,9 @@ camera_metadata_t *place_camera_metadata(void *dst,
metadata->data_count = 0;
metadata->data_capacity = data_capacity;
metadata->size = memory_needed;
- if (metadata->data_capacity != 0) {
- size_t data_unaligned = (uint8_t*)(get_entries(metadata) +
- metadata->entry_capacity) - (uint8_t*)metadata;
- metadata->data_start = ALIGN_TO(data_unaligned, DATA_ALIGNMENT);
- } else {
- metadata->data_start = 0;
- }
+ size_t data_unaligned = (uint8_t*)(get_entries(metadata) +
+ metadata->entry_capacity) - (uint8_t*)metadata;
+ metadata->data_start = ALIGN_TO(data_unaligned, DATA_ALIGNMENT);
metadata->user = NULL;
return metadata;
@@ -271,6 +291,155 @@ camera_metadata_t* copy_camera_metadata(void *dst, size_t dst_size,
return metadata;
}
+int validate_camera_metadata_structure(const camera_metadata_t *metadata,
+ const size_t *expected_size) {
+
+ if (metadata == NULL) {
+ return ERROR;
+ }
+
+ // Check that the metadata pointer is well-aligned first.
+ {
+ struct {
+ const char *name;
+ size_t alignment;
+ } alignments[] = {
+ {
+ .name = "camera_metadata",
+ .alignment = _Alignas(struct camera_metadata)
+ },
+ {
+ .name = "camera_metadata_buffer_entry",
+ .alignment = _Alignas(struct camera_metadata_buffer_entry)
+ },
+ {
+ .name = "camera_metadata_data",
+ .alignment = _Alignas(union camera_metadata_data)
+ },
+ };
+
+ for (size_t i = 0; i < sizeof(alignments)/sizeof(alignments[0]); ++i) {
+ uintptr_t aligned_ptr = ALIGN_TO(metadata, alignments[i].alignment);
+
+ if ((uintptr_t)metadata != aligned_ptr) {
+ ALOGE("%s: Metadata pointer is not aligned (actual %p, "
+ "expected %p) to type %s",
+ __FUNCTION__, metadata,
+ (void*)aligned_ptr, alignments[i].name);
+ return ERROR;
+ }
+ }
+ }
+
+ /**
+ * Check that the metadata contents are correct
+ */
+
+ if (expected_size != NULL && metadata->size > *expected_size) {
+ ALOGE("%s: Metadata size (%u) should be <= expected size (%u)",
+ __FUNCTION__, metadata->size, *expected_size);
+ return ERROR;
+ }
+
+ if (metadata->entry_count > metadata->entry_capacity) {
+ ALOGE("%s: Entry count (%u) should be <= entry capacity (%u)",
+ __FUNCTION__, metadata->entry_count, metadata->entry_capacity);
+ return ERROR;
+ }
+
+ uptrdiff_t entries_end = metadata->entries_start + metadata->entry_capacity;
+ if (entries_end < metadata->entries_start || // overflow check
+ entries_end > metadata->data_start) {
+
+ ALOGE("%s: Entry start + capacity (%u) should be <= data start (%u)",
+ __FUNCTION__,
+ (metadata->entries_start + metadata->entry_capacity),
+ metadata->data_start);
+ return ERROR;
+ }
+
+ uptrdiff_t data_end = metadata->data_start + metadata->data_capacity;
+ if (data_end < metadata->data_start || // overflow check
+ data_end > metadata->size) {
+
+ ALOGE("%s: Data start + capacity (%u) should be <= total size (%u)",
+ __FUNCTION__,
+ (metadata->data_start + metadata->data_capacity),
+ metadata->size);
+ return ERROR;
+ }
+
+ // Validate each entry
+ size_t entry_count = metadata->entry_count;
+ camera_metadata_buffer_entry_t *entries = get_entries(metadata);
+
+ for (size_t i = 0; i < entry_count; ++i) {
+
+ if ((uintptr_t)&entries[i] != ALIGN_TO(&entries[i], ENTRY_ALIGNMENT)) {
+ ALOGE("%s: Entry index %u had bad alignment (address %p),"
+ " expected alignment %d",
+ __FUNCTION__, i, &entries[i], ENTRY_ALIGNMENT);
+ return ERROR;
+ }
+
+ camera_metadata_buffer_entry_t entry = entries[i];
+
+ if (entry.type >= NUM_TYPES) {
+ ALOGE("%s: Entry index %u had a bad type %d",
+ __FUNCTION__, i, entry.type);
+ return ERROR;
+ }
+
+ // TODO: fix vendor_tag_ops across processes so we don't need to special
+ // case vendor-specific tags
+ uint32_t tag_section = entry.tag >> 16;
+ int tag_type = get_camera_metadata_tag_type(entry.tag);
+ if (tag_type != (int)entry.type && tag_section < VENDOR_SECTION) {
+ ALOGE("%s: Entry index %u had tag type %d, but the type was %d",
+ __FUNCTION__, i, tag_type, entry.type);
+ return ERROR;
+ }
+
+ size_t data_size =
+ calculate_camera_metadata_entry_data_size(entry.type,
+ entry.count);
+
+ if (data_size != 0) {
+ camera_metadata_data_t *data =
+ (camera_metadata_data_t*) (get_data(metadata) +
+ entry.data.offset);
+
+ if ((uintptr_t)data != ALIGN_TO(data, DATA_ALIGNMENT)) {
+ ALOGE("%s: Entry index %u had bad data alignment (address %p),"
+ " expected align %d, (tag name %s, data size %u)",
+ __FUNCTION__, i, data, DATA_ALIGNMENT,
+ get_camera_metadata_tag_name(entry.tag) ?: "unknown",
+ data_size);
+ return ERROR;
+ }
+
+ size_t data_entry_end = entry.data.offset + data_size;
+ if (data_entry_end < entry.data.offset || // overflow check
+ data_entry_end > metadata->data_capacity) {
+
+ ALOGE("%s: Entry index %u data ends (%u) beyond the capacity "
+ "%u", __FUNCTION__, i, data_entry_end,
+ metadata->data_capacity);
+ return ERROR;
+ }
+
+ } else if (entry.count == 0) {
+ if (entry.data.offset != 0) {
+ ALOGE("%s: Entry index %u had 0 items, but offset was non-0 "
+ "(%u)", __FUNCTION__, i, entry.data.offset);
+ return ERROR;
+ }
+ } // else data stored inline, so we look at value which can be anything.
+ }
+
+ return OK;
+}
+
int append_camera_metadata(camera_metadata_t *dst,
const camera_metadata_t *src) {
if (dst == NULL || src == NULL ) return ERROR;
@@ -640,7 +809,8 @@ int set_camera_metadata_vendor_tag_ops(const vendor_tag_query_ops_t *query_ops)
return OK;
}
-static void print_data(int fd, const uint8_t *data_ptr, int type, int count,
+static void print_data(int fd, const uint8_t *data_ptr, uint32_t tag, int type,
+ int count,
int indentation);
void dump_camera_metadata(const camera_metadata_t *metadata,
@@ -714,11 +884,11 @@ void dump_indented_camera_metadata(const camera_metadata_t *metadata,
int count = entry->count;
if (verbosity < 2 && count > 16) count = 16;
- print_data(fd, data_ptr, entry->type, count, indentation);
+ print_data(fd, data_ptr, entry->tag, entry->type, count, indentation);
}
}
-static void print_data(int fd, const uint8_t *data_ptr,
+static void print_data(int fd, const uint8_t *data_ptr, uint32_t tag,
int type, int count, int indentation) {
static int values_per_line[NUM_TYPES] = {
[TYPE_BYTE] = 16,
@@ -729,6 +899,8 @@ static void print_data(int fd, const uint8_t *data_ptr,
[TYPE_RATIONAL] = 2,
};
size_t type_size = camera_metadata_type_size[type];
+ char value_string_tmp[CAMERA_METADATA_ENUM_STRING_MAX_SIZE];
+ uint32_t value;
int lines = count / values_per_line[type];
if (count % values_per_line[type] != 0) lines++;
@@ -743,12 +915,31 @@ static void print_data(int fd, const uint8_t *data_ptr,
switch (type) {
case TYPE_BYTE:
- fdprintf(fd, "%hhu ",
- *(data_ptr + index));
+ value = *(data_ptr + index);
+ if (camera_metadata_enum_snprint(tag,
+ value,
+ value_string_tmp,
+ sizeof(value_string_tmp))
+ == OK) {
+ fdprintf(fd, "%s ", value_string_tmp);
+ } else {
+ fdprintf(fd, "%hhu ",
+ *(data_ptr + index));
+ }
break;
case TYPE_INT32:
- fdprintf(fd, "%d ",
- *(int32_t*)(data_ptr + index));
+ value =
+ *(int32_t*)(data_ptr + index);
+ if (camera_metadata_enum_snprint(tag,
+ value,
+ value_string_tmp,
+ sizeof(value_string_tmp))
+ == OK) {
+ fdprintf(fd, "%s ", value_string_tmp);
+ } else {
+ fdprintf(fd, "%d ",
+ *(int32_t*)(data_ptr + index));
+ }
break;
case TYPE_FLOAT:
fdprintf(fd, "%0.2f ",
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index 2b723c9b..65ffe671 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -24,549 +24,1861 @@
* sync with camera_metadata_tags.h
*/
+/**
+ * ! Do not edit this file directly !
+ *
+ * Generated automatically from camera_metadata_tag_info.mako
+ */
+
const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = {
- [ANDROID_REQUEST] = "android.request",
- [ANDROID_LENS] = "android.lens",
- [ANDROID_LENS_INFO] = "android.lens.info",
- [ANDROID_SENSOR] = "android.sensor",
- [ANDROID_SENSOR_INFO] = "android.sensor.info",
- [ANDROID_FLASH] = "android.flash",
- [ANDROID_FLASH_INFO] = "android.flash.info",
- [ANDROID_HOT_PIXEL] = "android.hotPixel",
- [ANDROID_HOT_PIXEL_INFO] = "android.hotPixel.info",
- [ANDROID_DEMOSAIC] = "android.demosaic",
- [ANDROID_DEMOSAIC_INFO] = "android.demosaic.info",
- [ANDROID_NOISE] = "android.noiseReduction",
- [ANDROID_NOISE_INFO] = "android.noiseReduction.info",
- [ANDROID_SHADING] = "android.shadingCorrection",
- [ANDROID_SHADING_INFO] = "android.shadingCorrection.info",
- [ANDROID_GEOMETRIC] = "android.geometricCorrection",
- [ANDROID_GEOMETRIC_INFO] = "android.geometricCorrection.info",
- [ANDROID_COLOR] = "android.colorCorrection",
- [ANDROID_COLOR_INFO] = "android.colorCorrection.info",
- [ANDROID_TONEMAP] = "android.tonemap",
- [ANDROID_TONEMAP_INFO] = "android.tonemap.info",
- [ANDROID_EDGE] = "android.edge",
- [ANDROID_EDGE_INFO] = "android.edge.info",
- [ANDROID_SCALER] = "android.scaler",
- [ANDROID_SCALER_INFO] = "android.scaler.info",
- [ANDROID_JPEG] = "android.jpeg",
- [ANDROID_JPEG_INFO] = "android.jpeg.info",
- [ANDROID_STATS] = "android.statistics",
- [ANDROID_STATS_INFO] = "android.statistics.info",
- [ANDROID_CONTROL] = "android.control",
- [ANDROID_CONTROL_INFO] = "android.control.info",
- [ANDROID_QUIRKS_INFO] = "android.quirks.info"
+ [ANDROID_COLOR_CORRECTION] = "android.colorCorrection",
+ [ANDROID_CONTROL] = "android.control",
+ [ANDROID_DEMOSAIC] = "android.demosaic",
+ [ANDROID_EDGE] = "android.edge",
+ [ANDROID_FLASH] = "android.flash",
+ [ANDROID_FLASH_INFO] = "android.flash.info",
+ [ANDROID_GEOMETRIC] = "android.geometric",
+ [ANDROID_HOT_PIXEL] = "android.hotPixel",
+ [ANDROID_HOT_PIXEL_INFO] = "android.hotPixel.info",
+ [ANDROID_JPEG] = "android.jpeg",
+ [ANDROID_LENS] = "android.lens",
+ [ANDROID_LENS_INFO] = "android.lens.info",
+ [ANDROID_NOISE_REDUCTION] = "android.noiseReduction",
+ [ANDROID_QUIRKS] = "android.quirks",
+ [ANDROID_REQUEST] = "android.request",
+ [ANDROID_SCALER] = "android.scaler",
+ [ANDROID_SENSOR] = "android.sensor",
+ [ANDROID_SENSOR_INFO] = "android.sensor.info",
+ [ANDROID_SHADING] = "android.shading",
+ [ANDROID_STATISTICS] = "android.statistics",
+ [ANDROID_STATISTICS_INFO] = "android.statistics.info",
+ [ANDROID_TONEMAP] = "android.tonemap",
+ [ANDROID_LED] = "android.led",
+ [ANDROID_INFO] = "android.info",
};
unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = {
- [ANDROID_REQUEST] = { ANDROID_REQUEST_START,
- ANDROID_REQUEST_END },
- [ANDROID_LENS] = { ANDROID_LENS_START,
- ANDROID_LENS_END },
- [ANDROID_LENS_INFO] = { ANDROID_LENS_INFO_START,
- ANDROID_LENS_INFO_END },
- [ANDROID_SENSOR] = { ANDROID_SENSOR_START,
- ANDROID_SENSOR_END },
- [ANDROID_SENSOR_INFO] = { ANDROID_SENSOR_INFO_START,
- ANDROID_SENSOR_INFO_END },
- [ANDROID_FLASH] = { ANDROID_FLASH_START,
- ANDROID_FLASH_END },
- [ANDROID_FLASH_INFO] = { ANDROID_FLASH_INFO_START,
- ANDROID_FLASH_INFO_END },
- [ANDROID_HOT_PIXEL] = { ANDROID_HOT_PIXEL_START,
- ANDROID_HOT_PIXEL_END },
- [ANDROID_HOT_PIXEL_INFO] = { ANDROID_HOT_PIXEL_INFO_START,
- ANDROID_HOT_PIXEL_INFO_END },
- [ANDROID_DEMOSAIC] = { ANDROID_DEMOSAIC_START,
- ANDROID_DEMOSAIC_END },
- [ANDROID_DEMOSAIC_INFO] = { ANDROID_DEMOSAIC_INFO_START,
- ANDROID_DEMOSAIC_INFO_END },
- [ANDROID_NOISE] = { ANDROID_NOISE_START,
- ANDROID_NOISE_END },
- [ANDROID_NOISE_INFO] = { ANDROID_NOISE_INFO_START,
- ANDROID_NOISE_INFO_END },
- [ANDROID_SHADING] = { ANDROID_SHADING_START,
- ANDROID_SHADING_END },
- [ANDROID_SHADING_INFO] = { ANDROID_SHADING_INFO_START,
- ANDROID_SHADING_INFO_END },
- [ANDROID_GEOMETRIC] = { ANDROID_GEOMETRIC_START,
- ANDROID_GEOMETRIC_END },
- [ANDROID_GEOMETRIC_INFO] = { ANDROID_GEOMETRIC_INFO_START,
- ANDROID_GEOMETRIC_INFO_END },
- [ANDROID_COLOR] = { ANDROID_COLOR_START,
- ANDROID_COLOR_END },
- [ANDROID_COLOR_INFO] = { ANDROID_COLOR_INFO_START,
- ANDROID_COLOR_INFO_END },
- [ANDROID_TONEMAP] = { ANDROID_TONEMAP_START,
- ANDROID_TONEMAP_END },
- [ANDROID_TONEMAP_INFO] = { ANDROID_TONEMAP_INFO_START,
- ANDROID_TONEMAP_INFO_END },
- [ANDROID_EDGE] = { ANDROID_EDGE_START,
- ANDROID_EDGE_END },
- [ANDROID_EDGE_INFO] = { ANDROID_EDGE_INFO_START,
- ANDROID_EDGE_INFO_END },
- [ANDROID_SCALER] = { ANDROID_SCALER_START,
- ANDROID_SCALER_END },
- [ANDROID_SCALER_INFO] = { ANDROID_SCALER_INFO_START,
- ANDROID_SCALER_INFO_END },
- [ANDROID_JPEG] = { ANDROID_JPEG_START,
- ANDROID_JPEG_END },
- [ANDROID_JPEG_INFO] = { ANDROID_JPEG_INFO_START,
- ANDROID_JPEG_INFO_END },
- [ANDROID_STATS] = { ANDROID_STATS_START,
- ANDROID_STATS_END },
- [ANDROID_STATS_INFO] = { ANDROID_STATS_INFO_START,
- ANDROID_STATS_INFO_END },
- [ANDROID_CONTROL] = { ANDROID_CONTROL_START,
- ANDROID_CONTROL_END },
- [ANDROID_CONTROL_INFO] = { ANDROID_CONTROL_INFO_START,
- ANDROID_CONTROL_INFO_END },
- [ANDROID_QUIRKS_INFO] = { ANDROID_QUIRKS_INFO_START,
- ANDROID_QUIRKS_INFO_END }
-};
-
-// Shortcut defines to make succint names for field definitions
-#define TIDX(section, tag) \
- [ ANDROID_ ## section ## _ ## tag - ANDROID_ ## section ## _START ]
-
-#define TIIDX(section, tag) \
- [ ANDROID_ ## section ## _ ## tag - ANDROID_ ## section ## _INFO_START ]
-
-tag_info_t android_request[ANDROID_REQUEST_END -
- ANDROID_REQUEST_START] = {
- TIDX(REQUEST, ID) =
- { "id", TYPE_INT32 },
- TIDX(REQUEST, TYPE) =
- { "type", TYPE_BYTE },
- TIDX(REQUEST, METADATA_MODE) =
- { "metadataMode", TYPE_BYTE },
- TIDX(REQUEST, OUTPUT_STREAMS) =
- { "outputStreams", TYPE_BYTE },
- TIDX(REQUEST, INPUT_STREAMS) =
- { "inputStreams", TYPE_BYTE },
- TIDX(REQUEST, FRAME_COUNT) =
- { "frameCount", TYPE_INT32 }
+ [ANDROID_COLOR_CORRECTION] = { ANDROID_COLOR_CORRECTION_START,
+ ANDROID_COLOR_CORRECTION_END },
+ [ANDROID_CONTROL] = { ANDROID_CONTROL_START,
+ ANDROID_CONTROL_END },
+ [ANDROID_DEMOSAIC] = { ANDROID_DEMOSAIC_START,
+ ANDROID_DEMOSAIC_END },
+ [ANDROID_EDGE] = { ANDROID_EDGE_START,
+ ANDROID_EDGE_END },
+ [ANDROID_FLASH] = { ANDROID_FLASH_START,
+ ANDROID_FLASH_END },
+ [ANDROID_FLASH_INFO] = { ANDROID_FLASH_INFO_START,
+ ANDROID_FLASH_INFO_END },
+ [ANDROID_GEOMETRIC] = { ANDROID_GEOMETRIC_START,
+ ANDROID_GEOMETRIC_END },
+ [ANDROID_HOT_PIXEL] = { ANDROID_HOT_PIXEL_START,
+ ANDROID_HOT_PIXEL_END },
+ [ANDROID_HOT_PIXEL_INFO] = { ANDROID_HOT_PIXEL_INFO_START,
+ ANDROID_HOT_PIXEL_INFO_END },
+ [ANDROID_JPEG] = { ANDROID_JPEG_START,
+ ANDROID_JPEG_END },
+ [ANDROID_LENS] = { ANDROID_LENS_START,
+ ANDROID_LENS_END },
+ [ANDROID_LENS_INFO] = { ANDROID_LENS_INFO_START,
+ ANDROID_LENS_INFO_END },
+ [ANDROID_NOISE_REDUCTION] = { ANDROID_NOISE_REDUCTION_START,
+ ANDROID_NOISE_REDUCTION_END },
+ [ANDROID_QUIRKS] = { ANDROID_QUIRKS_START,
+ ANDROID_QUIRKS_END },
+ [ANDROID_REQUEST] = { ANDROID_REQUEST_START,
+ ANDROID_REQUEST_END },
+ [ANDROID_SCALER] = { ANDROID_SCALER_START,
+ ANDROID_SCALER_END },
+ [ANDROID_SENSOR] = { ANDROID_SENSOR_START,
+ ANDROID_SENSOR_END },
+ [ANDROID_SENSOR_INFO] = { ANDROID_SENSOR_INFO_START,
+ ANDROID_SENSOR_INFO_END },
+ [ANDROID_SHADING] = { ANDROID_SHADING_START,
+ ANDROID_SHADING_END },
+ [ANDROID_STATISTICS] = { ANDROID_STATISTICS_START,
+ ANDROID_STATISTICS_END },
+ [ANDROID_STATISTICS_INFO] = { ANDROID_STATISTICS_INFO_START,
+ ANDROID_STATISTICS_INFO_END },
+ [ANDROID_TONEMAP] = { ANDROID_TONEMAP_START,
+ ANDROID_TONEMAP_END },
+ [ANDROID_LED] = { ANDROID_LED_START,
+ ANDROID_LED_END },
+ [ANDROID_INFO] = { ANDROID_INFO_START,
+ ANDROID_INFO_END },
};
-tag_info_t android_lens[ANDROID_LENS_END -
- ANDROID_LENS_START] = {
- TIDX(LENS, FOCUS_DISTANCE) =
- { "focusDistance", TYPE_FLOAT },
- TIDX(LENS, APERTURE) =
- { "aperture", TYPE_FLOAT },
- TIDX(LENS, FOCAL_LENGTH) =
- { "focalLength", TYPE_FLOAT },
- TIDX(LENS, FILTER_DENSITY) =
- { "filterDensity", TYPE_FLOAT },
- TIDX(LENS, OPTICAL_STABILIZATION_MODE) =
- { "opticalStabilizationMode", TYPE_BYTE },
- TIDX(LENS, FOCUS_RANGE) =
- { "focusRange", TYPE_FLOAT }
+static tag_info_t android_color_correction[ANDROID_COLOR_CORRECTION_END -
+ ANDROID_COLOR_CORRECTION_START] = {
+ [ ANDROID_COLOR_CORRECTION_MODE - ANDROID_COLOR_CORRECTION_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_COLOR_CORRECTION_TRANSFORM - ANDROID_COLOR_CORRECTION_START ] =
+ { "transform", TYPE_FLOAT },
};
-tag_info_t android_lens_info[ANDROID_LENS_INFO_END -
- ANDROID_LENS_INFO_START] = {
- TIIDX(LENS, MINIMUM_FOCUS_DISTANCE) =
- { "minimumFocusDistance", TYPE_FLOAT },
- TIIDX(LENS, HYPERFOCAL_DISTANCE) =
- { "hyperfocalDistance", TYPE_FLOAT },
- TIIDX(LENS, AVAILABLE_FOCAL_LENGTHS) =
- { "availableFocalLengths", TYPE_FLOAT },
- TIIDX(LENS, AVAILABLE_APERTURES) =
- { "availableApertures", TYPE_FLOAT },
- TIIDX(LENS, AVAILABLE_FILTER_DENSITY) =
- { "availableFilterDensities", TYPE_FLOAT },
- TIIDX(LENS, AVAILABLE_OPTICAL_STABILIZATION) =
- { "availableOpticalStabilizationModes", TYPE_BYTE },
- TIIDX(LENS, SHADING_MAP_SIZE) =
- { "shadingMapSize", TYPE_INT32 },
- TIIDX(LENS, SHADING_MAP) =
- { "shadingMap", TYPE_FLOAT },
- TIIDX(LENS, GEOMETRIC_CORRECTION_MAP_SIZE) =
- { "geometricCorrectionMapSize", TYPE_INT32 },
- TIIDX(LENS, GEOMETRIC_CORRECTION_MAP) =
- { "geometricCorrectionMap", TYPE_FLOAT },
- TIIDX(LENS, FACING) =
- { "facing", TYPE_BYTE },
- TIIDX(LENS, POSITION) =
- { "position", TYPE_FLOAT }
+static tag_info_t android_control[ANDROID_CONTROL_END -
+ ANDROID_CONTROL_START] = {
+ [ ANDROID_CONTROL_AE_ANTIBANDING_MODE - ANDROID_CONTROL_START ] =
+ { "aeAntibandingMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION - ANDROID_CONTROL_START ] =
+ { "aeExposureCompensation", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_LOCK - ANDROID_CONTROL_START ] =
+ { "aeLock", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_MODE - ANDROID_CONTROL_START ] =
+ { "aeMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_REGIONS - ANDROID_CONTROL_START ] =
+ { "aeRegions", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_TARGET_FPS_RANGE - ANDROID_CONTROL_START ] =
+ { "aeTargetFpsRange", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER - ANDROID_CONTROL_START ] =
+ { "aePrecaptureTrigger", TYPE_BYTE },
+ [ ANDROID_CONTROL_AF_MODE - ANDROID_CONTROL_START ] =
+ { "afMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_AF_REGIONS - ANDROID_CONTROL_START ] =
+ { "afRegions", TYPE_INT32 },
+ [ ANDROID_CONTROL_AF_TRIGGER - ANDROID_CONTROL_START ] =
+ { "afTrigger", TYPE_BYTE },
+ [ ANDROID_CONTROL_AWB_LOCK - ANDROID_CONTROL_START ] =
+ { "awbLock", TYPE_BYTE },
+ [ ANDROID_CONTROL_AWB_MODE - ANDROID_CONTROL_START ] =
+ { "awbMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_AWB_REGIONS - ANDROID_CONTROL_START ] =
+ { "awbRegions", TYPE_INT32 },
+ [ ANDROID_CONTROL_CAPTURE_INTENT - ANDROID_CONTROL_START ] =
+ { "captureIntent", TYPE_BYTE },
+ [ ANDROID_CONTROL_EFFECT_MODE - ANDROID_CONTROL_START ] =
+ { "effectMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_MODE - ANDROID_CONTROL_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_CONTROL_SCENE_MODE - ANDROID_CONTROL_START ] =
+ { "sceneMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE - ANDROID_CONTROL_START ] =
+ { "videoStabilizationMode", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES - ANDROID_CONTROL_START ] =
+ { "aeAvailableAntibandingModes", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
+ { "aeAvailableModes", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES - ANDROID_CONTROL_START ] =
+ { "aeAvailableTargetFpsRanges", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_COMPENSATION_RANGE - ANDROID_CONTROL_START ] =
+ { "aeCompensationRange", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_COMPENSATION_STEP - ANDROID_CONTROL_START ] =
+ { "aeCompensationStep", TYPE_RATIONAL
+ },
+ [ ANDROID_CONTROL_AF_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
+ { "afAvailableModes", TYPE_BYTE },
+ [ ANDROID_CONTROL_AVAILABLE_EFFECTS - ANDROID_CONTROL_START ] =
+ { "availableEffects", TYPE_BYTE },
+ [ ANDROID_CONTROL_AVAILABLE_SCENE_MODES - ANDROID_CONTROL_START ] =
+ { "availableSceneModes", TYPE_BYTE },
+ [ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES - ANDROID_CONTROL_START ] =
+ { "availableVideoStabilizationModes",
+ TYPE_BYTE },
+ [ ANDROID_CONTROL_AWB_AVAILABLE_MODES - ANDROID_CONTROL_START ] =
+ { "awbAvailableModes", TYPE_BYTE },
+ [ ANDROID_CONTROL_MAX_REGIONS - ANDROID_CONTROL_START ] =
+ { "maxRegions", TYPE_INT32 },
+ [ ANDROID_CONTROL_SCENE_MODE_OVERRIDES - ANDROID_CONTROL_START ] =
+ { "sceneModeOverrides", TYPE_BYTE },
+ [ ANDROID_CONTROL_AE_PRECAPTURE_ID - ANDROID_CONTROL_START ] =
+ { "aePrecaptureId", TYPE_INT32 },
+ [ ANDROID_CONTROL_AE_STATE - ANDROID_CONTROL_START ] =
+ { "aeState", TYPE_BYTE },
+ [ ANDROID_CONTROL_AF_STATE - ANDROID_CONTROL_START ] =
+ { "afState", TYPE_BYTE },
+ [ ANDROID_CONTROL_AF_TRIGGER_ID - ANDROID_CONTROL_START ] =
+ { "afTriggerId", TYPE_INT32 },
+ [ ANDROID_CONTROL_AWB_STATE - ANDROID_CONTROL_START ] =
+ { "awbState", TYPE_BYTE },
};
-tag_info_t android_sensor[ANDROID_SENSOR_END -
- ANDROID_SENSOR_START] = {
- TIDX(SENSOR, EXPOSURE_TIME) =
- { "exposureTime", TYPE_INT64 },
- TIDX(SENSOR, FRAME_DURATION) =
- { "frameDuration", TYPE_INT64 },
- TIDX(SENSOR, SENSITIVITY) =
- { "sensitivity", TYPE_INT32 },
- TIDX(SENSOR, TIMESTAMP) =
- { "timestamp", TYPE_INT64 }
+static tag_info_t android_demosaic[ANDROID_DEMOSAIC_END -
+ ANDROID_DEMOSAIC_START] = {
+ [ ANDROID_DEMOSAIC_MODE - ANDROID_DEMOSAIC_START ] =
+ { "mode", TYPE_BYTE },
};
-tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
- ANDROID_SENSOR_INFO_START] = {
- TIIDX(SENSOR, EXPOSURE_TIME_RANGE) =
- { "exposureTimeRange", TYPE_INT64 },
- TIIDX(SENSOR, MAX_FRAME_DURATION) =
- { "maxFrameDuration", TYPE_INT64 },
- TIIDX(SENSOR, AVAILABLE_SENSITIVITIES) =
- { "availableSensitivities", TYPE_INT32 },
- TIIDX(SENSOR, COLOR_FILTER_ARRANGEMENT) =
- { "colorFilterArrangement", TYPE_BYTE },
- TIIDX(SENSOR, PHYSICAL_SIZE) =
- { "physicalSize", TYPE_FLOAT },
- TIIDX(SENSOR, PIXEL_ARRAY_SIZE) =
- { "pixelArraySize", TYPE_INT32 },
- TIIDX(SENSOR, ACTIVE_ARRAY_SIZE) =
- { "activeArraySize", TYPE_INT32 },
- TIIDX(SENSOR, WHITE_LEVEL) =
- { "whiteLevel", TYPE_INT32 },
- TIIDX(SENSOR, BLACK_LEVEL_PATTERN) =
- { "blackLevelPattern", TYPE_INT32 },
- TIIDX(SENSOR, COLOR_TRANSFORM_1) =
- { "colorTransform1", TYPE_RATIONAL },
- TIIDX(SENSOR, COLOR_TRANSFORM_2) =
- { "colorTransform2", TYPE_RATIONAL },
- TIIDX(SENSOR, REFERENCE_ILLUMINANT_1) =
- { "referenceIlluminant1", TYPE_BYTE },
- TIIDX(SENSOR, REFERENCE_ILLUMINANT_2) =
- { "referenceIlluminant2", TYPE_BYTE },
- TIIDX(SENSOR, FORWARD_MATRIX_1) =
- { "forwardMatrix1", TYPE_RATIONAL },
- TIIDX(SENSOR, FORWARD_MATRIX_2) =
- { "forwardMatrix2", TYPE_RATIONAL },
- TIIDX(SENSOR, CALIBRATION_TRANSFORM_1) =
- { "calibrationTransform1", TYPE_RATIONAL },
- TIIDX(SENSOR, CALIBRATION_TRANSFORM_2) =
- { "calibrationTransform2", TYPE_RATIONAL },
- TIIDX(SENSOR, BASE_GAIN_FACTOR) =
- { "baseGainFactor", TYPE_RATIONAL },
- TIIDX(SENSOR, MAX_ANALOG_SENSITIVITY) =
- { "maxAnalogSensitivity", TYPE_INT32 },
- TIIDX(SENSOR, NOISE_MODEL_COEFFICIENTS) =
- { "noiseModelCoefficients", TYPE_FLOAT },
- TIIDX(SENSOR, ORIENTATION) =
- { "orientation", TYPE_INT32 }
+static tag_info_t android_edge[ANDROID_EDGE_END -
+ ANDROID_EDGE_START] = {
+ [ ANDROID_EDGE_MODE - ANDROID_EDGE_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_EDGE_STRENGTH - ANDROID_EDGE_START ] =
+ { "strength", TYPE_BYTE },
};
-tag_info_t android_flash[ANDROID_FLASH_END -
+static tag_info_t android_flash[ANDROID_FLASH_END -
ANDROID_FLASH_START] = {
- TIDX(FLASH, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(FLASH, FIRING_POWER) =
- { "firingPower", TYPE_BYTE },
- TIDX(FLASH, FIRING_TIME) =
- { "firingTime", TYPE_INT64 }
+ [ ANDROID_FLASH_FIRING_POWER - ANDROID_FLASH_START ] =
+ { "firingPower", TYPE_BYTE },
+ [ ANDROID_FLASH_FIRING_TIME - ANDROID_FLASH_START ] =
+ { "firingTime", TYPE_INT64 },
+ [ ANDROID_FLASH_MODE - ANDROID_FLASH_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_FLASH_COLOR_TEMPERATURE - ANDROID_FLASH_START ] =
+ { "colorTemperature", TYPE_BYTE },
+ [ ANDROID_FLASH_MAX_ENERGY - ANDROID_FLASH_START ] =
+ { "maxEnergy", TYPE_BYTE },
+ [ ANDROID_FLASH_STATE - ANDROID_FLASH_START ] =
+ { "state", TYPE_BYTE },
};
-tag_info_t android_flash_info[ANDROID_FLASH_INFO_END -
+static tag_info_t android_flash_info[ANDROID_FLASH_INFO_END -
ANDROID_FLASH_INFO_START] = {
- TIIDX(FLASH, AVAILABLE) =
- { "available", TYPE_BYTE },
- TIIDX(FLASH, CHARGE_DURATION) =
- { "chargeDuration", TYPE_INT64 },
+ [ ANDROID_FLASH_INFO_AVAILABLE - ANDROID_FLASH_INFO_START ] =
+ { "available", TYPE_BYTE },
+ [ ANDROID_FLASH_INFO_CHARGE_DURATION - ANDROID_FLASH_INFO_START ] =
+ { "chargeDuration", TYPE_INT64 },
};
-tag_info_t android_hot_pixel[ANDROID_HOT_PIXEL_END -
- ANDROID_HOT_PIXEL_START] = {
- TIDX(HOT_PIXEL, MODE) =
- { "mode", TYPE_BYTE }
+static tag_info_t android_geometric[ANDROID_GEOMETRIC_END -
+ ANDROID_GEOMETRIC_START] = {
+ [ ANDROID_GEOMETRIC_MODE - ANDROID_GEOMETRIC_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_GEOMETRIC_STRENGTH - ANDROID_GEOMETRIC_START ] =
+ { "strength", TYPE_BYTE },
};
-tag_info_t android_hot_pixel_info[ANDROID_HOT_PIXEL_INFO_END -
- ANDROID_HOT_PIXEL_INFO_START];
-
-tag_info_t android_demosaic[ANDROID_DEMOSAIC_END -
- ANDROID_DEMOSAIC_START] = {
- TIDX(DEMOSAIC, MODE) =
- { "mode", TYPE_BYTE }
+static tag_info_t android_hot_pixel[ANDROID_HOT_PIXEL_END -
+ ANDROID_HOT_PIXEL_START] = {
+ [ ANDROID_HOT_PIXEL_MODE - ANDROID_HOT_PIXEL_START ] =
+ { "mode", TYPE_BYTE },
};
-tag_info_t android_demosaic_info[ANDROID_DEMOSAIC_INFO_END -
- ANDROID_DEMOSAIC_INFO_START];
-
-tag_info_t android_noise[ANDROID_NOISE_END -
- ANDROID_NOISE_START] = {
- TIDX(NOISE, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(NOISE, STRENGTH) =
- { "strength", TYPE_BYTE }
+static tag_info_t android_hot_pixel_info[ANDROID_HOT_PIXEL_INFO_END -
+ ANDROID_HOT_PIXEL_INFO_START] = {
+ [ ANDROID_HOT_PIXEL_INFO_MAP - ANDROID_HOT_PIXEL_INFO_START ] =
+ { "map", TYPE_INT32 },
};
-tag_info_t android_noise_info[ANDROID_NOISE_INFO_END -
- ANDROID_NOISE_INFO_START];
-
-tag_info_t android_shading[ANDROID_SHADING_END -
- ANDROID_SHADING_START] = {
- TIDX(SHADING, MODE) =
- { "mode", TYPE_BYTE }
+static tag_info_t android_jpeg[ANDROID_JPEG_END -
+ ANDROID_JPEG_START] = {
+ [ ANDROID_JPEG_GPS_COORDINATES - ANDROID_JPEG_START ] =
+ { "gpsCoordinates", TYPE_DOUBLE },
+ [ ANDROID_JPEG_GPS_PROCESSING_METHOD - ANDROID_JPEG_START ] =
+ { "gpsProcessingMethod", TYPE_BYTE },
+ [ ANDROID_JPEG_GPS_TIMESTAMP - ANDROID_JPEG_START ] =
+ { "gpsTimestamp", TYPE_INT64 },
+ [ ANDROID_JPEG_ORIENTATION - ANDROID_JPEG_START ] =
+ { "orientation", TYPE_INT32 },
+ [ ANDROID_JPEG_QUALITY - ANDROID_JPEG_START ] =
+ { "quality", TYPE_BYTE },
+ [ ANDROID_JPEG_THUMBNAIL_QUALITY - ANDROID_JPEG_START ] =
+ { "thumbnailQuality", TYPE_BYTE },
+ [ ANDROID_JPEG_THUMBNAIL_SIZE - ANDROID_JPEG_START ] =
+ { "thumbnailSize", TYPE_INT32 },
+ [ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES - ANDROID_JPEG_START ] =
+ { "availableThumbnailSizes", TYPE_INT32 },
+ [ ANDROID_JPEG_MAX_SIZE - ANDROID_JPEG_START ] =
+ { "maxSize", TYPE_INT32 },
+ [ ANDROID_JPEG_SIZE - ANDROID_JPEG_START ] =
+ { "size", TYPE_INT32 },
};
-tag_info_t android_shading_info[ANDROID_SHADING_INFO_END -
- ANDROID_SHADING_INFO_START];
-
-tag_info_t android_geometric[ANDROID_GEOMETRIC_END -
- ANDROID_GEOMETRIC_START] = {
- TIDX(GEOMETRIC, MODE) =
- { "mode", TYPE_BYTE }
+static tag_info_t android_lens[ANDROID_LENS_END -
+ ANDROID_LENS_START] = {
+ [ ANDROID_LENS_APERTURE - ANDROID_LENS_START ] =
+ { "aperture", TYPE_FLOAT },
+ [ ANDROID_LENS_FILTER_DENSITY - ANDROID_LENS_START ] =
+ { "filterDensity", TYPE_FLOAT },
+ [ ANDROID_LENS_FOCAL_LENGTH - ANDROID_LENS_START ] =
+ { "focalLength", TYPE_FLOAT },
+ [ ANDROID_LENS_FOCUS_DISTANCE - ANDROID_LENS_START ] =
+ { "focusDistance", TYPE_FLOAT },
+ [ ANDROID_LENS_OPTICAL_STABILIZATION_MODE - ANDROID_LENS_START ] =
+ { "opticalStabilizationMode", TYPE_BYTE },
+ [ ANDROID_LENS_FACING - ANDROID_LENS_START ] =
+ { "facing", TYPE_BYTE },
+ [ ANDROID_LENS_OPTICAL_AXIS_ANGLE - ANDROID_LENS_START ] =
+ { "opticalAxisAngle", TYPE_FLOAT },
+ [ ANDROID_LENS_POSITION - ANDROID_LENS_START ] =
+ { "position", TYPE_FLOAT },
+ [ ANDROID_LENS_FOCUS_RANGE - ANDROID_LENS_START ] =
+ { "focusRange", TYPE_FLOAT },
+ [ ANDROID_LENS_STATE - ANDROID_LENS_START ] =
+ { "state", TYPE_BYTE },
};
-tag_info_t android_geometric_info[ANDROID_GEOMETRIC_INFO_END -
- ANDROID_GEOMETRIC_INFO_START];
-
-tag_info_t android_color[ANDROID_COLOR_END -
- ANDROID_COLOR_START] = {
- TIDX(COLOR, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(COLOR, TRANSFORM) =
- { "transform", TYPE_FLOAT }
+static tag_info_t android_lens_info[ANDROID_LENS_INFO_END -
+ ANDROID_LENS_INFO_START] = {
+ [ ANDROID_LENS_INFO_AVAILABLE_APERTURES - ANDROID_LENS_INFO_START ] =
+ { "availableApertures", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES - ANDROID_LENS_INFO_START ] =
+ { "availableFilterDensities", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS - ANDROID_LENS_INFO_START ] =
+ { "availableFocalLengths", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION - ANDROID_LENS_INFO_START ] =
+ { "availableOpticalStabilization", TYPE_BYTE },
+ [ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP - ANDROID_LENS_INFO_START ] =
+ { "geometricCorrectionMap", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE - ANDROID_LENS_INFO_START ] =
+ { "geometricCorrectionMapSize", TYPE_INT32 },
+ [ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE - ANDROID_LENS_INFO_START ] =
+ { "hyperfocalDistance", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE - ANDROID_LENS_INFO_START ] =
+ { "minimumFocusDistance", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_SHADING_MAP - ANDROID_LENS_INFO_START ] =
+ { "shadingMap", TYPE_FLOAT },
+ [ ANDROID_LENS_INFO_SHADING_MAP_SIZE - ANDROID_LENS_INFO_START ] =
+ { "shadingMapSize", TYPE_INT32 },
};
-tag_info_t android_color_info[ANDROID_COLOR_INFO_END -
- ANDROID_COLOR_INFO_START];
-
-tag_info_t android_tonemap[ANDROID_TONEMAP_END -
- ANDROID_TONEMAP_START] = {
- TIDX(TONEMAP, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(TONEMAP, CURVE_RED) =
- { "curveRed", TYPE_FLOAT },
- TIDX(TONEMAP, CURVE_GREEN) =
- { "curveGreen", TYPE_FLOAT },
- TIDX(TONEMAP, CURVE_BLUE) =
- { "curveBlue", TYPE_FLOAT }
+static tag_info_t android_noise_reduction[ANDROID_NOISE_REDUCTION_END -
+ ANDROID_NOISE_REDUCTION_START] = {
+ [ ANDROID_NOISE_REDUCTION_MODE - ANDROID_NOISE_REDUCTION_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_NOISE_REDUCTION_STRENGTH - ANDROID_NOISE_REDUCTION_START ] =
+ { "strength", TYPE_BYTE },
};
-tag_info_t android_tonemap_info[ANDROID_TONEMAP_INFO_END -
- ANDROID_TONEMAP_INFO_START] = {
- TIIDX(TONEMAP, MAX_CURVE_POINTS) =
- { "maxCurvePoints", TYPE_INT32 }
+static tag_info_t android_quirks[ANDROID_QUIRKS_END -
+ ANDROID_QUIRKS_START] = {
+ [ ANDROID_QUIRKS_METERING_CROP_REGION - ANDROID_QUIRKS_START ] =
+ { "meteringCropRegion", TYPE_BYTE },
+ [ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO - ANDROID_QUIRKS_START ] =
+ { "triggerAfWithAuto", TYPE_BYTE },
+ [ ANDROID_QUIRKS_USE_ZSL_FORMAT - ANDROID_QUIRKS_START ] =
+ { "useZslFormat", TYPE_BYTE },
};
-tag_info_t android_edge[ANDROID_EDGE_END -
- ANDROID_EDGE_START] = {
- TIDX(EDGE, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(EDGE, STRENGTH) =
- { "strength", TYPE_BYTE }
+static tag_info_t android_request[ANDROID_REQUEST_END -
+ ANDROID_REQUEST_START] = {
+ [ ANDROID_REQUEST_FRAME_COUNT - ANDROID_REQUEST_START ] =
+ { "frameCount", TYPE_INT32 },
+ [ ANDROID_REQUEST_ID - ANDROID_REQUEST_START ] =
+ { "id", TYPE_INT32 },
+ [ ANDROID_REQUEST_INPUT_STREAMS - ANDROID_REQUEST_START ] =
+ { "inputStreams", TYPE_BYTE },
+ [ ANDROID_REQUEST_METADATA_MODE - ANDROID_REQUEST_START ] =
+ { "metadataMode", TYPE_BYTE },
+ [ ANDROID_REQUEST_OUTPUT_STREAMS - ANDROID_REQUEST_START ] =
+ { "outputStreams", TYPE_BYTE },
+ [ ANDROID_REQUEST_TYPE - ANDROID_REQUEST_START ] =
+ { "type", TYPE_BYTE },
+ [ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS - ANDROID_REQUEST_START ] =
+ { "maxNumOutputStreams", TYPE_INT32 },
+ [ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS - ANDROID_REQUEST_START ] =
+ { "maxNumReprocessStreams", TYPE_INT32 },
};
-tag_info_t android_edge_info[ANDROID_EDGE_INFO_END -
- ANDROID_EDGE_INFO_START];
-
-tag_info_t android_scaler[ANDROID_SCALER_END -
+static tag_info_t android_scaler[ANDROID_SCALER_END -
ANDROID_SCALER_START] = {
- TIDX(SCALER, CROP_REGION) =
- { "cropRegion", TYPE_INT32 }
+ [ ANDROID_SCALER_CROP_REGION - ANDROID_SCALER_START ] =
+ { "cropRegion", TYPE_INT32 },
+ [ ANDROID_SCALER_AVAILABLE_FORMATS - ANDROID_SCALER_START ] =
+ { "availableFormats", TYPE_INT32 },
+ [ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS - ANDROID_SCALER_START ] =
+ { "availableJpegMinDurations", TYPE_INT64 },
+ [ ANDROID_SCALER_AVAILABLE_JPEG_SIZES - ANDROID_SCALER_START ] =
+ { "availableJpegSizes", TYPE_INT32 },
+ [ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM - ANDROID_SCALER_START ] =
+ { "availableMaxDigitalZoom", TYPE_FLOAT },
+ [ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS - ANDROID_SCALER_START ] =
+ { "availableProcessedMinDurations",
+ TYPE_INT64 },
+ [ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES - ANDROID_SCALER_START ] =
+ { "availableProcessedSizes", TYPE_INT32 },
+ [ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS - ANDROID_SCALER_START ] =
+ { "availableRawMinDurations", TYPE_INT64 },
+ [ ANDROID_SCALER_AVAILABLE_RAW_SIZES - ANDROID_SCALER_START ] =
+ { "availableRawSizes", TYPE_INT32 },
};
-tag_info_t android_scaler_info[ANDROID_SCALER_INFO_END -
- ANDROID_SCALER_INFO_START] = {
- TIIDX(SCALER, AVAILABLE_FORMATS) =
- { "availableFormats", TYPE_INT32 },
- TIIDX(SCALER, AVAILABLE_RAW_SIZES) =
- { "availableRawSizes", TYPE_INT32 },
- TIIDX(SCALER, AVAILABLE_RAW_MIN_DURATIONS) =
- { "availableRawMinDurations", TYPE_INT64 },
- TIIDX(SCALER, AVAILABLE_PROCESSED_SIZES) =
- { "availableProcessedSizes", TYPE_INT32 },
- TIIDX(SCALER, AVAILABLE_PROCESSED_MIN_DURATIONS) =
- { "availableProcessedMinDurations", TYPE_INT64 },
- TIIDX(SCALER, AVAILABLE_JPEG_SIZES) =
- { "availableJpegSizes", TYPE_INT32 },
- TIIDX(SCALER, AVAILABLE_JPEG_MIN_DURATIONS) =
- { "availableJpegMinDurations", TYPE_INT64 },
- TIIDX(SCALER, AVAILABLE_MAX_ZOOM) =
- { "availableMaxDigitalZoom", TYPE_INT32 }
+static tag_info_t android_sensor[ANDROID_SENSOR_END -
+ ANDROID_SENSOR_START] = {
+ [ ANDROID_SENSOR_EXPOSURE_TIME - ANDROID_SENSOR_START ] =
+ { "exposureTime", TYPE_INT64 },
+ [ ANDROID_SENSOR_FRAME_DURATION - ANDROID_SENSOR_START ] =
+ { "frameDuration", TYPE_INT64 },
+ [ ANDROID_SENSOR_SENSITIVITY - ANDROID_SENSOR_START ] =
+ { "sensitivity", TYPE_INT32 },
+ [ ANDROID_SENSOR_BASE_GAIN_FACTOR - ANDROID_SENSOR_START ] =
+ { "baseGainFactor", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_BLACK_LEVEL_PATTERN - ANDROID_SENSOR_START ] =
+ { "blackLevelPattern", TYPE_INT32 },
+ [ ANDROID_SENSOR_CALIBRATION_TRANSFORM1 - ANDROID_SENSOR_START ] =
+ { "calibrationTransform1", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_CALIBRATION_TRANSFORM2 - ANDROID_SENSOR_START ] =
+ { "calibrationTransform2", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_COLOR_TRANSFORM1 - ANDROID_SENSOR_START ] =
+ { "colorTransform1", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_COLOR_TRANSFORM2 - ANDROID_SENSOR_START ] =
+ { "colorTransform2", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_FORWARD_MATRIX1 - ANDROID_SENSOR_START ] =
+ { "forwardMatrix1", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_FORWARD_MATRIX2 - ANDROID_SENSOR_START ] =
+ { "forwardMatrix2", TYPE_RATIONAL
+ },
+ [ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY - ANDROID_SENSOR_START ] =
+ { "maxAnalogSensitivity", TYPE_INT32 },
+ [ ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS - ANDROID_SENSOR_START ] =
+ { "noiseModelCoefficients", TYPE_FLOAT },
+ [ ANDROID_SENSOR_ORIENTATION - ANDROID_SENSOR_START ] =
+ { "orientation", TYPE_INT32 },
+ [ ANDROID_SENSOR_REFERENCE_ILLUMINANT1 - ANDROID_SENSOR_START ] =
+ { "referenceIlluminant1", TYPE_BYTE },
+ [ ANDROID_SENSOR_REFERENCE_ILLUMINANT2 - ANDROID_SENSOR_START ] =
+ { "referenceIlluminant2", TYPE_BYTE },
+ [ ANDROID_SENSOR_TIMESTAMP - ANDROID_SENSOR_START ] =
+ { "timestamp", TYPE_INT64 },
};
-tag_info_t android_jpeg[ANDROID_JPEG_END -
- ANDROID_JPEG_START] = {
- TIDX(JPEG, QUALITY) =
- { "quality", TYPE_INT32 },
- TIDX(JPEG, THUMBNAIL_SIZE) =
- { "thumbnailSize", TYPE_INT32 },
- TIDX(JPEG, THUMBNAIL_QUALITY) =
- { "thumbnailQuality", TYPE_INT32 },
- TIDX(JPEG, GPS_COORDINATES) =
- { "gpsCoordinates", TYPE_DOUBLE },
- TIDX(JPEG, GPS_PROCESSING_METHOD) =
- { "gpsProcessingMethod", TYPE_BYTE },
- TIDX(JPEG, GPS_TIMESTAMP) =
- { "gpsTimestamp", TYPE_INT64 },
- TIDX(JPEG, ORIENTATION) =
- { "orientation", TYPE_INT32 },
- TIDX(JPEG, SIZE) =
- { "size", TYPE_INT32 }
+static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
+ ANDROID_SENSOR_INFO_START] = {
+ [ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
+ { "activeArraySize", TYPE_INT32 },
+ [ ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES - ANDROID_SENSOR_INFO_START ] =
+ { "availableSensitivities", TYPE_INT32 },
+ [ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT - ANDROID_SENSOR_INFO_START ] =
+ { "colorFilterArrangement", TYPE_BYTE },
+ [ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE - ANDROID_SENSOR_INFO_START ] =
+ { "exposureTimeRange", TYPE_INT64 },
+ [ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION - ANDROID_SENSOR_INFO_START ] =
+ { "maxFrameDuration", TYPE_INT64 },
+ [ ANDROID_SENSOR_INFO_PHYSICAL_SIZE - ANDROID_SENSOR_INFO_START ] =
+ { "physicalSize", TYPE_FLOAT },
+ [ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
+ { "pixelArraySize", TYPE_INT32 },
+ [ ANDROID_SENSOR_INFO_WHITE_LEVEL - ANDROID_SENSOR_INFO_START ] =
+ { "whiteLevel", TYPE_INT32 },
};
-tag_info_t android_jpeg_info[ANDROID_JPEG_INFO_END -
- ANDROID_JPEG_INFO_START] = {
- TIIDX(JPEG, AVAILABLE_THUMBNAIL_SIZES) =
- { "availableThumbnailSizes", TYPE_INT32 },
- TIIDX(JPEG, MAX_SIZE) =
- { "maxSize", TYPE_INT32 }
+static tag_info_t android_shading[ANDROID_SHADING_END -
+ ANDROID_SHADING_START] = {
+ [ ANDROID_SHADING_MODE - ANDROID_SHADING_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_SHADING_STRENGTH - ANDROID_SHADING_START ] =
+ { "strength", TYPE_BYTE },
};
-tag_info_t android_stats[ANDROID_STATS_END -
- ANDROID_STATS_START] = {
- TIDX(STATS, FACE_DETECT_MODE) =
- { "faceDetectMode", TYPE_BYTE },
- TIDX(STATS, FACE_RECTANGLES) =
- { "faceRectangles", TYPE_INT32 },
- TIDX(STATS, FACE_SCORES) =
- { "faceScores", TYPE_BYTE },
- TIDX(STATS, FACE_LANDMARKS) =
- { "faceLandmarks", TYPE_INT32 },
- TIDX(STATS, FACE_IDS) =
- { "faceIds", TYPE_INT32 },
- TIDX(STATS, HISTOGRAM_MODE) =
- { "histogramMode", TYPE_BYTE },
- TIDX(STATS, HISTOGRAM) =
- { "histogram", TYPE_INT32 },
- TIDX(STATS, SHARPNESS_MAP_MODE) =
- { "sharpnessMapMode", TYPE_BYTE },
- TIDX(STATS, SHARPNESS_MAP) =
- { "sharpnessMap", TYPE_INT32 }
+static tag_info_t android_statistics[ANDROID_STATISTICS_END -
+ ANDROID_STATISTICS_START] = {
+ [ ANDROID_STATISTICS_FACE_DETECT_MODE - ANDROID_STATISTICS_START ] =
+ { "faceDetectMode", TYPE_BYTE },
+ [ ANDROID_STATISTICS_HISTOGRAM_MODE - ANDROID_STATISTICS_START ] =
+ { "histogramMode", TYPE_BYTE },
+ [ ANDROID_STATISTICS_SHARPNESS_MAP_MODE - ANDROID_STATISTICS_START ] =
+ { "sharpnessMapMode", TYPE_BYTE },
+ [ ANDROID_STATISTICS_FACE_IDS - ANDROID_STATISTICS_START ] =
+ { "faceIds", TYPE_INT32 },
+ [ ANDROID_STATISTICS_FACE_LANDMARKS - ANDROID_STATISTICS_START ] =
+ { "faceLandmarks", TYPE_INT32 },
+ [ ANDROID_STATISTICS_FACE_RECTANGLES - ANDROID_STATISTICS_START ] =
+ { "faceRectangles", TYPE_INT32 },
+ [ ANDROID_STATISTICS_FACE_SCORES - ANDROID_STATISTICS_START ] =
+ { "faceScores", TYPE_BYTE },
+ [ ANDROID_STATISTICS_HISTOGRAM - ANDROID_STATISTICS_START ] =
+ { "histogram", TYPE_INT32 },
+ [ ANDROID_STATISTICS_SHARPNESS_MAP - ANDROID_STATISTICS_START ] =
+ { "sharpnessMap", TYPE_INT32 },
};
-tag_info_t android_stats_info[ANDROID_STATS_INFO_END -
- ANDROID_STATS_INFO_START] = {
- TIIDX(STATS, AVAILABLE_FACE_DETECT_MODES) =
- { "availableFaceDetectModes", TYPE_BYTE },
- TIIDX(STATS, MAX_FACE_COUNT) =
- { "maxFaceCount", TYPE_INT32 },
- TIIDX(STATS, HISTOGRAM_BUCKET_COUNT) =
- { "histogramBucketCount", TYPE_INT32 },
- TIIDX(STATS, MAX_HISTOGRAM_COUNT) =
- { "maxHistogramCount", TYPE_INT32 },
- TIIDX(STATS, SHARPNESS_MAP_SIZE) =
- { "sharpnessMapSize", TYPE_INT32 },
- TIIDX(STATS, MAX_SHARPNESS_MAP_VALUE) =
- { "maxSharpnessMapValue", TYPE_INT32 }
+static tag_info_t android_statistics_info[ANDROID_STATISTICS_INFO_END -
+ ANDROID_STATISTICS_INFO_START] = {
+ [ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES - ANDROID_STATISTICS_INFO_START ] =
+ { "availableFaceDetectModes", TYPE_BYTE },
+ [ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT - ANDROID_STATISTICS_INFO_START ] =
+ { "histogramBucketCount", TYPE_INT32 },
+ [ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT - ANDROID_STATISTICS_INFO_START ] =
+ { "maxFaceCount", TYPE_INT32 },
+ [ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT - ANDROID_STATISTICS_INFO_START ] =
+ { "maxHistogramCount", TYPE_INT32 },
+ [ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE - ANDROID_STATISTICS_INFO_START ] =
+ { "maxSharpnessMapValue", TYPE_INT32 },
+ [ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE - ANDROID_STATISTICS_INFO_START ] =
+ { "sharpnessMapSize", TYPE_INT32 },
};
-
-tag_info_t android_control[ANDROID_CONTROL_END -
- ANDROID_CONTROL_START] = {
- TIDX(CONTROL, CAPTURE_INTENT) =
- { "captureIntent", TYPE_BYTE },
- TIDX(CONTROL, MODE) =
- { "mode", TYPE_BYTE },
- TIDX(CONTROL, EFFECT_MODE) =
- { "effectMode", TYPE_BYTE },
- TIDX(CONTROL, SCENE_MODE) =
- { "sceneMode", TYPE_BYTE },
- TIDX(CONTROL, VIDEO_STABILIZATION_MODE) =
- { "videoStabilizationMode", TYPE_BYTE },
- TIDX(CONTROL, AE_MODE) =
- { "aeMode", TYPE_BYTE },
- TIDX(CONTROL, AE_LOCK) =
- { "aeLock", TYPE_BYTE },
- TIDX(CONTROL, AE_REGIONS) =
- { "aeRegions", TYPE_INT32 },
- TIDX(CONTROL, AE_EXP_COMPENSATION) =
- { "aeExposureCompensation", TYPE_INT32 },
- TIDX(CONTROL, AE_TARGET_FPS_RANGE) =
- { "aeTargetFpsRange", TYPE_INT32 },
- TIDX(CONTROL, AE_ANTIBANDING_MODE) =
- { "aeAntibandingMode", TYPE_BYTE },
- TIDX(CONTROL, AE_STATE) =
- { "aeState", TYPE_BYTE },
- TIDX(CONTROL, AE_PRECAPTURE_ID) =
- { "aePrecaptureId", TYPE_INT32},
- TIDX(CONTROL, AWB_MODE) =
- { "awbMode", TYPE_BYTE },
- TIDX(CONTROL, AWB_LOCK) =
- { "awbLock", TYPE_BYTE },
- TIDX(CONTROL, AWB_REGIONS) =
- { "awbRegions", TYPE_INT32 },
- TIDX(CONTROL, AWB_STATE) =
- { "awbState", TYPE_BYTE },
- TIDX(CONTROL, AF_MODE) =
- { "afMode", TYPE_BYTE },
- TIDX(CONTROL, AF_REGIONS) =
- { "afRegions", TYPE_INT32 },
- TIDX(CONTROL, AF_STATE) =
- { "afState", TYPE_BYTE },
- TIDX(CONTROL, AF_TRIGGER_ID) =
- { "afTriggerId", TYPE_INT32 }
+static tag_info_t android_tonemap[ANDROID_TONEMAP_END -
+ ANDROID_TONEMAP_START] = {
+ [ ANDROID_TONEMAP_CURVE_BLUE - ANDROID_TONEMAP_START ] =
+ { "curveBlue", TYPE_FLOAT },
+ [ ANDROID_TONEMAP_CURVE_GREEN - ANDROID_TONEMAP_START ] =
+ { "curveGreen", TYPE_FLOAT },
+ [ ANDROID_TONEMAP_CURVE_RED - ANDROID_TONEMAP_START ] =
+ { "curveRed", TYPE_FLOAT },
+ [ ANDROID_TONEMAP_MODE - ANDROID_TONEMAP_START ] =
+ { "mode", TYPE_BYTE },
+ [ ANDROID_TONEMAP_MAX_CURVE_POINTS - ANDROID_TONEMAP_START ] =
+ { "maxCurvePoints", TYPE_INT32 },
};
-tag_info_t android_control_info[ANDROID_CONTROL_INFO_END -
- ANDROID_CONTROL_INFO_START] = {
- TIIDX(CONTROL, AVAILABLE_SCENE_MODES) =
- { "availableSceneModes", TYPE_BYTE },
- TIIDX(CONTROL, AVAILABLE_EFFECTS) =
- { "availableEffects", TYPE_BYTE },
- TIIDX(CONTROL, MAX_REGIONS) =
- { "maxRegions", TYPE_INT32 },
- TIIDX(CONTROL, AE_AVAILABLE_MODES) =
- { "aeAvailableModes", TYPE_BYTE },
- TIIDX(CONTROL, AE_EXP_COMPENSATION_STEP) =
- { "aeCompensationStep", TYPE_RATIONAL },
- TIIDX(CONTROL, AE_EXP_COMPENSATION_RANGE) =
- { "aeCompensationRange", TYPE_INT32 },
- TIIDX(CONTROL, AE_AVAILABLE_TARGET_FPS_RANGES) =
- { "aeAvailableTargetFpsRanges", TYPE_INT32 },
- TIIDX(CONTROL, AE_AVAILABLE_ANTIBANDING_MODES) =
- { "aeAvailableAntibandingModes", TYPE_BYTE },
- TIIDX(CONTROL, AWB_AVAILABLE_MODES) =
- { "awbAvailableModes", TYPE_BYTE },
- TIIDX(CONTROL, AF_AVAILABLE_MODES) =
- { "afAvailableModes", TYPE_BYTE },
- TIIDX(CONTROL, AVAILABLE_VIDEO_STABILIZATION_MODES) =
- { "availableVideoStabilizationModes", TYPE_BYTE },
- TIIDX(CONTROL, SCENE_MODE_OVERRIDES) =
- { "sceneModeOverrides", TYPE_BYTE }
+static tag_info_t android_led[ANDROID_LED_END -
+ ANDROID_LED_START] = {
+ [ ANDROID_LED_TRANSMIT - ANDROID_LED_START ] =
+ { "transmit", TYPE_BYTE },
+ [ ANDROID_LED_AVAILABLE_LEDS - ANDROID_LED_START ] =
+ { "availableLeds", TYPE_BYTE },
};
-tag_info_t android_quirks_info[ANDROID_QUIRKS_INFO_END -
- ANDROID_QUIRKS_INFO_START] = {
- TIIDX(QUIRKS, TRIGGER_AF_WITH_AUTO) =
- { "triggerAfWithAuto", TYPE_BYTE },
- TIIDX(QUIRKS, USE_ZSL_FORMAT) =
- { "useZslFormat", TYPE_BYTE },
- TIIDX(QUIRKS, METERING_CROP_REGION) =
- { "meteringCropRegion", TYPE_BYTE },
+static tag_info_t android_info[ANDROID_INFO_END -
+ ANDROID_INFO_START] = {
+ [ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL - ANDROID_INFO_START ] =
+ { "supportedHardwareLevel", TYPE_BYTE },
};
-#undef TIDX
-#undef TIIDX
tag_info_t *tag_info[ANDROID_SECTION_COUNT] = {
- android_request,
- android_lens,
- android_lens_info,
- android_sensor,
- android_sensor_info,
+ android_color_correction,
+ android_control,
+ android_demosaic,
+ android_edge,
android_flash,
android_flash_info,
+ android_geometric,
android_hot_pixel,
android_hot_pixel_info,
- android_demosaic,
- android_demosaic_info,
- android_noise,
- android_noise_info,
+ android_jpeg,
+ android_lens,
+ android_lens_info,
+ android_noise_reduction,
+ android_quirks,
+ android_request,
+ android_scaler,
+ android_sensor,
+ android_sensor_info,
android_shading,
- android_shading_info,
- android_geometric,
- android_geometric_info,
- android_color,
- android_color_info,
+ android_statistics,
+ android_statistics_info,
android_tonemap,
- android_tonemap_info,
- android_edge,
- android_edge_info,
- android_scaler,
- android_scaler_info,
- android_jpeg,
- android_jpeg_info,
- android_stats,
- android_stats_info,
- android_control,
- android_control_info,
- android_quirks_info
+ android_led,
+ android_info,
};
+
+int camera_metadata_enum_snprint(uint32_t tag,
+ uint32_t value,
+ char *dst,
+ size_t size) {
+ const char *msg = "error: not an enum";
+ int ret = -1;
+
+ switch(tag) {
+ case ANDROID_COLOR_CORRECTION_MODE: {
+ switch (value) {
+ case ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX:
+ msg = "TRANSFORM_MATRIX";
+ ret = 0;
+ break;
+ case ANDROID_COLOR_CORRECTION_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_COLOR_CORRECTION_TRANSFORM: {
+ break;
+ }
+
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ:
+ msg = "50HZ";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ:
+ msg = "60HZ";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO:
+ msg = "AUTO";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_LOCK: {
+ switch (value) {
+ case ANDROID_CONTROL_AE_LOCK_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_LOCK_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AE_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_AE_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_MODE_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH:
+ msg = "ON_AUTO_FLASH";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH:
+ msg = "ON_ALWAYS_FLASH";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE:
+ msg = "ON_AUTO_FLASH_REDEYE";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AE_REGIONS: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_TARGET_FPS_RANGE: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER: {
+ switch (value) {
+ case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE:
+ msg = "IDLE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START:
+ msg = "START";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AF_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_AF_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_MODE_AUTO:
+ msg = "AUTO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_MODE_MACRO:
+ msg = "MACRO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO:
+ msg = "CONTINUOUS_VIDEO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE:
+ msg = "CONTINUOUS_PICTURE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_MODE_EDOF:
+ msg = "EDOF";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AF_REGIONS: {
+ break;
+ }
+ case ANDROID_CONTROL_AF_TRIGGER: {
+ switch (value) {
+ case ANDROID_CONTROL_AF_TRIGGER_IDLE:
+ msg = "IDLE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_TRIGGER_START:
+ msg = "START";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_TRIGGER_CANCEL:
+ msg = "CANCEL";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AWB_LOCK: {
+ switch (value) {
+ case ANDROID_CONTROL_AWB_LOCK_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_LOCK_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AWB_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_AWB_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_AUTO:
+ msg = "AUTO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_INCANDESCENT:
+ msg = "INCANDESCENT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_FLUORESCENT:
+ msg = "FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT:
+ msg = "WARM_FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_DAYLIGHT:
+ msg = "DAYLIGHT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT:
+ msg = "CLOUDY_DAYLIGHT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_TWILIGHT:
+ msg = "TWILIGHT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_MODE_SHADE:
+ msg = "SHADE";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AWB_REGIONS: {
+ break;
+ }
+ case ANDROID_CONTROL_CAPTURE_INTENT: {
+ switch (value) {
+ case ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM:
+ msg = "CUSTOM";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW:
+ msg = "PREVIEW";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE:
+ msg = "STILL_CAPTURE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD:
+ msg = "VIDEO_RECORD";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT:
+ msg = "VIDEO_SNAPSHOT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG:
+ msg = "ZERO_SHUTTER_LAG";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_EFFECT_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_EFFECT_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_MONO:
+ msg = "MONO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_NEGATIVE:
+ msg = "NEGATIVE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_SOLARIZE:
+ msg = "SOLARIZE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_SEPIA:
+ msg = "SEPIA";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_POSTERIZE:
+ msg = "POSTERIZE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD:
+ msg = "WHITEBOARD";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD:
+ msg = "BLACKBOARD";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_EFFECT_MODE_AQUA:
+ msg = "AQUA";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_MODE_AUTO:
+ msg = "AUTO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_MODE_USE_SCENE_MODE:
+ msg = "USE_SCENE_MODE";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_SCENE_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED:
+ msg = "UNSUPPORTED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY:
+ msg = "FACE_PRIORITY";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_ACTION:
+ msg = "ACTION";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_PORTRAIT:
+ msg = "PORTRAIT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_LANDSCAPE:
+ msg = "LANDSCAPE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_NIGHT:
+ msg = "NIGHT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT:
+ msg = "NIGHT_PORTRAIT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_THEATRE:
+ msg = "THEATRE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_BEACH:
+ msg = "BEACH";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_SNOW:
+ msg = "SNOW";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_SUNSET:
+ msg = "SUNSET";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO:
+ msg = "STEADYPHOTO";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_FIREWORKS:
+ msg = "FIREWORKS";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_SPORTS:
+ msg = "SPORTS";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_PARTY:
+ msg = "PARTY";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT:
+ msg = "CANDLELIGHT";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_SCENE_MODE_BARCODE:
+ msg = "BARCODE";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE: {
+ switch (value) {
+ case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_AVAILABLE_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_COMPENSATION_RANGE: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_COMPENSATION_STEP: {
+ break;
+ }
+ case ANDROID_CONTROL_AF_AVAILABLE_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_AVAILABLE_EFFECTS: {
+ break;
+ }
+ case ANDROID_CONTROL_AVAILABLE_SCENE_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_AWB_AVAILABLE_MODES: {
+ break;
+ }
+ case ANDROID_CONTROL_MAX_REGIONS: {
+ break;
+ }
+ case ANDROID_CONTROL_SCENE_MODE_OVERRIDES: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_PRECAPTURE_ID: {
+ break;
+ }
+ case ANDROID_CONTROL_AE_STATE: {
+ switch (value) {
+ case ANDROID_CONTROL_AE_STATE_INACTIVE:
+ msg = "INACTIVE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_STATE_SEARCHING:
+ msg = "SEARCHING";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_STATE_CONVERGED:
+ msg = "CONVERGED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_STATE_LOCKED:
+ msg = "LOCKED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED:
+ msg = "FLASH_REQUIRED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AE_STATE_PRECAPTURE:
+ msg = "PRECAPTURE";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AF_STATE: {
+ switch (value) {
+ case ANDROID_CONTROL_AF_STATE_INACTIVE:
+ msg = "INACTIVE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN:
+ msg = "PASSIVE_SCAN";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED:
+ msg = "PASSIVE_FOCUSED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN:
+ msg = "ACTIVE_SCAN";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED:
+ msg = "FOCUSED_LOCKED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED:
+ msg = "NOT_FOCUSED_LOCKED";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_CONTROL_AF_TRIGGER_ID: {
+ break;
+ }
+ case ANDROID_CONTROL_AWB_STATE: {
+ switch (value) {
+ case ANDROID_CONTROL_AWB_STATE_INACTIVE:
+ msg = "INACTIVE";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_STATE_SEARCHING:
+ msg = "SEARCHING";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_STATE_CONVERGED:
+ msg = "CONVERGED";
+ ret = 0;
+ break;
+ case ANDROID_CONTROL_AWB_STATE_LOCKED:
+ msg = "LOCKED";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_DEMOSAIC_MODE: {
+ switch (value) {
+ case ANDROID_DEMOSAIC_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_DEMOSAIC_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_EDGE_MODE: {
+ switch (value) {
+ case ANDROID_EDGE_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_EDGE_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_EDGE_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_EDGE_STRENGTH: {
+ break;
+ }
+
+ case ANDROID_FLASH_FIRING_POWER: {
+ break;
+ }
+ case ANDROID_FLASH_FIRING_TIME: {
+ break;
+ }
+ case ANDROID_FLASH_MODE: {
+ switch (value) {
+ case ANDROID_FLASH_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_FLASH_MODE_SINGLE:
+ msg = "SINGLE";
+ ret = 0;
+ break;
+ case ANDROID_FLASH_MODE_TORCH:
+ msg = "TORCH";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_FLASH_COLOR_TEMPERATURE: {
+ break;
+ }
+ case ANDROID_FLASH_MAX_ENERGY: {
+ break;
+ }
+ case ANDROID_FLASH_STATE: {
+ switch (value) {
+ case ANDROID_FLASH_STATE_UNAVAILABLE:
+ msg = "UNAVAILABLE";
+ ret = 0;
+ break;
+ case ANDROID_FLASH_STATE_CHARGING:
+ msg = "CHARGING";
+ ret = 0;
+ break;
+ case ANDROID_FLASH_STATE_READY:
+ msg = "READY";
+ ret = 0;
+ break;
+ case ANDROID_FLASH_STATE_FIRED:
+ msg = "FIRED";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_FLASH_INFO_AVAILABLE: {
+ break;
+ }
+ case ANDROID_FLASH_INFO_CHARGE_DURATION: {
+ break;
+ }
+
+ case ANDROID_GEOMETRIC_MODE: {
+ switch (value) {
+ case ANDROID_GEOMETRIC_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_GEOMETRIC_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_GEOMETRIC_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_GEOMETRIC_STRENGTH: {
+ break;
+ }
+
+ case ANDROID_HOT_PIXEL_MODE: {
+ switch (value) {
+ case ANDROID_HOT_PIXEL_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_HOT_PIXEL_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_HOT_PIXEL_INFO_MAP: {
+ break;
+ }
+
+ case ANDROID_JPEG_GPS_COORDINATES: {
+ break;
+ }
+ case ANDROID_JPEG_GPS_PROCESSING_METHOD: {
+ break;
+ }
+ case ANDROID_JPEG_GPS_TIMESTAMP: {
+ break;
+ }
+ case ANDROID_JPEG_ORIENTATION: {
+ break;
+ }
+ case ANDROID_JPEG_QUALITY: {
+ break;
+ }
+ case ANDROID_JPEG_THUMBNAIL_QUALITY: {
+ break;
+ }
+ case ANDROID_JPEG_THUMBNAIL_SIZE: {
+ break;
+ }
+ case ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES: {
+ break;
+ }
+ case ANDROID_JPEG_MAX_SIZE: {
+ break;
+ }
+ case ANDROID_JPEG_SIZE: {
+ break;
+ }
+
+ case ANDROID_LENS_APERTURE: {
+ break;
+ }
+ case ANDROID_LENS_FILTER_DENSITY: {
+ break;
+ }
+ case ANDROID_LENS_FOCAL_LENGTH: {
+ break;
+ }
+ case ANDROID_LENS_FOCUS_DISTANCE: {
+ break;
+ }
+ case ANDROID_LENS_OPTICAL_STABILIZATION_MODE: {
+ switch (value) {
+ case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_LENS_FACING: {
+ switch (value) {
+ case ANDROID_LENS_FACING_FRONT:
+ msg = "FRONT";
+ ret = 0;
+ break;
+ case ANDROID_LENS_FACING_BACK:
+ msg = "BACK";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_LENS_OPTICAL_AXIS_ANGLE: {
+ break;
+ }
+ case ANDROID_LENS_POSITION: {
+ break;
+ }
+ case ANDROID_LENS_FOCUS_RANGE: {
+ break;
+ }
+ case ANDROID_LENS_STATE: {
+ switch (value) {
+ case ANDROID_LENS_STATE_STATIONARY:
+ msg = "STATIONARY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_LENS_INFO_AVAILABLE_APERTURES: {
+ break;
+ }
+ case ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES: {
+ break;
+ }
+ case ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS: {
+ break;
+ }
+ case ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION: {
+ break;
+ }
+ case ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP: {
+ break;
+ }
+ case ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE: {
+ break;
+ }
+ case ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE: {
+ break;
+ }
+ case ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE: {
+ break;
+ }
+ case ANDROID_LENS_INFO_SHADING_MAP: {
+ break;
+ }
+ case ANDROID_LENS_INFO_SHADING_MAP_SIZE: {
+ break;
+ }
+
+ case ANDROID_NOISE_REDUCTION_MODE: {
+ switch (value) {
+ case ANDROID_NOISE_REDUCTION_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_NOISE_REDUCTION_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_NOISE_REDUCTION_STRENGTH: {
+ break;
+ }
+
+ case ANDROID_QUIRKS_METERING_CROP_REGION: {
+ break;
+ }
+ case ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO: {
+ break;
+ }
+ case ANDROID_QUIRKS_USE_ZSL_FORMAT: {
+ break;
+ }
+
+ case ANDROID_REQUEST_FRAME_COUNT: {
+ break;
+ }
+ case ANDROID_REQUEST_ID: {
+ break;
+ }
+ case ANDROID_REQUEST_INPUT_STREAMS: {
+ break;
+ }
+ case ANDROID_REQUEST_METADATA_MODE: {
+ switch (value) {
+ case ANDROID_REQUEST_METADATA_MODE_NONE:
+ msg = "NONE";
+ ret = 0;
+ break;
+ case ANDROID_REQUEST_METADATA_MODE_FULL:
+ msg = "FULL";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_REQUEST_OUTPUT_STREAMS: {
+ break;
+ }
+ case ANDROID_REQUEST_TYPE: {
+ switch (value) {
+ case ANDROID_REQUEST_TYPE_CAPTURE:
+ msg = "CAPTURE";
+ ret = 0;
+ break;
+ case ANDROID_REQUEST_TYPE_REPROCESS:
+ msg = "REPROCESS";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS: {
+ break;
+ }
+ case ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS: {
+ break;
+ }
+
+ case ANDROID_SCALER_CROP_REGION: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_FORMATS: {
+ switch (value) {
+ case ANDROID_SCALER_AVAILABLE_FORMATS_RAW_SENSOR:
+ msg = "RAW_SENSOR";
+ ret = 0;
+ break;
+ case ANDROID_SCALER_AVAILABLE_FORMATS_YV12:
+ msg = "YV12";
+ ret = 0;
+ break;
+ case ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP:
+ msg = "YCrCb_420_SP";
+ ret = 0;
+ break;
+ case ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED:
+ msg = "IMPLEMENTATION_DEFINED";
+ ret = 0;
+ break;
+ case ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888:
+ msg = "YCbCr_420_888";
+ ret = 0;
+ break;
+ case ANDROID_SCALER_AVAILABLE_FORMATS_BLOB:
+ msg = "BLOB";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_JPEG_SIZES: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS: {
+ break;
+ }
+ case ANDROID_SCALER_AVAILABLE_RAW_SIZES: {
+ break;
+ }
+
+ case ANDROID_SENSOR_EXPOSURE_TIME: {
+ break;
+ }
+ case ANDROID_SENSOR_FRAME_DURATION: {
+ break;
+ }
+ case ANDROID_SENSOR_SENSITIVITY: {
+ break;
+ }
+ case ANDROID_SENSOR_BASE_GAIN_FACTOR: {
+ break;
+ }
+ case ANDROID_SENSOR_BLACK_LEVEL_PATTERN: {
+ break;
+ }
+ case ANDROID_SENSOR_CALIBRATION_TRANSFORM1: {
+ break;
+ }
+ case ANDROID_SENSOR_CALIBRATION_TRANSFORM2: {
+ break;
+ }
+ case ANDROID_SENSOR_COLOR_TRANSFORM1: {
+ break;
+ }
+ case ANDROID_SENSOR_COLOR_TRANSFORM2: {
+ break;
+ }
+ case ANDROID_SENSOR_FORWARD_MATRIX1: {
+ break;
+ }
+ case ANDROID_SENSOR_FORWARD_MATRIX2: {
+ break;
+ }
+ case ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY: {
+ break;
+ }
+ case ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS: {
+ break;
+ }
+ case ANDROID_SENSOR_ORIENTATION: {
+ break;
+ }
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1: {
+ switch (value) {
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT:
+ msg = "DAYLIGHT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT:
+ msg = "FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN:
+ msg = "TUNGSTEN";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH:
+ msg = "FLASH";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER:
+ msg = "FINE_WEATHER";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER:
+ msg = "CLOUDY_WEATHER";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE:
+ msg = "SHADE";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT:
+ msg = "DAYLIGHT_FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT:
+ msg = "DAY_WHITE_FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT:
+ msg = "COOL_WHITE_FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT:
+ msg = "WHITE_FLUORESCENT";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A:
+ msg = "STANDARD_A";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B:
+ msg = "STANDARD_B";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C:
+ msg = "STANDARD_C";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55:
+ msg = "D55";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65:
+ msg = "D65";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75:
+ msg = "D75";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50:
+ msg = "D50";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN:
+ msg = "ISO_STUDIO_TUNGSTEN";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_SENSOR_REFERENCE_ILLUMINANT2: {
+ break;
+ }
+ case ANDROID_SENSOR_TIMESTAMP: {
+ break;
+ }
+
+ case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT: {
+ switch (value) {
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB:
+ msg = "RGGB";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG:
+ msg = "GRBG";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG:
+ msg = "GBRG";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR:
+ msg = "BGGR";
+ ret = 0;
+ break;
+ case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB:
+ msg = "RGB";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_MAX_FRAME_DURATION: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_PHYSICAL_SIZE: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE: {
+ break;
+ }
+ case ANDROID_SENSOR_INFO_WHITE_LEVEL: {
+ break;
+ }
+
+ case ANDROID_SHADING_MODE: {
+ switch (value) {
+ case ANDROID_SHADING_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_SHADING_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_SHADING_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_SHADING_STRENGTH: {
+ break;
+ }
+
+ case ANDROID_STATISTICS_FACE_DETECT_MODE: {
+ switch (value) {
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE:
+ msg = "SIMPLE";
+ ret = 0;
+ break;
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_FULL:
+ msg = "FULL";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_STATISTICS_HISTOGRAM_MODE: {
+ switch (value) {
+ case ANDROID_STATISTICS_HISTOGRAM_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_STATISTICS_HISTOGRAM_MODE_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_STATISTICS_SHARPNESS_MAP_MODE: {
+ switch (value) {
+ case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_STATISTICS_FACE_IDS: {
+ break;
+ }
+ case ANDROID_STATISTICS_FACE_LANDMARKS: {
+ break;
+ }
+ case ANDROID_STATISTICS_FACE_RECTANGLES: {
+ break;
+ }
+ case ANDROID_STATISTICS_FACE_SCORES: {
+ break;
+ }
+ case ANDROID_STATISTICS_HISTOGRAM: {
+ break;
+ }
+ case ANDROID_STATISTICS_SHARPNESS_MAP: {
+ break;
+ }
+
+ case ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES: {
+ break;
+ }
+ case ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT: {
+ break;
+ }
+ case ANDROID_STATISTICS_INFO_MAX_FACE_COUNT: {
+ break;
+ }
+ case ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT: {
+ break;
+ }
+ case ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE: {
+ break;
+ }
+ case ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE: {
+ break;
+ }
+
+ case ANDROID_TONEMAP_CURVE_BLUE: {
+ break;
+ }
+ case ANDROID_TONEMAP_CURVE_GREEN: {
+ break;
+ }
+ case ANDROID_TONEMAP_CURVE_RED: {
+ break;
+ }
+ case ANDROID_TONEMAP_MODE: {
+ switch (value) {
+ case ANDROID_TONEMAP_MODE_CONTRAST_CURVE:
+ msg = "CONTRAST_CURVE";
+ ret = 0;
+ break;
+ case ANDROID_TONEMAP_MODE_FAST:
+ msg = "FAST";
+ ret = 0;
+ break;
+ case ANDROID_TONEMAP_MODE_HIGH_QUALITY:
+ msg = "HIGH_QUALITY";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_TONEMAP_MAX_CURVE_POINTS: {
+ break;
+ }
+
+ case ANDROID_LED_TRANSMIT: {
+ switch (value) {
+ case ANDROID_LED_TRANSMIT_OFF:
+ msg = "OFF";
+ ret = 0;
+ break;
+ case ANDROID_LED_TRANSMIT_ON:
+ msg = "ON";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+ case ANDROID_LED_AVAILABLE_LEDS: {
+ switch (value) {
+ case ANDROID_LED_AVAILABLE_LEDS_TRANSMIT:
+ msg = "TRANSMIT";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL: {
+ switch (value) {
+ case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED:
+ msg = "LIMITED";
+ ret = 0;
+ break;
+ case ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL:
+ msg = "FULL";
+ ret = 0;
+ break;
+ default:
+ msg = "error: enum value out of range";
+ }
+ break;
+ }
+
+ }
+
+ strncpy(dst, msg, size - 1);
+ dst[size - 1] = '\0';
+
+ return ret;
+}
+
+
+#define CAMERA_METADATA_ENUM_STRING_MAX_SIZE 23
diff --git a/camera/tests/camera_metadata_tests.cpp b/camera/tests/camera_metadata_tests.cpp
index 47faf426..8b4aa2b7 100644
--- a/camera/tests/camera_metadata_tests.cpp
+++ b/camera/tests/camera_metadata_tests.cpp
@@ -20,6 +20,8 @@
#include <errno.h>
+#include <vector>
+#include <algorithm>
#include "gtest/gtest.h"
#include "system/camera_metadata.h"
@@ -36,6 +38,9 @@
({struct _AlignasStruct { char c; T field; }; \
offsetof(struct _AlignasStruct, field); })
+#define FINISH_USING_CAMERA_METADATA(m) \
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL)); \
+ free_camera_metadata(m); \
TEST(camera_metadata, allocate_normal) {
camera_metadata_t *m = NULL;
@@ -50,7 +55,7 @@ TEST(camera_metadata, allocate_normal) {
EXPECT_EQ((size_t)0, get_camera_metadata_data_count(m));
EXPECT_EQ(data_capacity, get_camera_metadata_data_capacity(m));
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, allocate_nodata) {
@@ -64,7 +69,7 @@ TEST(camera_metadata, allocate_nodata) {
EXPECT_EQ((size_t)0, get_camera_metadata_data_count(m));
EXPECT_EQ((size_t)0, get_camera_metadata_data_capacity(m));
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, allocate_nothing) {
@@ -99,6 +104,8 @@ TEST(camera_metadata, place_normal) {
EXPECT_EQ((size_t)0, get_camera_metadata_data_count(m));
EXPECT_EQ(data_capacity, get_camera_metadata_data_capacity(m));
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, &buf_size));
+
free(buf);
}
@@ -155,6 +162,8 @@ TEST(camera_metadata, place_extraspace) {
EXPECT_EQ(data_capacity, get_camera_metadata_data_capacity(m));
EXPECT_EQ(buf + buf_size - extra_space, (uint8_t*)m + get_camera_metadata_size(m));
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, &buf_size));
+
free(buf);
}
@@ -171,7 +180,7 @@ TEST(camera_metadata, get_size) {
EXPECT_EQ(calculate_camera_metadata_size(0,0),
get_camera_metadata_compact_size(m) );
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, add_get_normal) {
@@ -181,6 +190,8 @@ TEST(camera_metadata, add_get_normal) {
m = allocate_camera_metadata(entry_capacity, data_capacity);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
+
int result;
size_t data_used = 0;
size_t entries_used = 0;
@@ -196,6 +207,8 @@ TEST(camera_metadata, add_get_normal) {
get_camera_metadata_tag_type(ANDROID_SENSOR_EXPOSURE_TIME), 1);
entries_used++;
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
+
// INT32
int32_t sensitivity = 800;
@@ -207,6 +220,8 @@ TEST(camera_metadata, add_get_normal) {
get_camera_metadata_tag_type(ANDROID_SENSOR_SENSITIVITY), 1);
entries_used++;
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
+
// FLOAT
float focusDistance = 0.5f;
@@ -218,6 +233,8 @@ TEST(camera_metadata, add_get_normal) {
get_camera_metadata_tag_type(ANDROID_LENS_FOCUS_DISTANCE), 1);
entries_used++;
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
+
// Array of FLOAT
float colorTransform[9] = {
@@ -226,13 +243,15 @@ TEST(camera_metadata, add_get_normal) {
0.0f, 0.1f, 0.7f
};
result = add_camera_metadata_entry(m,
- ANDROID_COLOR_TRANSFORM,
+ ANDROID_COLOR_CORRECTION_TRANSFORM,
colorTransform, 9);
EXPECT_EQ(OK, result);
data_used += calculate_camera_metadata_entry_data_size(
- get_camera_metadata_tag_type(ANDROID_COLOR_TRANSFORM), 9);
+ get_camera_metadata_tag_type(ANDROID_COLOR_CORRECTION_TRANSFORM), 9);
entries_used++;
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
+
// Check added entries
camera_metadata_entry entry;
@@ -267,7 +286,7 @@ TEST(camera_metadata, add_get_normal) {
3, &entry);
EXPECT_EQ(OK, result);
EXPECT_EQ((size_t)3, entry.index);
- EXPECT_EQ(ANDROID_COLOR_TRANSFORM, entry.tag);
+ EXPECT_EQ(ANDROID_COLOR_CORRECTION_TRANSFORM, entry.tag);
EXPECT_EQ(TYPE_FLOAT, entry.type);
EXPECT_EQ((size_t)9, entry.count);
for (unsigned int i=0; i < entry.count; i++) {
@@ -284,7 +303,7 @@ TEST(camera_metadata, add_get_normal) {
dump_camera_metadata(m, 0, 2);
}
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
void add_test_metadata(camera_metadata_t *m, int entry_count) {
@@ -356,7 +375,7 @@ TEST(camera_metadata, add_get_toomany) {
dump_camera_metadata(m, 0, 2);
}
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, add_too_much_data) {
@@ -376,7 +395,7 @@ TEST(camera_metadata, add_too_much_data) {
&exposure_time, 1);
EXPECT_EQ(ERROR, result);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, copy_metadata) {
@@ -426,9 +445,10 @@ TEST(camera_metadata, copy_metadata) {
}
}
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m2, &buf_size));
free(buf);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, copy_metadata_extraspace) {
@@ -485,9 +505,10 @@ TEST(camera_metadata, copy_metadata_extraspace) {
}
}
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m2, &buf_size));
free(buf);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, copy_metadata_nospace) {
@@ -514,7 +535,7 @@ TEST(camera_metadata, copy_metadata_nospace) {
free(buf);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, append_metadata) {
@@ -596,8 +617,8 @@ TEST(camera_metadata, append_metadata) {
}
}
- free_camera_metadata(m);
- free_camera_metadata(m2);
+ FINISH_USING_CAMERA_METADATA(m);
+ FINISH_USING_CAMERA_METADATA(m2);
}
TEST(camera_metadata, append_metadata_nospace) {
@@ -622,8 +643,8 @@ TEST(camera_metadata, append_metadata_nospace) {
EXPECT_EQ((size_t)0, get_camera_metadata_entry_count(m2));
EXPECT_EQ((size_t)0, get_camera_metadata_data_count(m2));
- free_camera_metadata(m);
- free_camera_metadata(m2);
+ FINISH_USING_CAMERA_METADATA(m);
+ FINISH_USING_CAMERA_METADATA(m2);
}
TEST(camera_metadata, append_metadata_onespace) {
@@ -704,8 +725,8 @@ TEST(camera_metadata, append_metadata_onespace) {
}
}
- free_camera_metadata(m);
- free_camera_metadata(m2);
+ FINISH_USING_CAMERA_METADATA(m);
+ FINISH_USING_CAMERA_METADATA(m2);
}
TEST(camera_metadata, vendor_tags) {
@@ -721,11 +742,13 @@ TEST(camera_metadata, vendor_tags) {
FAKEVENDOR_SENSOR_SUPERMODE,
&superMode, 1);
EXPECT_EQ(ERROR, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
result = add_camera_metadata_entry(m,
ANDROID_REQUEST_METADATA_MODE,
&superMode, 1);
EXPECT_EQ(OK, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
EXPECT_NULL(get_camera_metadata_section_name(FAKEVENDOR_SENSOR_SUPERMODE));
EXPECT_NULL(get_camera_metadata_tag_name(FAKEVENDOR_SENSOR_SUPERMODE));
@@ -737,16 +760,19 @@ TEST(camera_metadata, vendor_tags) {
FAKEVENDOR_SENSOR_SUPERMODE,
&superMode, 1);
EXPECT_EQ(OK, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
result = add_camera_metadata_entry(m,
ANDROID_REQUEST_METADATA_MODE,
&superMode, 1);
EXPECT_EQ(OK, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
result = add_camera_metadata_entry(m,
FAKEVENDOR_SCALER_END,
&superMode, 1);
EXPECT_EQ(ERROR, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
EXPECT_STREQ("com.fakevendor.sensor",
get_camera_metadata_section_name(FAKEVENDOR_SENSOR_SUPERMODE));
@@ -761,22 +787,35 @@ TEST(camera_metadata, vendor_tags) {
EXPECT_EQ(-1, get_camera_metadata_tag_type(FAKEVENDOR_SCALER_END));
set_camera_metadata_vendor_tag_ops(NULL);
+ // TODO: fix vendor ops. Then the below 3 validations should fail.
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
result = add_camera_metadata_entry(m,
FAKEVENDOR_SENSOR_SUPERMODE,
&superMode, 1);
EXPECT_EQ(ERROR, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
result = add_camera_metadata_entry(m,
ANDROID_REQUEST_METADATA_MODE,
&superMode, 1);
EXPECT_EQ(OK, result);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m, NULL));
EXPECT_NULL(get_camera_metadata_section_name(FAKEVENDOR_SENSOR_SUPERMODE));
EXPECT_NULL(get_camera_metadata_tag_name(FAKEVENDOR_SENSOR_SUPERMODE));
EXPECT_EQ(-1, get_camera_metadata_tag_type(FAKEVENDOR_SENSOR_SUPERMODE));
- free_camera_metadata(m);
+ // Remove all vendor entries so validation passes
+ {
+ camera_metadata_ro_entry_t entry;
+ EXPECT_EQ(OK, find_camera_metadata_ro_entry(m,
+ FAKEVENDOR_SENSOR_SUPERMODE,
+ &entry));
+ EXPECT_EQ(OK, delete_camera_metadata_entry(m, entry.index));
+ }
+
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, add_all_tags) {
@@ -861,7 +900,7 @@ TEST(camera_metadata, add_all_tags) {
dump_camera_metadata(m, 0, 2);
}
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, sort_metadata) {
@@ -881,7 +920,7 @@ TEST(camera_metadata, sort_metadata) {
0.0f, 0.1f, 0.7f
};
result = add_camera_metadata_entry(m,
- ANDROID_COLOR_TRANSFORM,
+ ANDROID_COLOR_CORRECTION_TRANSFORM,
colorTransform, 9);
EXPECT_EQ(OK, result);
@@ -916,7 +955,7 @@ TEST(camera_metadata, sort_metadata) {
EXPECT_EQ(focus_distance, *entry.data.f);
result = find_camera_metadata_entry(m,
- ANDROID_NOISE_STRENGTH,
+ ANDROID_NOISE_REDUCTION_STRENGTH,
&entry);
EXPECT_EQ(NOT_FOUND, result);
EXPECT_EQ((size_t)1, entry.index);
@@ -940,29 +979,42 @@ TEST(camera_metadata, sort_metadata) {
}
// Test sorted find
+ size_t lensFocusIndex = -1;
+ {
+ std::vector<uint32_t> tags;
+ tags.push_back(ANDROID_COLOR_CORRECTION_TRANSFORM);
+ tags.push_back(ANDROID_LENS_FOCUS_DISTANCE);
+ tags.push_back(ANDROID_SENSOR_EXPOSURE_TIME);
+ tags.push_back(ANDROID_SENSOR_SENSITIVITY);
+ std::sort(tags.begin(), tags.end());
+
+ lensFocusIndex =
+ std::find(tags.begin(), tags.end(), ANDROID_LENS_FOCUS_DISTANCE)
+ - tags.begin();
+ }
result = find_camera_metadata_entry(m,
ANDROID_LENS_FOCUS_DISTANCE,
&entry);
EXPECT_EQ(OK, result);
- EXPECT_EQ((size_t)0, entry.index);
+ EXPECT_EQ(lensFocusIndex, entry.index);
EXPECT_EQ(ANDROID_LENS_FOCUS_DISTANCE, entry.tag);
EXPECT_EQ(TYPE_FLOAT, entry.type);
EXPECT_EQ((size_t)1, (size_t)entry.count);
EXPECT_EQ(focus_distance, *entry.data.f);
result = find_camera_metadata_entry(m,
- ANDROID_NOISE_STRENGTH,
+ ANDROID_NOISE_REDUCTION_STRENGTH,
&entry);
EXPECT_EQ(NOT_FOUND, result);
- EXPECT_EQ((size_t)0, entry.index);
+ EXPECT_EQ(lensFocusIndex, entry.index);
EXPECT_EQ(ANDROID_LENS_FOCUS_DISTANCE, entry.tag);
EXPECT_EQ(TYPE_FLOAT, entry.type);
EXPECT_EQ((size_t)1, entry.count);
EXPECT_EQ(focus_distance, *entry.data.f);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, delete_metadata) {
@@ -1618,8 +1670,9 @@ TEST(camera_metadata, user_pointer) {
result = get_camera_metadata_user_pointer(m2, &ptr);
EXPECT_NULL(ptr);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m2, &buf_size));
free(buf);
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, memcpy) {
@@ -1633,9 +1686,10 @@ TEST(camera_metadata, memcpy) {
add_test_metadata(m, 5);
- uint8_t *dst = new uint8_t[get_camera_metadata_size(m)];
+ size_t m_size = get_camera_metadata_size(m);
+ uint8_t *dst = new uint8_t[m_size];
- memcpy(dst, m, get_camera_metadata_size(m));
+ memcpy(dst, m, m_size);
camera_metadata_t *m2 = reinterpret_cast<camera_metadata_t*>(dst);
@@ -1714,8 +1768,10 @@ TEST(camera_metadata, memcpy) {
EXPECT_EQ(300, e2.data.i64[0]);
EXPECT_EQ(200, e2.data.i64[1]);
+ EXPECT_EQ(OK, validate_camera_metadata_structure(m2, &m_size));
+
delete dst;
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
TEST(camera_metadata, data_alignment) {
@@ -1751,7 +1807,7 @@ TEST(camera_metadata, data_alignment) {
ANDROID_LENS_FOCUS_DISTANCE,
ANDROID_SENSOR_EXPOSURE_TIME,
ANDROID_JPEG_GPS_COORDINATES,
- ANDROID_CONTROL_AE_EXP_COMPENSATION_STEP
+ ANDROID_CONTROL_AE_COMPENSATION_STEP
};
/*
@@ -1803,7 +1859,7 @@ TEST(camera_metadata, data_alignment) {
" data_count " << data_count <<
" expected alignment was: " << m_type_align[m_type];
- free_camera_metadata(m);
+ FINISH_USING_CAMERA_METADATA(m);
}
}
}