Udostępnij za pośrednictwem


CameraManager.IsConcurrentSessionConfigurationSupported Method

Definition

Checks whether the provided set of camera devices and their corresponding SessionConfiguration can be configured concurrently.

[Android.Runtime.Register("isConcurrentSessionConfigurationSupported", "(Ljava/util/Map;)Z", "", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.CAMERA")]
public bool IsConcurrentSessionConfigurationSupported (System.Collections.Generic.IDictionary<string,Android.Hardware.Camera2.Params.SessionConfiguration> cameraIdAndSessionConfig);
[<Android.Runtime.Register("isConcurrentSessionConfigurationSupported", "(Ljava/util/Map;)Z", "", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.CAMERA")>]
member this.IsConcurrentSessionConfigurationSupported : System.Collections.Generic.IDictionary<string, Android.Hardware.Camera2.Params.SessionConfiguration> -> bool

Parameters

cameraIdAndSessionConfig
IDictionary<String,SessionConfiguration>

Returns

true if the given combination of session configurations and corresponding camera ids are concurrently supported by the camera sub-system, false otherwise OR if the set of camera devices provided is not a subset of those returned by #getConcurrentCameraIds.

Attributes

Remarks

Checks whether the provided set of camera devices and their corresponding SessionConfiguration can be configured concurrently.

This method performs a runtime check of the given SessionConfiguration and camera id combinations. The result confirms whether or not the passed session configurations can be successfully used to create camera capture sessions concurrently, on the given camera devices using CameraDevice#createCaptureSession(SessionConfiguration).

The method can be called at any point before, during and after active capture sessions. It will not impact normal camera behavior in any way and must complete significantly faster than creating a regular or constrained capture session.

Although this method is faster than creating a new capture session, it is not intended to be used for exploring the entire space of supported concurrent stream combinations. The available mandatory concurrent stream combinations may be obtained by querying #getCameraCharacteristics for the key android.hardware.camera2.CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS.

Note that session parameters will be ignored and calls to SessionConfiguration#setSessionParameters are not required.

Java documentation for android.hardware.camera2.CameraManager.isConcurrentSessionConfigurationSupported(java.util.Map<java.lang.String, android.hardware.camera2.params.SessionConfiguration>).

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