feat: Allow build without Skia or Frame Processors (#1710)
* feat: Make Frame Processors optional in JS * Allow Android build without Frame Processors * fix: Fix `EncoderProfiles.width` null-error * Update gradle.properties * Update gradle.properties * fix: Use `#ifdef` instead of `#if` * Update JVisionCameraProxy.cpp * fix: Fix definitions * Revert "fix: Use `#ifdef` instead of `#if`" This reverts commit b19f32e5ce7df558cadcc8c4b5006c9cdf2cbe66. * fix: Fix build * chore: Codestyle * Update JFrameProcessor.cpp
This commit is contained in:
@@ -34,8 +34,10 @@ private fun getMaximumVideoSize(cameraId: String): Size? {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val profiles = CamcorderProfile.getAll(cameraId, CamcorderProfile.QUALITY_HIGH)
|
||||
if (profiles != null) {
|
||||
val largestProfile = profiles.videoProfiles.maxBy { it.width * it.height }
|
||||
return Size(largestProfile.width, largestProfile.height)
|
||||
val largestProfile = profiles.videoProfiles.filterNotNull().maxByOrNull { it.width * it.height }
|
||||
if (largestProfile != null) {
|
||||
return Size(largestProfile.width, largestProfile.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user