OutputConfiguration.StreamUseCase Property

Definition

Get the current stream use case -or- Set stream use case for this OutputConfiguration

public long StreamUseCase { [Android.Runtime.Register("getStreamUseCase", "()J", "", ApiSince=33)] get; [Android.Runtime.Register("setStreamUseCase", "(J)V", "", ApiSince=33)] set; }
[<get: Android.Runtime.Register("getStreamUseCase", "()J", "", ApiSince=33)>]
[<set: Android.Runtime.Register("setStreamUseCase", "(J)V", "", ApiSince=33)>]
member this.StreamUseCase : int64 with get, set

Property Value

the currently set stream use case

Attributes

Remarks

Property getter documentation:

Get the current stream use case

If no #setStreamUseCase is called first, this function returns CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT DEFAULT.

Java documentation for android.hardware.camera2.params.OutputConfiguration.getStreamUseCase().

Property setter documentation:

Set stream use case for this OutputConfiguration

Stream use case is used to describe the purpose of the stream, whether it's for live preview, still image capture, video recording, or their combinations. This flag is useful for scenarios where the immediate consumer target isn't sufficient to indicate the stream's usage.

The main difference between stream use case and capture intent is that the former enables the camera device to optimize camera hardware and software pipelines based on user scenarios for each stream, whereas the latter is mainly a hint to camera to decide optimal 3A strategy that's applicable to the whole session. The camera device carries out configurations such as selecting tuning parameters, choosing camera sensor mode, and constructing image processing pipeline based on the streams's use cases. Capture intents are then used to fine tune 3A behaviors such as adjusting AE/AF convergence speed, and capture intents may change during the lifetime of a session. For example, for a session with a PREVIEW_VIDEO_STILL use case stream and a STILL_CAPTURE use case stream, the capture intents may be PREVIEW with fast 3A convergence speed and flash metering with automatic control for live preview, STILL_CAPTURE with best 3A parameters for still photo capture, or VIDEO_RECORD with slower 3A convergence speed for better video playback experience.

The supported stream use cases supported by a camera device can be queried by android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES.

The mandatory stream combinations involving stream use cases can be found at android.hardware.camera2.CameraDevice#createCaptureSession, as well as queried via android.hardware.camera2.params.MandatoryStreamCombination. The application is strongly recommended to select one of the guaranteed stream combinations where all streams' use cases are set to non-DEFAULT values. If the application chooses a stream combination not in the mandatory list, the camera device may ignore some use case flags due to hardware constraints or implementation details.

This function must be called before CameraDevice#createCaptureSession or CameraDevice#createCaptureSessionByOutputConfigurations. Calling this function after CameraDevice#createCaptureSession or CameraDevice#createCaptureSessionByOutputConfigurations has no effect to the camera session.

Java documentation for android.hardware.camera2.params.OutputConfiguration.setStreamUseCase(long).

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