Created
February 22, 2022 22:42
-
-
Save ggfan/1ac911fc1fae81dd29d845d12dbdc5bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@androidx.annotation.OptIn(ExperimentalCamera2Interop::class) | |
val cameraSelector = CameraSelector.Builder() | |
.addCameraFilter { | |
it.filter { camInfo -> | |
val level = Camera2CameraInfo.from(camInfo) | |
.getCameraCharacteristic( | |
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL | |
) | |
level == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 | |
} | |
}.build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment