StreamUseCaseUtil

class StreamUseCaseUtil
kotlin.Any
   ↳ androidx.camera.camera2.internal.StreamUseCaseUtil

A class that contains utility methods for stream use case.

Summary

Public methods
static Long
getStreamUseCaseFromUseCaseConfigs(@NonNull useCaseConfigs: MutableCollection<UseCaseConfig<*>!>, @NonNull sessionConfigs: MutableCollection<SessionConfig!>)

Returns the appropriate stream use case for a capture session based on the attached CameraX use cases.

Public methods

getStreamUseCaseFromUseCaseConfigs

static fun getStreamUseCaseFromUseCaseConfigs(
    @NonNull useCaseConfigs: MutableCollection<UseCaseConfig<*>!>,
    @NonNull sessionConfigs: MutableCollection<SessionConfig!>
): Long

Returns the appropriate stream use case for a capture session based on the attached CameraX use cases. If API level is below 33, return {@value OutputConfigurationCompat#STREAM_USE_CASE_NONE}. If use cases are empty or is ZSL, return DEFAULT. Otherwise, return PREVIEW_VIDEO_STILL for ImageCapture + VideoCapture; return STILL_CAPTURE for ImageCapture; return VIDEO_RECORD for VideoCapture; return VIEW_FINDER for Preview only.

Parameters
useCaseConfigs MutableCollection<UseCaseConfig<*>!>: collection of all attached CameraX use cases for this capture session
sessionConfigs MutableCollection<SessionConfig!>: collection of all session configs for this capture session
Return
Long the appropriate stream use case for this capture session