summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 7b5403f8b..cf5ebdbb1 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -4305,6 +4305,7 @@ public class CaptureModule implements CameraModule, PhotoController,
requestAudioFocus();
try {
mMediaRecorder.start(); // Recording is now started
+ Log.d(TAG, "StartRecordingVideo done.");
} catch (RuntimeException e) {
Toast.makeText(mActivity,"Could not start media recorder.\n " +
"Can't start video recording.", Toast.LENGTH_LONG).show();
@@ -4586,9 +4587,14 @@ public class CaptureModule implements CameraModule, PhotoController,
Log.v(TAG, "pauseVideoRecording");
mMediaRecorderPausing = true;
mRecordingTotalTime += SystemClock.uptimeMillis() - mRecordingStartTime;
+ String value = mSettingsManager.getValue(SettingsManager.KEY_EIS_VALUE);
+ boolean noNeedEndofStreamWhenPause = value != null && value.equals("V3");
// As EIS is not supported for HFR case (>=120 )
// and FOVC also currently don’t require this for >=120 case
- if (mHighSpeedCapture && ((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS)) {
+ // so use noNeedEndOfStreamInHFR to control
+ boolean noNeedEndOfStreamInHFR = mHighSpeedCapture &&
+ ((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS);
+ if (noNeedEndofStreamWhenPause || noNeedEndOfStreamInHFR) {
mMediaRecorder.pause();
} else {
setEndOfStream(false, false);
@@ -4603,6 +4609,7 @@ public class CaptureModule implements CameraModule, PhotoController,
setEndOfStream(true, false);
if (!ApiHelper.HAS_RESUME_SUPPORTED){
mMediaRecorder.start();
+ Log.d(TAG, "StartRecordingVideo done.");
} else {
try {
Method resumeRec = Class.forName("android.media.MediaRecorder").getMethod("resume");
@@ -4625,7 +4632,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
} else {
// is pause or stopRecord
- if (!(mMediaRecorderPausing && mStopRecPending) && (mCurrentSession != null)) {
+ if ((mMediaRecorderPausing || mStopRecPending) && (mCurrentSession != null)) {
mCurrentSession.stopRepeating();
try {
mVideoRequestBuilder.set(CaptureModule.recording_end_stream, (byte) 0x01);
@@ -5286,7 +5293,7 @@ public class CaptureModule implements CameraModule, PhotoController,
if (value != null) {
if (value.equals("V2")) {
mStreamConfigOptMode = STREAM_CONFIG_MODE_QTIEIS_REALTIME;
- } else if (value.equals("V3")) {
+ } else if (value.equals("V3") || value.equals("V3SetWhenPause")) {
mStreamConfigOptMode = STREAM_CONFIG_MODE_QTIEIS_LOOKAHEAD;
}
byte byteValue = (byte) (value.equals("disable") ? 0x00 : 0x01);