Loading core/java/android/hardware/camera2/CameraExtensionCharacteristics.java +36 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.graphics.ImageFormat; import android.hardware.camera2.extension.IAdvancedExtenderImpl; import android.hardware.camera2.extension.ICameraExtensionsProxyService; import android.hardware.camera2.extension.IImageCaptureExtenderImpl; import android.hardware.camera2.extension.IInitializeSessionCallback; import android.hardware.camera2.extension.IPreviewExtenderImpl; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.SizeList; Loading Loading @@ -357,6 +358,27 @@ public final class CameraExtensionCharacteristics { } } public void initializeSession(IInitializeSessionCallback cb) throws RemoteException { synchronized (mLock) { if (mProxy != null) { mProxy.initializeSession(cb); } } } public void releaseSession() { synchronized (mLock) { if (mProxy != null) { try { mProxy.releaseSession(); } catch (RemoteException e) { Log.e(TAG, "Failed to release session! Extension service does" + " not respond!"); } } } } public boolean areAdvancedExtensionsSupported() { return mSupportsAdvancedExtensions; } Loading Loading @@ -409,6 +431,20 @@ public final class CameraExtensionCharacteristics { CameraExtensionManagerGlobal.get().unregisterClient(clientId); } /** * @hide */ public static void initializeSession(IInitializeSessionCallback cb) throws RemoteException { CameraExtensionManagerGlobal.get().initializeSession(cb); } /** * @hide */ public static void releaseSession() { CameraExtensionManagerGlobal.get().releaseSession(); } /** * @hide */ Loading core/java/android/hardware/camera2/CameraExtensionSession.java +3 −2 Original line number Diff line number Diff line Loading @@ -195,8 +195,9 @@ public abstract class CameraExtensionSession implements AutoCloseable { * This method is called if the session cannot be configured as requested. * * <p>This can happen if the set of requested outputs contains unsupported sizes, * too many outputs are requested at once or the camera device encounters an * unrecoverable error during configuration.</p> * too many outputs are requested at once or when trying to initialize multiple * concurrent extension sessions from two (or more) separate camera devices * or the camera device encounters an unrecoverable error during configuration.</p> * * <p>The session is considered to be closed, and all methods called on it after this * callback is invoked will throw an IllegalStateException.</p> Loading core/java/android/hardware/camera2/CameraManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,9 @@ public final class CameraManager { * <p>The set of combinations may include camera devices that may be in use by other camera API * clients.</p> * * <p>Concurrent camera extension sessions {@link CameraExtensionSession} are not currently * supported.</p> * * <p>The set of combinations doesn't contain physical cameras that can only be used as * part of a logical multi-camera device.</p> * Loading core/java/android/hardware/camera2/extension/ICameraExtensionsProxyService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.camera2.extension; import android.hardware.camera2.extension.IAdvancedExtenderImpl; import android.hardware.camera2.extension.IPreviewExtenderImpl; import android.hardware.camera2.extension.IImageCaptureExtenderImpl; import android.hardware.camera2.extension.IInitializeSessionCallback; /** @hide */ interface ICameraExtensionsProxyService Loading @@ -25,6 +26,8 @@ interface ICameraExtensionsProxyService long registerClient(); void unregisterClient(long clientId); boolean advancedExtensionsSupported(); void initializeSession(in IInitializeSessionCallback cb); void releaseSession(); @nullable IPreviewExtenderImpl initializePreviewExtension(int extensionType); @nullable IImageCaptureExtenderImpl initializeImageExtension(int extensionType); @nullable IAdvancedExtenderImpl initializeAdvancedExtension(int extensionType); Loading core/java/android/hardware/camera2/extension/IInitializeSessionCallback.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /** * Copyright (c) 2021, 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 */ interface IInitializeSessionCallback { void onSuccess(); void onFailure(); } Loading
core/java/android/hardware/camera2/CameraExtensionCharacteristics.java +36 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.graphics.ImageFormat; import android.hardware.camera2.extension.IAdvancedExtenderImpl; import android.hardware.camera2.extension.ICameraExtensionsProxyService; import android.hardware.camera2.extension.IImageCaptureExtenderImpl; import android.hardware.camera2.extension.IInitializeSessionCallback; import android.hardware.camera2.extension.IPreviewExtenderImpl; import android.hardware.camera2.extension.LatencyRange; import android.hardware.camera2.extension.SizeList; Loading Loading @@ -357,6 +358,27 @@ public final class CameraExtensionCharacteristics { } } public void initializeSession(IInitializeSessionCallback cb) throws RemoteException { synchronized (mLock) { if (mProxy != null) { mProxy.initializeSession(cb); } } } public void releaseSession() { synchronized (mLock) { if (mProxy != null) { try { mProxy.releaseSession(); } catch (RemoteException e) { Log.e(TAG, "Failed to release session! Extension service does" + " not respond!"); } } } } public boolean areAdvancedExtensionsSupported() { return mSupportsAdvancedExtensions; } Loading Loading @@ -409,6 +431,20 @@ public final class CameraExtensionCharacteristics { CameraExtensionManagerGlobal.get().unregisterClient(clientId); } /** * @hide */ public static void initializeSession(IInitializeSessionCallback cb) throws RemoteException { CameraExtensionManagerGlobal.get().initializeSession(cb); } /** * @hide */ public static void releaseSession() { CameraExtensionManagerGlobal.get().releaseSession(); } /** * @hide */ Loading
core/java/android/hardware/camera2/CameraExtensionSession.java +3 −2 Original line number Diff line number Diff line Loading @@ -195,8 +195,9 @@ public abstract class CameraExtensionSession implements AutoCloseable { * This method is called if the session cannot be configured as requested. * * <p>This can happen if the set of requested outputs contains unsupported sizes, * too many outputs are requested at once or the camera device encounters an * unrecoverable error during configuration.</p> * too many outputs are requested at once or when trying to initialize multiple * concurrent extension sessions from two (or more) separate camera devices * or the camera device encounters an unrecoverable error during configuration.</p> * * <p>The session is considered to be closed, and all methods called on it after this * callback is invoked will throw an IllegalStateException.</p> Loading
core/java/android/hardware/camera2/CameraManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,9 @@ public final class CameraManager { * <p>The set of combinations may include camera devices that may be in use by other camera API * clients.</p> * * <p>Concurrent camera extension sessions {@link CameraExtensionSession} are not currently * supported.</p> * * <p>The set of combinations doesn't contain physical cameras that can only be used as * part of a logical multi-camera device.</p> * Loading
core/java/android/hardware/camera2/extension/ICameraExtensionsProxyService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.camera2.extension; import android.hardware.camera2.extension.IAdvancedExtenderImpl; import android.hardware.camera2.extension.IPreviewExtenderImpl; import android.hardware.camera2.extension.IImageCaptureExtenderImpl; import android.hardware.camera2.extension.IInitializeSessionCallback; /** @hide */ interface ICameraExtensionsProxyService Loading @@ -25,6 +26,8 @@ interface ICameraExtensionsProxyService long registerClient(); void unregisterClient(long clientId); boolean advancedExtensionsSupported(); void initializeSession(in IInitializeSessionCallback cb); void releaseSession(); @nullable IPreviewExtenderImpl initializePreviewExtension(int extensionType); @nullable IImageCaptureExtenderImpl initializeImageExtension(int extensionType); @nullable IAdvancedExtenderImpl initializeAdvancedExtension(int extensionType); Loading
core/java/android/hardware/camera2/extension/IInitializeSessionCallback.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /** * Copyright (c) 2021, 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 */ interface IInitializeSessionCallback { void onSuccess(); void onFailure(); }