summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlok Kediya <kediya@codeaurora.org>2013-09-28 16:03:47 +0530
committerLinux Build Service Account <lnxbuild@localhost>2013-10-31 19:39:21 -0600
commite111d53de4f9b40ef024deb8af7a0dc0f20e5398 (patch)
treeebcc07acbdeb88ca2baf4c0f8d3b773488c098cb
parent0dc64ffddb06d0b41e65f10c742caec52e8b0436 (diff)
downloadandroid_packages_apps_Snap-e111d53de4f9b40ef024deb8af7a0dc0f20e5398.tar.gz
android_packages_apps_Snap-e111d53de4f9b40ef024deb8af7a0dc0f20e5398.tar.bz2
android_packages_apps_Snap-e111d53de4f9b40ef024deb8af7a0dc0f20e5398.zip
Camera: Video HDR Feature Integration
Add Video HDR support on UI. (cherrypicked from commit 423f0e277390cd4cbb87c89d063820ad0a953631) Change-Id: I14d2a7002fbaa4859ceb19317490e8843786ce35 (cherry picked from commit b2afb0f26563599e65564dea9605c7bc7d8aa29c) (cherry picked from commit a31228372a155dc1c02c7fb0669ea350c55c661d)
-rw-r--r--res/xml/video_preferences.xml6
-rw-r--r--src/com/android/camera/CameraSettings.java7
-rw-r--r--src/com/android/camera/VideoMenu.java1
-rw-r--r--src/com/android/camera/VideoModule.java10
4 files changed, 24 insertions, 0 deletions
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 8fecb7116..af9e8501b 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -109,6 +109,12 @@
camera:entries="@array/pref_camera_hfr_entries"
camera:entryValues="@array/pref_camera_hfr_entryvalues"/>
<ListPreference
+ camera:key="pref_camera_video_hdr_key"
+ camera:defaultValue="@string/pref_camera_video_hdr_default"
+ camera:title="@string/pref_camera_video_hdr_title"
+ camera:entries="@array/pref_camera_video_hdr_entries"
+ camera:entryValues="@array/pref_camera_video_hdr_entryvalues"/>
+ <ListPreference
camera:key="pref_camera_videosnapsize_key"
camera:defaultValue="@string/pref_camera_videosnapsize_default"
camera:title="@string/pref_camera_picturesize_title"
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 9cfb7750d..1049e54f9 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -94,6 +94,7 @@ public class CameraSettings {
public static final String KEY_VIDEO_SNAPSHOT_SIZE = "pref_camera_videosnapsize_key";
public static final String KEY_VIDEO_HIGH_FRAME_RATE = "pref_camera_hfr_key";
+ public static final String KEY_VIDEO_HDR = "pref_camera_video_hdr_key";
public static final String DEFAULT_VIDEO_QUALITY_VALUE = "custom";
public static final String KEY_SKIN_TONE_ENHANCEMENT = "pref_camera_skinToneEnhancement_key";
public static final String KEY_SKIN_TONE_ENHANCEMENT_FACTOR = "pref_camera_skinToneEnhancement_factor_key";
@@ -218,6 +219,7 @@ public class CameraSettings {
ListPreference hdr = group.findPreference(KEY_AE_BRACKET_HDR);
ListPreference jpegQuality = group.findPreference(KEY_JPEG_QUALITY);
ListPreference videoSnapSize = group.findPreference(KEY_VIDEO_SNAPSHOT_SIZE);
+ ListPreference videoHdr = group.findPreference(KEY_VIDEO_HDR);
if (touchAfAec != null) {
@@ -245,6 +247,11 @@ public class CameraSettings {
denoise, mParameters.getSupportedDenoiseModes());
}
+ if (videoHdr != null) {
+ filterUnsupportedOptions(group,
+ videoHdr, mParameters.getSupportedVideoHDRModes());
+ }
+
if (colorEffect != null) {
filterUnsupportedOptions(group,
colorEffect, mParameters.getSupportedColorEffects());
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index afe8d312e..12e6970b3 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -76,6 +76,7 @@ public class VideoMenu extends PieController
//settings popup
mOtherKeys2 = new String[] {
CameraSettings.KEY_COLOR_EFFECT,
+ CameraSettings.KEY_VIDEO_HDR,
CameraSettings.KEY_POWER_MODE,
CameraSettings.KEY_WHITE_BALANCE,
CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE,
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index c40e98760..28ee4ced3 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1673,9 +1673,19 @@ public class VideoModule implements CameraModule,
mParameters.setVideoHighFrameRate(HighFrameRate);
} else
mParameters.setVideoHighFrameRate("off");
+ // Set Video HDR.
+ String videoHDR = mPreferences.getString(
+ CameraSettings.KEY_VIDEO_HDR,
+ mActivity.getString(R.string.pref_camera_video_hdr_default));
+ Log.v(TAG, "Video HDR Setting =" + videoHDR);
+ if (isSupported(videoHDR, mParameters.getSupportedVideoHDRModes())) {
+ mParameters.setVideoHDRMode(videoHDR);
+ } else
+ mParameters.setVideoHDRMode("off");
}
@SuppressWarnings("deprecation")
private void setCameraParameters() {
+ Log.d(TAG,"Preview dimension in App->"+mDesiredPreviewWidth+"X"+mDesiredPreviewHeight);
mParameters.setPreviewSize(mDesiredPreviewWidth, mDesiredPreviewHeight);
int[] fpsRange = CameraUtil.getMaxPreviewFpsRange(mParameters);
if (fpsRange.length > 0) {