Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -17936,6 +17936,7 @@ package android.hardware.camera2 { method public int capture(@NonNull android.hardware.camera2.CaptureRequest, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraExtensionSession.ExtensionCaptureCallback) throws android.hardware.camera2.CameraAccessException; method public void close() throws android.hardware.camera2.CameraAccessException; method @NonNull public android.hardware.camera2.CameraDevice getDevice(); method @Nullable public android.util.Pair<java.lang.Long,java.lang.Long> getRealtimeStillCaptureLatency() throws android.hardware.camera2.CameraAccessException; method public int setRepeatingRequest(@NonNull android.hardware.camera2.CaptureRequest, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraExtensionSession.ExtensionCaptureCallback) throws android.hardware.camera2.CameraAccessException; method public void stopRepeating() throws android.hardware.camera2.CameraAccessException; } core/java/android/hardware/camera2/CameraExtensionSession.java +27 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ package android.hardware.camera2; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.camera2.impl.PublicKey; import android.hardware.camera2.utils.TypeReference; import android.util.Pair; import android.util.Range; import java.util.concurrent.Executor; Loading Loading @@ -423,6 +428,28 @@ public abstract class CameraExtensionSession implements AutoCloseable { throw new UnsupportedOperationException("Subclasses must override this method"); } /** * Return the realtime still {@link #capture} latency. * * <p>The pair will be in milliseconds with the first value indicating the capture latency from * the {@link ExtensionCaptureCallback#onCaptureStarted} until * {@link ExtensionCaptureCallback#onCaptureProcessStarted} * and the second value containing the estimated post-processing latency from * {@link ExtensionCaptureCallback#onCaptureProcessStarted} until the processed frame returns * to the client.</p> * * <p>The estimations will take into account the current environment conditions, the camera * state and will include the time spent processing the multi-frame capture request along with * any additional time for encoding of the processed buffer if necessary.</p> * * @return The realtime still capture latency, * or {@code null} if the estimation is not supported. */ @Nullable public Pair<Long, Long> getRealtimeStillCaptureLatency() throws CameraAccessException { throw new UnsupportedOperationException("Subclasses must override this method"); } /** * Close this capture session asynchronously. * Loading core/java/android/hardware/camera2/extension/IImageCaptureExtenderImpl.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.extension.CaptureStageImpl; import android.hardware.camera2.extension.ICaptureProcessorImpl; import android.hardware.camera2.extension.LatencyPair; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.Size; import android.hardware.camera2.extension.SizeList; Loading @@ -43,4 +44,5 @@ interface IImageCaptureExtenderImpl CameraMetadataNative getAvailableCaptureRequestKeys(); CameraMetadataNative getAvailableCaptureResultKeys(); boolean isCaptureProcessProgressAvailable(); @nullable LatencyPair getRealtimeCaptureLatency(); } core/java/android/hardware/camera2/extension/ISessionProcessorImpl.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.extension.CameraSessionConfig; import android.hardware.camera2.extension.ICaptureCallback; import android.hardware.camera2.extension.IRequestProcessorImpl; import android.hardware.camera2.extension.LatencyPair; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.OutputSurface; /** @hide */ Loading @@ -34,4 +36,5 @@ interface ISessionProcessorImpl int startCapture(in ICaptureCallback callback); void setParameters(in CaptureRequest captureRequest); int startTrigger(in CaptureRequest captureRequest, in ICaptureCallback callback); @nullable LatencyPair getRealtimeCaptureLatency(); } core/java/android/hardware/camera2/extension/LatencyPair.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /** * Copyright (c) 2022, 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. */ package android.hardware.camera2.extension; /** @hide */ parcelable LatencyPair { long first; long second; } Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -17936,6 +17936,7 @@ package android.hardware.camera2 { method public int capture(@NonNull android.hardware.camera2.CaptureRequest, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraExtensionSession.ExtensionCaptureCallback) throws android.hardware.camera2.CameraAccessException; method public void close() throws android.hardware.camera2.CameraAccessException; method @NonNull public android.hardware.camera2.CameraDevice getDevice(); method @Nullable public android.util.Pair<java.lang.Long,java.lang.Long> getRealtimeStillCaptureLatency() throws android.hardware.camera2.CameraAccessException; method public int setRepeatingRequest(@NonNull android.hardware.camera2.CaptureRequest, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraExtensionSession.ExtensionCaptureCallback) throws android.hardware.camera2.CameraAccessException; method public void stopRepeating() throws android.hardware.camera2.CameraAccessException; }
core/java/android/hardware/camera2/CameraExtensionSession.java +27 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,11 @@ package android.hardware.camera2; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.camera2.impl.PublicKey; import android.hardware.camera2.utils.TypeReference; import android.util.Pair; import android.util.Range; import java.util.concurrent.Executor; Loading Loading @@ -423,6 +428,28 @@ public abstract class CameraExtensionSession implements AutoCloseable { throw new UnsupportedOperationException("Subclasses must override this method"); } /** * Return the realtime still {@link #capture} latency. * * <p>The pair will be in milliseconds with the first value indicating the capture latency from * the {@link ExtensionCaptureCallback#onCaptureStarted} until * {@link ExtensionCaptureCallback#onCaptureProcessStarted} * and the second value containing the estimated post-processing latency from * {@link ExtensionCaptureCallback#onCaptureProcessStarted} until the processed frame returns * to the client.</p> * * <p>The estimations will take into account the current environment conditions, the camera * state and will include the time spent processing the multi-frame capture request along with * any additional time for encoding of the processed buffer if necessary.</p> * * @return The realtime still capture latency, * or {@code null} if the estimation is not supported. */ @Nullable public Pair<Long, Long> getRealtimeStillCaptureLatency() throws CameraAccessException { throw new UnsupportedOperationException("Subclasses must override this method"); } /** * Close this capture session asynchronously. * Loading
core/java/android/hardware/camera2/extension/IImageCaptureExtenderImpl.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.extension.CaptureStageImpl; import android.hardware.camera2.extension.ICaptureProcessorImpl; import android.hardware.camera2.extension.LatencyPair; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.Size; import android.hardware.camera2.extension.SizeList; Loading @@ -43,4 +44,5 @@ interface IImageCaptureExtenderImpl CameraMetadataNative getAvailableCaptureRequestKeys(); CameraMetadataNative getAvailableCaptureResultKeys(); boolean isCaptureProcessProgressAvailable(); @nullable LatencyPair getRealtimeCaptureLatency(); }
core/java/android/hardware/camera2/extension/ISessionProcessorImpl.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.extension.CameraSessionConfig; import android.hardware.camera2.extension.ICaptureCallback; import android.hardware.camera2.extension.IRequestProcessorImpl; import android.hardware.camera2.extension.LatencyPair; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.OutputSurface; /** @hide */ Loading @@ -34,4 +36,5 @@ interface ISessionProcessorImpl int startCapture(in ICaptureCallback callback); void setParameters(in CaptureRequest captureRequest); int startTrigger(in CaptureRequest captureRequest, in ICaptureCallback callback); @nullable LatencyPair getRealtimeCaptureLatency(); }
core/java/android/hardware/camera2/extension/LatencyPair.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /** * Copyright (c) 2022, 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. */ package android.hardware.camera2.extension; /** @hide */ parcelable LatencyPair { long first; long second; }