Freigeben über


CameraCaptureSession.SwitchToOffline Method

Definition

Switch the current capture session and a given set of registered camera surfaces to offline processing mode.

[Android.Runtime.Register("switchToOffline", "(Ljava/util/Collection;Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraOfflineSession$CameraOfflineSessionCallback;)Landroid/hardware/camera2/CameraOfflineSession;", "GetSwitchToOffline_Ljava_util_Collection_Ljava_util_concurrent_Executor_Landroid_hardware_camera2_CameraOfflineSession_CameraOfflineSessionCallback_Handler", ApiSince=30)]
public virtual Android.Hardware.Camera2.CameraOfflineSession? SwitchToOffline (System.Collections.Generic.ICollection<Android.Views.Surface> offlineSurfaces, Java.Util.Concurrent.IExecutor executor, Android.Hardware.Camera2.CameraOfflineSession.CameraOfflineSessionCallback listener);
[<Android.Runtime.Register("switchToOffline", "(Ljava/util/Collection;Ljava/util/concurrent/Executor;Landroid/hardware/camera2/CameraOfflineSession$CameraOfflineSessionCallback;)Landroid/hardware/camera2/CameraOfflineSession;", "GetSwitchToOffline_Ljava_util_Collection_Ljava_util_concurrent_Executor_Landroid_hardware_camera2_CameraOfflineSession_CameraOfflineSessionCallback_Handler", ApiSince=30)>]
abstract member SwitchToOffline : System.Collections.Generic.ICollection<Android.Views.Surface> * Java.Util.Concurrent.IExecutor * Android.Hardware.Camera2.CameraOfflineSession.CameraOfflineSessionCallback -> Android.Hardware.Camera2.CameraOfflineSession
override this.SwitchToOffline : System.Collections.Generic.ICollection<Android.Views.Surface> * Java.Util.Concurrent.IExecutor * Android.Hardware.Camera2.CameraOfflineSession.CameraOfflineSessionCallback -> Android.Hardware.Camera2.CameraOfflineSession

Parameters

offlineSurfaces
ICollection<Surface>

Client-specified collection of input/output camera registered surfaces that need to be switched to offline mode along with their pending capture requests. Do note that not all camera registered surfaces can be switched to offline mode. Offline processing support for individual surfaces can be queried using #supportsOfflineProcessing. Additionally offline mode switches are not available for shared surfaces OutputConfiguration#enableSurfaceSharing and surfaces as part of a surface group.

executor
IExecutor

The executor which will be used for invoking the offline callback listener.

listener
CameraOfflineSession.CameraOfflineSessionCallback

The callback object to notify for offline session events.

Returns

camera offline session which in case of successful offline switch will move in ready state after clients receive CameraOfflineSessionCallback#onReady. In case the offline switch was not successful clients will receive respective CameraOfflineSessionCallback#onSwitchFailed notification.

Attributes

Remarks

Java documentation for android.hardware.camera2.CameraCaptureSession.switchToOffline(java.util.Collection, java.util.concurrent.Executor, android.hardware.camera2.CameraOfflineSessionCallback).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to