use the resolution index instead of the qualities

- store and use the resolution index in Config class for video capture
This commit is contained in:
darthpaul
2022-07-13 01:38:54 +01:00
parent d8ea6d5175
commit 210f3e35c0
4 changed files with 15 additions and 28 deletions

View File

@ -223,7 +223,7 @@ class CameraXPreview(
private fun buildVideoCapture(): VideoCapture<Recorder> {
val qualitySelector = QualitySelector.from(
videoQualityManager.getUserSelectedQuality(cameraSelector),
FallbackStrategy.lowerQualityOrHigherThan(Quality.SD),
FallbackStrategy.higherQualityOrLowerThan(Quality.SD),
)
val recorder = Recorder.Builder()
.setQualitySelector(qualitySelector)