summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r--src/com/android/camera/VideoModule.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 7d7120953..84273dbda 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -317,6 +317,7 @@ public class VideoModule implements CameraModule,
private boolean mUnsupportedHSRVideoSize = false;
private boolean mUnsupportedHFRVideoCodec = false;
private String mDefaultAntibanding = null;
+ boolean mUnsupportedProfile = false;
// This Handler is used to post message back onto the main thread of the
// application
@@ -824,6 +825,12 @@ public class VideoModule implements CameraModule,
mCaptureTimeLapse = (mTimeBetweenTimeLapseFrameCaptureMs != 0);
// TODO: This should be checked instead directly +1000.
if (mCaptureTimeLapse) quality += 1000;
+ mUnsupportedProfile = false;
+ boolean hasProfile = CamcorderProfile.hasProfile(quality);
+ if (!hasProfile) {
+ mUnsupportedProfile = true;
+ return;
+ }
mProfile = CamcorderProfile.get(mCameraId, quality);
getDesiredPreviewSize();
qcomReadVideoPreferences();
@@ -1632,6 +1639,13 @@ public class VideoModule implements CameraModule,
mStartRecPending = false;
return;
}
+ if (mUnsupportedProfile == true) {
+ Log.e(TAG, "Unsupported video profile");
+ RotateTextToast.makeText(mActivity, R.string.error_app_unsupported_profile,
+ Toast.LENGTH_SHORT).show();
+ mStartRecPending = false;
+ return;
+ }
//??
//if (!mCameraDevice.waitDone()) return;
mCurrentVideoUri = null;