diff options
author | Igor Murashkin <iam@google.com> | 2013-05-23 16:38:59 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2013-05-23 16:43:43 -0700 |
commit | 38b8cae3876ce1c02d6da310ad93fb31d9c5a9ed (patch) | |
tree | cf1f47dc608c875a4bfe2aee97727d4c279e4f7b | |
parent | c2eebfffbaeb9da4093d3cd1a323974dbb2b164d (diff) | |
download | media-jb-mr2-dev.tar.gz |
camera_metadata: Add supportedHardwareLevel fieldandroid-4.3_r3.1android-4.3_r3android-4.3.1_r1jb-mr2.0.0-releasejb-mr2-dev
Bug: 9111852
Change-Id: I6a01cb2678c8cd824eb2eb84d69d47a524c20750
-rw-r--r-- | camera/docs/docs.html | 85 | ||||
-rw-r--r-- | camera/docs/metadata_properties.xml | 21 | ||||
-rw-r--r-- | camera/include/system/camera_metadata_tags.h | 13 | ||||
-rw-r--r-- | camera/src/camera_metadata_tag_info.c | 26 |
4 files changed, 145 insertions, 0 deletions
diff --git a/camera/docs/docs.html b/camera/docs/docs.html index 5cac284b..210e9d8d 100644 --- a/camera/docs/docs.html +++ b/camera/docs/docs.html @@ -349,6 +349,11 @@ <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> @@ -10143,6 +10148,86 @@ </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> diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml index 41ae5042..2980c8d6 100644 --- a/camera/docs/metadata_properties.xml +++ b/camera/docs/metadata_properties.xml @@ -2280,5 +2280,26 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata </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/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h index 6ff3f5f3..646c7ec9 100644 --- a/camera/include/system/camera_metadata_tags.h +++ b/camera/include/system/camera_metadata_tags.h @@ -58,6 +58,7 @@ typedef enum camera_metadata_section { ANDROID_STATISTICS_INFO, ANDROID_TONEMAP, ANDROID_LED, + ANDROID_INFO, ANDROID_SECTION_COUNT, VENDOR_SECTION = 0x8000 @@ -91,6 +92,7 @@ typedef enum camera_metadata_section_start { 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; @@ -306,6 +308,10 @@ typedef enum camera_metadata_tag { ANDROID_LED_AVAILABLE_LEDS, ANDROID_LED_END, + ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL + = ANDROID_INFO_START, + ANDROID_INFO_END, + } camera_metadata_tag_t; /** @@ -656,3 +662,10 @@ typedef enum camera_metadata_enum_android_led_available_leds { } 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; + + diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c index 5b1d424f..65ffe671 100644 --- a/camera/src/camera_metadata_tag_info.c +++ b/camera/src/camera_metadata_tag_info.c @@ -54,6 +54,7 @@ const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = { [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] = { @@ -103,6 +104,8 @@ unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = { ANDROID_TONEMAP_END }, [ANDROID_LED] = { ANDROID_LED_START, ANDROID_LED_END }, + [ANDROID_INFO] = { ANDROID_INFO_START, + ANDROID_INFO_END }, }; static tag_info_t android_color_correction[ANDROID_COLOR_CORRECTION_END - @@ -513,6 +516,12 @@ static tag_info_t android_led[ANDROID_LED_END - { "availableLeds", 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 }, +}; + tag_info_t *tag_info[ANDROID_SECTION_COUNT] = { android_color_correction, @@ -538,6 +547,7 @@ tag_info_t *tag_info[ANDROID_SECTION_COUNT] = { android_statistics_info, android_tonemap, android_led, + android_info, }; int camera_metadata_enum_snprint(uint32_t tag, @@ -1846,6 +1856,22 @@ int camera_metadata_enum_snprint(uint32_t tag, 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); |