Skip to content

Commit

Permalink
Implement FPS functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
MHShetty committed Jun 7, 2024
1 parent 278228a commit 8427d99
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/src/main/java/app/grapheneos/camera/CamConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,15 @@ class CamConfig(private val mActivity: MainActivity) {
View.VISIBLE
}

videoCapture =
VideoCapture.withOutput(
Recorder.Builder()
.setQualitySelector(QualitySelector.from(videoQuality))
.build()
)
val videoCaptureBuilder = VideoCapture.Builder(
Recorder.Builder()
.setQualitySelector(QualitySelector.from(videoQuality))
.build()
)

videoCaptureBuilder.setTargetFrameRate(mActivity.camConfig.videoFrameRate)

videoCapture = videoCaptureBuilder.build()

useCaseGroupBuilder.addUseCase(videoCapture!!)
}
Expand Down

0 comments on commit 8427d99

Please sign in to comment.