mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-02 09:50:17 +02:00
adding some crashfixes, show exceptions thrown at starting recording
This commit is contained in:
parent
f2f330ffd3
commit
9cb353d0b5
@ -608,7 +608,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||
super.onCaptureCompleted(session, request, result)
|
||||
|
||||
if (request.tag == FOCUS_TAG) {
|
||||
mCaptureSession!!.setRepeatingRequest(mPreviewRequestBuilder!!.build(), mCaptureCallback, mBackgroundHandler)
|
||||
mCaptureSession?.setRepeatingRequest(mPreviewRequestBuilder!!.build(), mCaptureCallback, mBackgroundHandler)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -798,6 +798,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||
}
|
||||
|
||||
private fun setupMediaRecorder() {
|
||||
try {
|
||||
val videoSize = getCurrentResolution()
|
||||
mLastVideoPath = mActivity.getOutputMediaFile(false)
|
||||
val rotation = mActivity.windowManager.defaultDisplay.rotation
|
||||
@ -817,6 +818,9 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||
}
|
||||
prepare()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
mActivity.showErrorToast(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun startRecording() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user