OSDN Git Service

Camera: Add available physical camera request keys
authorEmilian Peev <epeev@google.com>
Thu, 18 Jan 2018 19:09:57 +0000 (19:09 +0000)
committerEmilian Peev <epeev@google.com>
Sun, 21 Jan 2018 12:58:56 +0000 (12:58 +0000)
Add a subset of the available camera request keys that
can be overriden for physical device backing logical
multi-camera.

Test: Compile, and run metadata-generate
Bug: 64691172

Change-Id: I39a825d75f5bff96000729415e4d6f99fbb1fe2d

camera/docs/docs.html
camera/docs/metadata_definitions.xml
camera/include/system/camera_metadata_tags.h
camera/src/camera_metadata_tag_info.c

index 972c424..6cd66d1 100644 (file)
             ><a href="#static_android.request.availableCharacteristicsKeys">android.request.availableCharacteristicsKeys</a></li>
             <li
             ><a href="#static_android.request.availableSessionKeys">android.request.availableSessionKeys</a></li>
+            <li
+            ><a href="#static_android.request.availablePhysicalCameraRequestKeys">android.request.availablePhysicalCameraRequestKeys</a></li>
           </ul>
         </li>
         <li>
@@ -17360,6 +17362,88 @@ via
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
+                
+          <tr class="entry" id="static_android.request.availablePhysicalCameraRequestKeys">
+            <td class="entry_name
+             " rowspan="5">
+              android.<wbr/>request.<wbr/>available<wbr/>Physical<wbr/>Camera<wbr/>Request<wbr/>Keys
+            </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>
+              <span class="entry_type_visibility"> [hidden]</span>
+
+
+              <span class="entry_type_hwlevel">[limited] </span>
+
+
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A subset of the available request keys that can be overriden for
+physical devices backing a logical multi-camera.<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 is a subset of <a href="#static_android.request.availableRequestKeys">android.<wbr/>request.<wbr/>available<wbr/>Request<wbr/>Keys</a> which contains a list
+of keys that can be overriden using <a href="https://developer.android.com/reference/CaptureRequest/Builder.html#setPhysicalCameraKey">Builder#setPhysicalCameraKey</a>.<wbr/>
+The respective value of such request key can be obtained by calling
+<a href="https://developer.android.com/reference/CaptureRequest/Builder.html#getPhysicalCameraKey">Builder#getPhysicalCameraKey</a>.<wbr/> Capture requests that contain
+individual physical device requests must be built via
+<a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int,">Set)</a>.<wbr/>
+Such extended capture requests can be passed only to
+<a href="https://developer.android.com/reference/CameraCaptureSession.html#capture">CameraCaptureSession#capture</a> or <a href="https://developer.android.com/reference/CameraCaptureSession.html#captureBurst">CameraCaptureSession#captureBurst</a> and
+not to <a href="https://developer.android.com/reference/CameraCaptureSession.html#setRepeatingRequest">CameraCaptureSession#setRepeatingRequest</a> or
+<a href="https://developer.android.com/reference/CameraCaptureSession.html#setRepeatingBurst">CameraCaptureSession#setRepeatingBurst</a>.<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>Vendor tags can be listed here.<wbr/> Vendor tag metadata should also
+use the extensions C api (refer to
+android.<wbr/>hardware.<wbr/>camera.<wbr/>device.<wbr/>V3_<wbr/>4.<wbr/>Capture<wbr/>Request.<wbr/>physical<wbr/>Camera<wbr/>Settings for more
+details).<wbr/></p>
+<p>Setting/<wbr/>getting vendor tags will be checked against the metadata
+vendor extensions API and not against this field.<wbr/></p>
+<p>The HAL must not consume any request tags in the session parameters that
+are not listed either here or in the vendor tag list.<wbr/></p>
+<p>The public camera2 API will always make the vendor tags visible
+via
+<a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailablePhysicalCameraRequestKeys">CameraCharacteristics#getAvailablePhysicalCameraRequestKeys</a>.<wbr/></p>
+            </td>
+          </tr>
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
+           <!-- end of entry -->
+        
         
 
       <!-- end of kind -->
index 837e29a..f00c7fa 100644 (file)
@@ -5419,6 +5419,42 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys}.
           </hal_details>
         </entry>
+        <entry name="availablePhysicalCameraRequestKeys" type="int32" visibility="hidden"
+               container="array" hwlevel="limited" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>A subset of the available request keys that can be overriden for
+          physical devices backing a logical multi-camera.</description>
+          <details>
+          This is a subset of android.request.availableRequestKeys which contains a list
+          of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey}.
+          The respective value of such request key can be obtained by calling
+          {@link CaptureRequest.Builder#getPhysicalCameraKey}. Capture requests that contain
+          individual physical device requests must be built via
+          {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
+          Such extended capture requests can be passed only to
+          {@link CameraCaptureSession#capture} or {@link CameraCaptureSession#captureBurst} and
+          not to {@link CameraCaptureSession#setRepeatingRequest} or
+          {@link CameraCaptureSession#setRepeatingBurst}.
+          </details>
+          <hal_details>
+          Vendor tags can be listed here. Vendor tag metadata should also
+          use the extensions C api (refer to
+          android.hardware.camera.device.V3_4.CaptureRequest.physicalCameraSettings for more
+          details).
+
+          Setting/getting vendor tags will be checked against the metadata
+          vendor extensions API and not against this field.
+
+          The HAL must not consume any request tags in the session parameters that
+          are not listed either here or in the vendor tag list.
+
+          The public camera2 API will always make the vendor tags visible
+          via
+          {@link android.hardware.camera2.CameraCharacteristics#getAvailablePhysicalCameraRequestKeys}.
+          </hal_details>
+        </entry>
       </static>
     </section>
     <section name="scaler">
index 805a98a..335c2f6 100644 (file)
@@ -270,6 +270,8 @@ typedef enum camera_metadata_tag {
     ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,            // int32[]      | ndk_public   | HIDL v3.2
     ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,   // int32[]      | ndk_public   | HIDL v3.2
     ANDROID_REQUEST_AVAILABLE_SESSION_KEYS,           // int32[]      | ndk_public   | HIDL v3.3
+    ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS,
+                                                      // int32[]      | hidden       | HIDL v3.3
     ANDROID_REQUEST_END,
 
     ANDROID_SCALER_CROP_REGION =                      // int32[]      | public       | HIDL v3.2
index 56e220b..5ef37eb 100644 (file)
@@ -407,6 +407,9 @@ static tag_info_t android_request[ANDROID_REQUEST_END -
     { "availableCharacteristicsKeys",  TYPE_INT32  },
     [ ANDROID_REQUEST_AVAILABLE_SESSION_KEYS - ANDROID_REQUEST_START ] =
     { "availableSessionKeys",          TYPE_INT32  },
+    [ ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS - ANDROID_REQUEST_START ] =
+    { "availablePhysicalCameraRequestKeys",
+                                        TYPE_INT32  },
 };
 
 static tag_info_t android_scaler[ANDROID_SCALER_END -
@@ -1911,6 +1914,9 @@ int camera_metadata_enum_snprint(uint32_t tag,
         case ANDROID_REQUEST_AVAILABLE_SESSION_KEYS: {
             break;
         }
+        case ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS: {
+            break;
+        }
 
         case ANDROID_SCALER_CROP_REGION: {
             break;