CameraDevice.CameraDeviceSetup.GetSessionCharacteristics Method

Definition

Get camera characteristics for a particular session configuration for this camera device.

[Android.Runtime.Register("getSessionCharacteristics", "(Landroid/hardware/camera2/params/SessionConfiguration;)Landroid/hardware/camera2/CameraCharacteristics;", "GetGetSessionCharacteristics_Landroid_hardware_camera2_params_SessionConfiguration_Handler", ApiSince=35)]
public abstract Android.Hardware.Camera2.CameraCharacteristics GetSessionCharacteristics (Android.Hardware.Camera2.Params.SessionConfiguration sessionConfig);
[<Android.Runtime.Register("getSessionCharacteristics", "(Landroid/hardware/camera2/params/SessionConfiguration;)Landroid/hardware/camera2/CameraCharacteristics;", "GetGetSessionCharacteristics_Landroid_hardware_camera2_params_SessionConfiguration_Handler", ApiSince=35)>]
abstract member GetSessionCharacteristics : Android.Hardware.Camera2.Params.SessionConfiguration -> Android.Hardware.Camera2.CameraCharacteristics

Parameters

sessionConfig
SessionConfiguration

The session configuration for which characteristics are fetched.

Returns

CameraCharacteristics specific to a given session configuration.

Attributes

Remarks

Get camera characteristics for a particular session configuration for this camera device.

The camera characteristics returned by this method are different from those returned from CameraManager#getCameraCharacteristics. The characteristics returned here reflect device capabilities more accurately if the device were to be configured with sessionConfig. The keys that may get updated are listed in CameraCharacteristics#getAvailableSessionCharacteristicsKeys.

Other than that, the characteristics returned here can be used in the same way as those returned from CameraManager#getCameraCharacteristics.

To optimize latency, the application can call this method before acquiring valid android.view.SurfaceView, android.graphics.SurfaceTexture, android.media.MediaRecorder, android.media.MediaCodec, or android.media.ImageReader surfaces. For android.view.SurfaceView, android.graphics.SurfaceTexture, android.media.MediaRecorder, and android.media.MediaCodec, the application can call OutputConfiguration#OutputConfiguration(Size, Class). For android.media.ImageReader, the application can call OutputConfiguration#OutputConfiguration(int, Size), OutputConfiguration#OutputConfiguration(int, int, Size), OutputConfiguration#OutputConfiguration(int, Size, long), or OutputConfiguration#OutputConfiguration(int, int, Size, long). The SessionConfiguration can then be created using the OutputConfiguration objects and be used for this function. To create the CameraCaptureSession, the application still needs to make sure all output surfaces are added via OutputConfiguration#addSurface with the exception of deferred surfaces for android.view.SurfaceView and android.graphics.SurfaceTexture.

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