Share via


CameraCharacteristics.AvailableSessionKeys Property

Definition

Returns a subset of #getAvailableCaptureRequestKeys keys that the camera device can pass as part of the capture session initialization.

public System.Collections.Generic.IList<Android.Hardware.Camera2.CaptureRequest.Key>? AvailableSessionKeys { [Android.Runtime.Register("getAvailableSessionKeys", "()Ljava/util/List;", "", ApiSince=28)] get; }
[<get: Android.Runtime.Register("getAvailableSessionKeys", "()Ljava/util/List;", "", ApiSince=28)>]
member this.AvailableSessionKeys : System.Collections.Generic.IList<Android.Hardware.Camera2.CaptureRequest.Key>

Property Value

List of keys that can be passed during capture session initialization. In case the camera device doesn't support such keys the list can be null.

Attributes

Remarks

Returns a subset of #getAvailableCaptureRequestKeys keys that the camera device can pass as part of the capture session initialization.

This list includes keys that are difficult to apply per-frame and can result in unexpected delays when modified during the capture session lifetime. Typical examples include parameters that require a time-consuming hardware re-configuration or internal camera pipeline change. For performance reasons we suggest clients to pass their initial values as part of SessionConfiguration#setSessionParameters. Once the camera capture session is enabled it is also recommended to avoid changing them from their initial values set in SessionConfiguration#setSessionParameters . Control over session parameters can still be exerted in capture requests but clients should be aware and expect delays during their application. An example usage scenario could look like this:

<ul> <li>The camera client starts by querying the session parameter key list via android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys .</li> <li>Before triggering the capture session create sequence, a capture request must be built via CameraDevice#createCaptureRequest using an appropriate template matching the particular use case.</li> <li>The client should go over the list of session parameters and check whether some of the keys listed matches with the parameters that they intend to modify as part of the first capture request.</li> <li>If there is no such match, the capture request can be passed unmodified to SessionConfiguration#setSessionParameters .</li> <li>If matches do exist, the client should update the respective values and pass the request to SessionConfiguration#setSessionParameters .</li> <li>After the capture session initialization completes the session parameter key list can continue to serve as reference when posting or updating further requests. As mentioned above further changes to session parameters should ideally be avoided, if updates are necessary however clients could expect a delay/glitch during the parameter switch.</li> </ul>

The list returned is not modifiable, so any attempts to modify it will throw a UnsupportedOperationException.

Each key is only listed once in the list. The order of the keys is undefined.

Java documentation for android.hardware.camera2.CameraCharacteristics.getAvailableSessionKeys().

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