stop recording at changing the resolution if needed

This commit is contained in:
tibbi 2018-06-10 22:14:16 +02:00
parent d533b18a91
commit 39c9227844
1 changed files with 3 additions and 0 deletions

View File

@ -827,6 +827,9 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
val videoResolutions = configMap.getOutputSizes(MediaRecorder::class.java).map { MySize(it.width, it.height) } as ArrayList val videoResolutions = configMap.getOutputSizes(MediaRecorder::class.java).map { MySize(it.width, it.height) } as ArrayList
ChangeResolutionDialog(mActivity, mUseFrontCamera, photoResolutions, videoResolutions) { ChangeResolutionDialog(mActivity, mUseFrontCamera, photoResolutions, videoResolutions) {
if (oldResolution != getCurrentResolution()) { if (oldResolution != getCurrentResolution()) {
if (mIsRecording) {
stopRecording()
}
closeCamera() closeCamera()
openCamera(mTextureView.width, mTextureView.height) openCamera(mTextureView.width, mTextureView.height)
} }