OSDN Git Service

camera: Add device info version
authorChien-Yu Chen <cychen@google.com>
Wed, 3 Jan 2018 20:04:48 +0000 (12:04 -0800)
committerChien-Yu Chen <cychen@google.com>
Wed, 3 Jan 2018 22:38:05 +0000 (14:38 -0800)
Test: CTS
Bug: 64847201
Change-Id: Ia7b5ca8fc37093afd5a5e29d46d437159bb5c454

camera/docs/camera_device_info.proto
camera/docs/docs.html
camera/docs/metadata_definitions.xml
camera/docs/metadata_helpers.py
camera/include/system/camera_metadata_tags.h
camera/src/camera_metadata_tag_info.c

index d857589..8db6255 100644 (file)
@@ -148,6 +148,7 @@ message CameraDeviceInfo {
     optional int32 android_tonemap_maxCurvePoints = 1310720;
     repeated int32 android_tonemap_availableToneMapModes = 1310721;
     optional int32 android_info_supportedHardwareLevel = 1441792;
+    optional string android_info_version = 1441793;
     optional int32 android_sync_maxLatency = 1572864;
     optional int32 android_reprocess_maxCaptureStall = 1638400;
     optional bool android_depth_depthIsExclusive = 1703936;
index df8b163..f1edfcf 100644 (file)
           <ul class="toc_section">
             <li
             ><a href="#static_android.info.supportedHardwareLevel">android.info.supportedHardwareLevel</a></li>
+            <li
+            ><a href="#static_android.info.version">android.info.version</a></li>
           </ul>
         </li>
       </ul> <!-- toc_section -->
@@ -17103,7 +17105,7 @@ can result in unexpected delays when modified during the capture session
 lifetime.<wbr/> Typical examples include parameters that require a
 time-consuming hardware re-configuration or internal camera pipeline
 change.<wbr/> For performance reasons we advise clients to pass their initial
-values as part of 
+values as part of
 <a href="https://developer.android.com/reference/SessionConfiguration.html#setSessionParameters">SessionConfiguration#setSessionParameters</a>.<wbr/>i
 Once the camera capture session is enabled it is also recommended to avoid
 changing them from their initial values set in
@@ -27386,6 +27388,68 @@ implemented by the camera framework code.<wbr/></p>
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
+                
+          <tr class="entry" id="static_android.info.version">
+            <td class="entry_name
+             " rowspan="5">
+              android.<wbr/>info.<wbr/>version
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">byte</span>
+
+              <span class="entry_type_visibility"> [public as string]</span>
+
+
+
+
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A short string for manufacturer version information about the camera device,<wbr/> such as
+ISP hardware,<wbr/> sensors,<wbr/> etc.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_hal_version">
+              <p>3.<wbr/>3</p>
+            </td>
+
+            <td class="entry_tags">
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="6">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="6">
+              <p>This can be used in <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_IMAGE_DESCRIPTION">TAG_<wbr/>IMAGE_<wbr/>DESCRIPTION</a>
+in jpeg EXIF.<wbr/> This key may be absent if no version information is available on the
+device.<wbr/></p>
+            </td>
+          </tr>
+
+          <tr class="entries_header">
+            <th class="th_details" colspan="6">HAL Implementation Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="6">
+              <p>The string must consist of only alphanumeric characters,<wbr/> punctuation,<wbr/> and
+whitespace,<wbr/> i.<wbr/>e.<wbr/> it must match regular expression "[\p{Alnum}\p{Punct}\p{Space}]*".<wbr/>
+It must not exceed 256 characters.<wbr/></p>
+            </td>
+          </tr>
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
+           <!-- end of entry -->
+        
         
 
       <!-- end of kind -->
index 8e6691a..d27ccea 100644 (file)
@@ -5229,7 +5229,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           lifetime. Typical examples include parameters that require a
           time-consuming hardware re-configuration or internal camera pipeline
           change. For performance reasons we advise clients to pass their initial
-          values as part of 
+          values as part of
           {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.i
           Once the camera capture session is enabled it is also recommended to avoid
           changing them from their initial values set in
@@ -8711,6 +8711,22 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           implemented by the camera framework code.
           </hal_details>
         </entry>
+        <entry name="version" type="byte" visibility="public" typedef="string" hal_version="3.3">
+          <description>
+              A short string for manufacturer version information about the camera device, such as
+              ISP hardware, sensors, etc.
+          </description>
+          <details>
+              This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
+              in jpeg EXIF. This key may be absent if no version information is available on the
+              device.
+          </details>
+          <hal_details>
+              The string must consist of only alphanumeric characters, punctuation, and
+              whitespace, i.e. it must match regular expression "[\p{Alnum}\p{Punct}\p{Space}]*".
+              It must not exceed 256 characters.
+          </hal_details>
+        </entry>
       </static>
     </section>
     <section name="blackLevel">
index 210d2b9..5f03d40 100644 (file)
@@ -176,7 +176,8 @@ def protobuf_type(entry):
     "double"                 : "double",
     "int32"                  : "int32",
     "int64"                  : "int64",
-    "enumList"               : "int32"
+    "enumList"               : "int32",
+    "string"                 : "string"
   }
 
   if typeName not in typename_to_protobuftype:
index 7aea0b0..e0b730d 100644 (file)
@@ -391,6 +391,7 @@ typedef enum camera_metadata_tag {
 
     ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL =           // enum         | public       | HIDL v3.2
             ANDROID_INFO_START,
+    ANDROID_INFO_VERSION,                             // byte         | public       | HIDL v3.3
     ANDROID_INFO_END,
 
     ANDROID_BLACK_LEVEL_LOCK =                        // enum         | public       | HIDL v3.2
index 91d8a63..70a869a 100644 (file)
@@ -639,6 +639,8 @@ static tag_info_t android_info[ANDROID_INFO_END -
         ANDROID_INFO_START] = {
     [ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL - ANDROID_INFO_START ] =
     { "supportedHardwareLevel",        TYPE_BYTE   },
+    [ ANDROID_INFO_VERSION - ANDROID_INFO_START ] =
+    { "version",                       TYPE_BYTE   },
 };
 
 static tag_info_t android_black_level[ANDROID_BLACK_LEVEL_END -
@@ -2542,6 +2544,9 @@ int camera_metadata_enum_snprint(uint32_t tag,
             }
             break;
         }
+        case ANDROID_INFO_VERSION: {
+            break;
+        }
 
         case ANDROID_BLACK_LEVEL_LOCK: {
             switch (value) {