Condividi tramite


CameraDevice.IsSessionConfigurationSupported(SessionConfiguration) Method

Definition

Checks whether a particular SessionConfiguration is supported by the camera device.

[Android.Runtime.Register("isSessionConfigurationSupported", "(Landroid/hardware/camera2/params/SessionConfiguration;)Z", "GetIsSessionConfigurationSupported_Landroid_hardware_camera2_params_SessionConfiguration_Handler", ApiSince=29)]
public virtual bool IsSessionConfigurationSupported (Android.Hardware.Camera2.Params.SessionConfiguration sessionConfig);
[<Android.Runtime.Register("isSessionConfigurationSupported", "(Landroid/hardware/camera2/params/SessionConfiguration;)Z", "GetIsSessionConfigurationSupported_Landroid_hardware_camera2_params_SessionConfiguration_Handler", ApiSince=29)>]
abstract member IsSessionConfigurationSupported : Android.Hardware.Camera2.Params.SessionConfiguration -> bool
override this.IsSessionConfigurationSupported : Android.Hardware.Camera2.Params.SessionConfiguration -> bool

Parameters

sessionConfig
SessionConfiguration

Returns

true if the given session configuration is supported by the camera device false otherwise.

Attributes

Remarks

Checks whether a particular SessionConfiguration is supported by the camera device.

This method performs a runtime check of a given SessionConfiguration. The result confirms whether or not the passed session configuration can be successfully used to create a camera capture session using CameraDevice#createCaptureSession( android.hardware.camera2.params.SessionConfiguration).

The method can be called at any point before, during and after active capture session. It must 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 stream combinations. The available mandatory stream combinations android.hardware.camera2.params.MandatoryStreamCombination are better suited for this purpose.

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

Java documentation for android.hardware.camera2.CameraDevice.isSessionConfigurationSupported(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