summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jni/feature_mos_jni.cpp21
-rw-r--r--res/drawable-hdpi/ic_exposure_holo_light.pngbin0 -> 843 bytes
-rw-r--r--res/drawable-hdpi/ic_time_lapse_holo_dark.pngbin1708 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_1.pngbin0 -> 1059 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_10.pngbin0 -> 1144 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_1_5.pngbin0 -> 1166 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_2.pngbin0 -> 1098 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_2_5.pngbin0 -> 1211 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_3.pngbin0 -> 1114 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_5.pngbin0 -> 1111 bytes
-rw-r--r--res/drawable-hdpi/ic_timelapse_none.pngbin0 -> 1054 bytes
-rw-r--r--res/drawable-mdpi/ic_exposure_holo_light.pngbin0 -> 687 bytes
-rw-r--r--res/drawable-mdpi/ic_time_lapse_holo_dark.pngbin953 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_1.pngbin0 -> 770 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_10.pngbin0 -> 822 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_1_5.pngbin0 -> 850 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_2.pngbin0 -> 806 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_2_5.pngbin0 -> 872 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_3.pngbin0 -> 805 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_5.pngbin0 -> 801 bytes
-rw-r--r--res/drawable-mdpi/ic_timelapse_none.pngbin0 -> 772 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_exposure_holo_light.pngbin0 -> 1057 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_1.pngbin0 -> 1554 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_10.pngbin0 -> 1685 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_1_5.pngbin0 -> 1843 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_2.pngbin0 -> 1650 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_2_5.pngbin0 -> 1916 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_3.pngbin0 -> 1704 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_5.pngbin0 -> 1731 bytes
-rw-r--r--res/drawable-w1024dp-hdpi/ic_timelapse_none.pngbin0 -> 1512 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_exposure_holo_light.pngbin0 -> 880 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_time_lapse_holo_dark.pngbin2153 -> 0 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_1.pngbin0 -> 1130 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_10.pngbin0 -> 1225 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_1_5.pngbin0 -> 1260 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_2.pngbin0 -> 1188 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_2_5.pngbin0 -> 1327 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_3.pngbin0 -> 1229 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_5.pngbin0 -> 1226 bytes
-rw-r--r--res/drawable-w1024dp-mdpi/ic_timelapse_none.pngbin0 -> 1129 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_exposure_holo_light.pngbin0 -> 1383 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_1.pngbin0 -> 2089 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_10.pngbin0 -> 2357 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_1_5.pngbin0 -> 2535 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_2.pngbin0 -> 2335 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_2_5.pngbin0 -> 2743 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_3.pngbin0 -> 2366 bytes
-rw-r--r--res/drawable-w1024dp-xhdpi/ic_timelapse_none.pngbin0 -> 2052 bytes
-rw-r--r--res/drawable-xhdpi/ic_exposure_holo_light.pngbin0 -> 1000 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_1.pngbin0 -> 1361 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_10.pngbin0 -> 1519 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_1_5.pngbin0 -> 1571 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_2.pngbin0 -> 1487 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_2_5.pngbin0 -> 1668 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_3.pngbin0 -> 1497 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_5.pngbin0 -> 1506 bytes
-rw-r--r--res/drawable-xhdpi/ic_timelapse_none.pngbin0 -> 1360 bytes
-rw-r--r--res/layout-w1024dp/preview_frame_video.xml32
-rw-r--r--res/layout/preview_frame_video.xml30
-rw-r--r--res/values/arrays.xml12
-rw-r--r--res/values/styles.xml3
-rw-r--r--res/xml/camera_preferences.xml5
-rw-r--r--res/xml/video_preferences.xml2
-rw-r--r--src/com/android/camera/EffectsRecorder.java35
-rw-r--r--src/com/android/camera/VideoCamera.java16
-rw-r--r--src/com/android/camera/ui/IndicatorControlBarContainer.java20
-rw-r--r--src/com/android/camera/ui/IndicatorControlContainer.java5
-rw-r--r--src/com/android/camera/ui/IndicatorControlWheelContainer.java8
68 files changed, 132 insertions, 57 deletions
diff --git a/jni/feature_mos_jni.cpp b/jni/feature_mos_jni.cpp
index db9fd7d..e3fdea5 100644
--- a/jni/feature_mos_jni.cpp
+++ b/jni/feature_mos_jni.cpp
@@ -38,15 +38,14 @@ extern "C" {
char buffer[1024];
-const int MAX_FRAMES_HR = 100;
-const int MAX_FRAMES_LR = 200;
+const int MAX_FRAMES = 100;
static double mTx;
int tWidth[NR];
int tHeight[NR];
-ImageType tImage[NR][MAX_FRAMES_LR];// = {{ImageUtils::IMAGE_TYPE_NOIMAGE}}; // YVU24 format image
+ImageType tImage[NR][MAX_FRAMES];// = {{ImageUtils::IMAGE_TYPE_NOIMAGE}}; // YVU24 format image
Mosaic *mosaic[NR] = {NULL,NULL};
ImageType resultYVU = ImageUtils::IMAGE_TYPE_NOIMAGE;
ImageType resultBGR = ImageUtils::IMAGE_TYPE_NOIMAGE;
@@ -283,13 +282,10 @@ JNIEXPORT void JNICALL Java_com_android_camera_panorama_Mosaic_allocateMosaicMem
tWidth[LR] = int(width / H2L_FACTOR);
tHeight[LR] = int(height / H2L_FACTOR);
- for(int i=0; i<MAX_FRAMES_LR; i++)
+ for(int i=0; i<MAX_FRAMES; i++)
{
tImage[LR][i] = ImageUtils::allocateImage(tWidth[LR], tHeight[LR],
ImageUtils::IMAGE_TYPE_NUM_CHANNELS);
- }
- for(int i=0; i<MAX_FRAMES_HR; i++)
- {
tImage[HR][i] = ImageUtils::allocateImage(tWidth[HR], tHeight[HR],
ImageUtils::IMAGE_TYPE_NUM_CHANNELS);
}
@@ -300,12 +296,9 @@ JNIEXPORT void JNICALL Java_com_android_camera_panorama_Mosaic_allocateMosaicMem
JNIEXPORT void JNICALL Java_com_android_camera_panorama_Mosaic_freeMosaicMemory(
JNIEnv* env, jobject thiz)
{
- for(int i = 0; i < MAX_FRAMES_LR; i++)
+ for(int i = 0; i < MAX_FRAMES; i++)
{
ImageUtils::freeImage(tImage[LR][i]);
- }
- for(int i = 0; i < MAX_FRAMES_HR; i++)
- {
ImageUtils::freeImage(tImage[HR][i]);
}
@@ -375,7 +368,7 @@ JNIEXPORT jfloatArray JNICALL Java_com_android_camera_panorama_Mosaic_setSourceI
t0 = now_ms();
int ret_code;
- if(frame_number_HR<MAX_FRAMES_HR && frame_number_LR<MAX_FRAMES_LR)
+ if(frame_number_HR<MAX_FRAMES && frame_number_LR<MAX_FRAMES)
{
double last_tx = mTx;
@@ -428,7 +421,7 @@ JNIEXPORT jfloatArray JNICALL Java_com_android_camera_panorama_Mosaic_setSourceI
int ret_code;
- if(frame_number_HR<MAX_FRAMES_HR && frame_number_LR<MAX_FRAMES_LR)
+ if(frame_number_HR<MAX_FRAMES && frame_number_LR<MAX_FRAMES)
{
jbyte *pixels = env->GetByteArrayElements(photo_data, 0);
@@ -501,7 +494,7 @@ JNIEXPORT void JNICALL Java_com_android_camera_panorama_Mosaic_reset(
gCancelComputation[LR] = false;
gCancelComputation[HR] = false;
- Init(LR,MAX_FRAMES_LR);
+ Init(LR,MAX_FRAMES);
}
JNIEXPORT jint JNICALL Java_com_android_camera_panorama_Mosaic_reportProgress(
diff --git a/res/drawable-hdpi/ic_exposure_holo_light.png b/res/drawable-hdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..8307baa
--- /dev/null
+++ b/res/drawable-hdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_time_lapse_holo_dark.png b/res/drawable-hdpi/ic_time_lapse_holo_dark.png
deleted file mode 100644
index f71c456..0000000
--- a/res/drawable-hdpi/ic_time_lapse_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_1.png b/res/drawable-hdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..0fa1f3d
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_10.png b/res/drawable-hdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..e168279
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_1_5.png b/res/drawable-hdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..9e5e32b
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_2.png b/res/drawable-hdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..25889b6
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_2_5.png b/res/drawable-hdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..40ea506
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_3.png b/res/drawable-hdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..3aa85cb
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_5.png b/res/drawable-hdpi/ic_timelapse_5.png
new file mode 100644
index 0000000..1e5b3af
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_5.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_timelapse_none.png b/res/drawable-hdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..91193ac
--- /dev/null
+++ b/res/drawable-hdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_exposure_holo_light.png b/res/drawable-mdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..0d916f9
--- /dev/null
+++ b/res/drawable-mdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_time_lapse_holo_dark.png b/res/drawable-mdpi/ic_time_lapse_holo_dark.png
deleted file mode 100644
index ecf3f74..0000000
--- a/res/drawable-mdpi/ic_time_lapse_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_1.png b/res/drawable-mdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..fa50e0c
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_10.png b/res/drawable-mdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..dd75068
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_1_5.png b/res/drawable-mdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..a40e530
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_2.png b/res/drawable-mdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..ea7075e
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_2_5.png b/res/drawable-mdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..99a2151
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_3.png b/res/drawable-mdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..992b779
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_5.png b/res/drawable-mdpi/ic_timelapse_5.png
new file mode 100644
index 0000000..7a7eb3a
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_5.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_timelapse_none.png b/res/drawable-mdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..09f0a1a
--- /dev/null
+++ b/res/drawable-mdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_exposure_holo_light.png b/res/drawable-w1024dp-hdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..0285708
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_1.png b/res/drawable-w1024dp-hdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..97aa325
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_10.png b/res/drawable-w1024dp-hdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..56652c3
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_1_5.png b/res/drawable-w1024dp-hdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..80aeecd
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_2.png b/res/drawable-w1024dp-hdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..bbc0cf2
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_2_5.png b/res/drawable-w1024dp-hdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..0de667d
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_3.png b/res/drawable-w1024dp-hdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..64c7187
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_5.png b/res/drawable-w1024dp-hdpi/ic_timelapse_5.png
new file mode 100644
index 0000000..e11ae4b
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-hdpi/ic_timelapse_none.png b/res/drawable-w1024dp-hdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..aae1eb9
--- /dev/null
+++ b/res/drawable-w1024dp-hdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_exposure_holo_light.png b/res/drawable-w1024dp-mdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..5ba7530
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_time_lapse_holo_dark.png b/res/drawable-w1024dp-mdpi/ic_time_lapse_holo_dark.png
deleted file mode 100644
index 2bb9c57..0000000
--- a/res/drawable-w1024dp-mdpi/ic_time_lapse_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_1.png b/res/drawable-w1024dp-mdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..555846f
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_10.png b/res/drawable-w1024dp-mdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..b0d1f2b
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_1_5.png b/res/drawable-w1024dp-mdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..1b15630
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_2.png b/res/drawable-w1024dp-mdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..ea99e6e
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_2_5.png b/res/drawable-w1024dp-mdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..b7160a1
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_3.png b/res/drawable-w1024dp-mdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..ce42c43
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_5.png b/res/drawable-w1024dp-mdpi/ic_timelapse_5.png
new file mode 100644
index 0000000..3222564
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-mdpi/ic_timelapse_none.png b/res/drawable-w1024dp-mdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..afc8210
--- /dev/null
+++ b/res/drawable-w1024dp-mdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_exposure_holo_light.png b/res/drawable-w1024dp-xhdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..078925d
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_1.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..291a22b
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_10.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..09ae468
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_1_5.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..4304281
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_2.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..2101bd4
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_2_5.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..a2d62d1
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_3.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..100ab32
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-w1024dp-xhdpi/ic_timelapse_none.png b/res/drawable-w1024dp-xhdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..eecb9a5
--- /dev/null
+++ b/res/drawable-w1024dp-xhdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_exposure_holo_light.png b/res/drawable-xhdpi/ic_exposure_holo_light.png
new file mode 100644
index 0000000..85d6f56
--- /dev/null
+++ b/res/drawable-xhdpi/ic_exposure_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_1.png b/res/drawable-xhdpi/ic_timelapse_1.png
new file mode 100644
index 0000000..7143a6d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_1.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_10.png b/res/drawable-xhdpi/ic_timelapse_10.png
new file mode 100644
index 0000000..f81164a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_10.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_1_5.png b/res/drawable-xhdpi/ic_timelapse_1_5.png
new file mode 100644
index 0000000..62932aa
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_1_5.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_2.png b/res/drawable-xhdpi/ic_timelapse_2.png
new file mode 100644
index 0000000..51cb628
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_2.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_2_5.png b/res/drawable-xhdpi/ic_timelapse_2_5.png
new file mode 100644
index 0000000..d49bf64
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_2_5.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_3.png b/res/drawable-xhdpi/ic_timelapse_3.png
new file mode 100644
index 0000000..7f85a57
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_3.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_5.png b/res/drawable-xhdpi/ic_timelapse_5.png
new file mode 100644
index 0000000..14e7ea5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_5.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_timelapse_none.png b/res/drawable-xhdpi/ic_timelapse_none.png
new file mode 100644
index 0000000..93a172b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_timelapse_none.png
Binary files differ
diff --git a/res/layout-w1024dp/preview_frame_video.xml b/res/layout-w1024dp/preview_frame_video.xml
index 555f55d..a125187 100644
--- a/res/layout-w1024dp/preview_frame_video.xml
+++ b/res/layout-w1024dp/preview_frame_video.xml
@@ -27,22 +27,28 @@
<SurfaceView android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <LinearLayout android:id="@+id/labels"
+ <com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_margin="20dp"
android:layout_alignParentTop="true"
- android:layout_alignParentRight="true">
- <TextView android:id="@+id/time_lapse_label"
- android:text="@string/time_lapse_title"
- style="@style/OnViewfinderLabel"
- android:visibility="gone" />
- <TextView android:id="@+id/recording_time"
- style="@style/OnViewfinderLabel"
- android:gravity="center"
- android:drawableLeft="@drawable/ic_recording_indicator_small"
- android:drawablePadding="5dp"
- android:visibility="gone" />
- </LinearLayout>
+ android:layout_alignParentLeft="true">
+
+ <LinearLayout android:id="@+id/labels"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/time_lapse_label"
+ android:text="@string/time_lapse_title"
+ style="@style/OnViewfinderLabel"
+ android:visibility="gone" />
+ <TextView android:id="@+id/recording_time"
+ style="@style/OnViewfinderLabel"
+ android:gravity="center"
+ android:drawableLeft="@drawable/ic_recording_indicator_small"
+ android:drawablePadding="5dp"
+ android:visibility="gone"/>
+ </LinearLayout>
+ </com.android.camera.ui.RotateLayout>
<ImageView android:id="@+id/review_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml
index 92849df..f80ffe3 100644
--- a/res/layout/preview_frame_video.xml
+++ b/res/layout/preview_frame_video.xml
@@ -27,20 +27,26 @@
<SurfaceView android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
- <!-- Note: In this TextView the paddingRight="2"
- attribute is required because otherwise the
- text's drop shadow will be clipped. -->
- <TextView android:id="@+id/recording_time"
- style="@style/RecordingTime"
- android:drawablePadding="8dp"
- android:drawableLeft="@drawable/ic_recording_indicator"
- android:layout_width="300dp"
+ <com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="left|bottom"
- android:layout_marginBottom="13dp"
+ android:layout_marginTop="13dp"
android:layout_marginLeft="17dp"
- android:paddingRight="2dp"
- android:visibility="gone"/>
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true">
+
+ <!-- Note: In this TextView the paddingRight="2"
+ attribute is required because otherwise the
+ text's drop shadow will be clipped. -->
+ <TextView android:id="@+id/recording_time"
+ style="@style/RecordingTime"
+ android:drawablePadding="8dp"
+ android:drawableLeft="@drawable/ic_recording_indicator"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="2dp"
+ android:visibility="gone"/>
+ </com.android.camera.ui.RotateLayout>
<ImageView android:id="@+id/review_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 854bc22..d5bf75f 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -38,6 +38,18 @@
<item>@drawable/ic_viewfinder_video_quality_480p</item>
</array>
+ <!-- Video Preferences Time Lapse Frame Interval icons -->
+ <array name="video_timelapse_largeicons" translatable="false">
+ <item>@drawable/ic_timelapse_none</item>
+ <item>@drawable/ic_timelapse_1</item>
+ <item>@drawable/ic_timelapse_1_5</item>
+ <item>@drawable/ic_timelapse_2</item>
+ <item>@drawable/ic_timelapse_2_5</item>
+ <item>@drawable/ic_timelapse_3</item>
+ <item>@drawable/ic_timelapse_5</item>
+ <item>@drawable/ic_timelapse_10</item>
+ </array>
+
<!-- Camera Preferences Time Lapse Frame Interval entries -->
<string-array name="pref_video_time_lapse_frame_interval_entries" translatable="false">
<item>@string/pref_camera_recordlocation_entry_off</item>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8a01313..05eb0c1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -146,8 +146,7 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:singleLine">true</item>
- <item name="android:layout_marginRight">20dp</item>
- <item name="android:layout_marginTop">20dp</item>
+ <item name="android:layout_margin">10dp</item>
<item name="android:paddingLeft">15dp</item>
<item name="android:paddingRight">15dp</item>
<item name="android:paddingTop">3dp</item>
diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml
index aa1882f..feaa0b0 100644
--- a/res/xml/camera_preferences.xml
+++ b/res/xml/camera_preferences.xml
@@ -25,10 +25,11 @@
camera:largeIcons="@array/camera_flashmode_largeicons"
camera:entries="@array/pref_camera_flashmode_entries"
camera:entryValues="@array/pref_camera_flashmode_entryvalues" />
- <ListPreference
+ <IconListPreference
camera:key="pref_camera_exposure_key"
camera:defaultValue="@string/pref_exposure_default"
- camera:title="@string/pref_exposure_title" />
+ camera:title="@string/pref_exposure_title"
+ camera:singleIcon="@drawable/ic_exposure_holo_light" />
<IconListPreference
camera:key="pref_camera_scenemode_key"
camera:defaultValue="@string/pref_camera_scenemode_default"
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 65c6ad4..700c843 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -28,7 +28,7 @@
camera:key="pref_video_time_lapse_frame_interval_key"
camera:defaultValue="@string/pref_video_time_lapse_frame_interval_default"
camera:title="@string/pref_video_time_lapse_frame_interval_title"
- camera:singleIcon="@drawable/ic_time_lapse_holo_dark"
+ camera:largeIcons="@array/video_timelapse_largeicons"
camera:entries="@array/pref_video_time_lapse_frame_interval_entries"
camera:entryValues="@array/pref_video_time_lapse_frame_interval_entryvalues"/>
<IconListPreference
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index bde5bd1..301f2a2 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -99,7 +99,7 @@ public class EffectsRecorder {
private static final int STATE_RELEASED = 4;
private int mState = STATE_CONFIGURE;
- private boolean mLogVerbose = Log.isLoggable(TAG, Log.VERBOSE);
+ private boolean mLogVerbose = true; //Log.isLoggable(TAG, Log.VERBOSE);
private static final String TAG = "effectsrecorder";
/** Determine if a given effect is supported at runtime
@@ -212,6 +212,7 @@ public class EffectsRecorder {
public interface EffectsListener {
public void onEffectsUpdate(int effectId, int effectMsg);
+ public void onEffectsError(Exception exception, String filePath);
}
public void setEffectsListener(EffectsListener listener) {
@@ -321,7 +322,10 @@ public class EffectsRecorder {
mOldRunner = mRunner;
mRunner = mGraphEnv.getRunner(mGraphId, GraphEnvironment.MODE_ASYNCHRONOUS);
mRunner.setDoneCallback(mRunnerDoneCallback);
-
+ if (mLogVerbose) {
+ Log.v(TAG, "New runner: " + mRunner
+ + ". Old runner: " + mOldRunner);
+ }
if (mState == STATE_PREVIEW) {
// Switching effects while running. Stop existing runner.
// The stop callback will take care of starting new runner.
@@ -524,7 +528,7 @@ public class EffectsRecorder {
mState = STATE_CONFIGURE;
mOldRunner = mRunner;
mRunner.stop();
-
+ mRunner = null;
// Rest of stop and release handled in mRunnerDoneCallback
}
@@ -554,7 +558,19 @@ public class EffectsRecorder {
new OnRunnerDoneListener() {
public void onRunnerDone(int result) {
synchronized(EffectsRecorder.this) {
+ if (mLogVerbose) {
+ Log.v(TAG,
+ "Graph runner done (" + EffectsRecorder.this
+ + ", mRunner " + mRunner
+ + ", mOldRunner " + mOldRunner + ")");
+ }
+ if (result == GraphRunner.RESULT_ERROR) {
+ // Handle error case
+ Log.e(TAG, "Error running filter graph!");
+ raiseError(mRunner == null ? null : mRunner.getError());
+ }
if (mOldRunner != null) {
+ // Tear down old graph if available
if (mLogVerbose) Log.v(TAG, "Tearing down old graph.");
GLEnvironment glEnv = mGraphEnv.getContext().getGLEnvironment();
if (glEnv != null && !glEnv.isActive()) {
@@ -601,8 +617,17 @@ public class EffectsRecorder {
if (mEffectsListener != null) {
mHandler.post(new Runnable() {
public void run() {
- mEffectsListener.onEffectsUpdate(effect,
- msg);
+ mEffectsListener.onEffectsUpdate(effect, msg);
+ }
+ });
+ }
+ }
+
+ private void raiseError(final Exception exception) {
+ if (mEffectsListener != null) {
+ mHandler.post(new Runnable() {
+ public void run() {
+ mEffectsListener.onEffectsError(exception, mOutputFile);
}
});
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 1978065..81ce3a9 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -20,6 +20,7 @@ import com.android.camera.ui.CameraPicker;
import com.android.camera.ui.IndicatorControlContainer;
import com.android.camera.ui.IndicatorControlWheelContainer;
import com.android.camera.ui.RotateImageView;
+import com.android.camera.ui.RotateLayout;
import com.android.camera.ui.SharePopup;
import com.android.camera.ui.ZoomControl;
@@ -180,6 +181,7 @@ public class VideoCamera extends ActivityBase
private boolean mMediaRecorderRecording = false;
private long mRecordingStartTime;
private boolean mRecordingTimeCountsDown = false;
+ private RotateLayout mRecordingTimeRect;
private long mOnResumeTime;
// The video file that the hardware camera is about to record into
// (or is recording into.)
@@ -400,6 +402,7 @@ public class VideoCamera extends ActivityBase
mShutterButton.requestFocus();
mRecordingTimeView = (TextView) findViewById(R.id.recording_time);
+ mRecordingTimeRect = (RotateLayout) findViewById(R.id.recording_time_rect);
mOrientationListener = new MyOrientationEventListener(VideoCamera.this);
mTimeLapseLabel = findViewById(R.id.time_lapse_label);
@@ -525,6 +528,7 @@ public class VideoCamera extends ActivityBase
if (mModePicker != null) mModePicker.setDegree(degree);
if (mSharePopup != null) mSharePopup.setOrientation(degree);
if (mIndicatorControlContainer != null) mIndicatorControlContainer.setDegree(degree);
+ mRecordingTimeRect.setOrientation(mOrientationCompensation);
}
private void startPlayVideoActivity() {
@@ -1495,6 +1499,7 @@ public class VideoCamera extends ActivityBase
private void showRecordingUI(boolean recording) {
if (recording) {
+ mIndicatorControlContainer.dismissSecondLevelIndicator();
if (mThumbnailView != null) mThumbnailView.setEnabled(false);
mShutterButton.setBackgroundResource(R.drawable.btn_shutter_video_recording);
mRecordingTimeView.setText("");
@@ -1857,6 +1862,7 @@ public class VideoCamera extends ActivityBase
}
}
+ @Override
public void onEffectsUpdate(int effectId, int effectMsg) {
if (effectMsg == EffectsRecorder.EFFECT_MSG_EFFECTS_STOPPED) {
// Effects have shut down. Hide learning message if any,
@@ -1877,6 +1883,16 @@ public class VideoCamera extends ActivityBase
}
@Override
+ public synchronized void onEffectsError(Exception exception, String fileName) {
+ // TODO: Eventually we may want to show the user an error dialog, and then restart the
+ // camera and encoder gracefully. For now, we just delete the file and bail out.
+ if (fileName != null && new File(fileName).exists()) {
+ deleteVideoFile(fileName);
+ }
+ throw new RuntimeException("Error during recording!", exception);
+ }
+
+ @Override
public void onConfigurationChanged(Configuration config) {
super.onConfigurationChanged(config);
}
diff --git a/src/com/android/camera/ui/IndicatorControlBarContainer.java b/src/com/android/camera/ui/IndicatorControlBarContainer.java
index cc35d59..6b60ace 100644
--- a/src/com/android/camera/ui/IndicatorControlBarContainer.java
+++ b/src/com/android/camera/ui/IndicatorControlBarContainer.java
@@ -32,8 +32,7 @@ import android.view.animation.AnimationUtils;
* The IndicatorControlBarContainer is a IndicatorControl containing
* IndicatorControlBar, SecondIndicatorControlBar and ZoomControlBar for Phone UI.
*/
-public class IndicatorControlBarContainer extends IndicatorControlContainer
- implements OnIndicatorEventListener {
+public class IndicatorControlBarContainer extends IndicatorControlContainer {
private static final String TAG = "IndicatorControlBarContainer";
private Animation mFadeIn, mFadeOut;
@@ -107,6 +106,12 @@ public class IndicatorControlBarContainer extends IndicatorControlContainer
}
};
+ private void leaveSecondLevelIndicator() {
+ mIndicatorControlBar.startAnimation(mFadeIn);
+ mIndicatorControlBar.setVisibility(View.VISIBLE);
+ mSecondLevelIndicatorControlBar.startAnimation(mSecondLevelFadeOut);
+ }
+
public void onIndicatorEvent(int event) {
switch (event) {
case OnIndicatorEventListener.EVENT_ENTER_SECOND_LEVEL_INDICATOR_BAR:
@@ -116,9 +121,7 @@ public class IndicatorControlBarContainer extends IndicatorControlContainer
break;
case OnIndicatorEventListener.EVENT_LEAVE_SECOND_LEVEL_INDICATOR_BAR:
- mIndicatorControlBar.startAnimation(mFadeIn);
- mIndicatorControlBar.setVisibility(View.VISIBLE);
- mSecondLevelIndicatorControlBar.startAnimation(mSecondLevelFadeOut);
+ leaveSecondLevelIndicator();
break;
}
}
@@ -167,4 +170,11 @@ public class IndicatorControlBarContainer extends IndicatorControlContainer
public void enableZoom(boolean enabled) {
mIndicatorControlBar.enableZoom(enabled);
}
+
+ @Override
+ public void dismissSecondLevelIndicator() {
+ if (mSecondLevelIndicatorControlBar.getVisibility() == View.VISIBLE) {
+ leaveSecondLevelIndicator();
+ }
+ }
}
diff --git a/src/com/android/camera/ui/IndicatorControlContainer.java b/src/com/android/camera/ui/IndicatorControlContainer.java
index 3f66acb..87b26d0 100644
--- a/src/com/android/camera/ui/IndicatorControlContainer.java
+++ b/src/com/android/camera/ui/IndicatorControlContainer.java
@@ -21,7 +21,8 @@ import com.android.camera.PreferenceGroup;
import android.content.Context;
import android.util.AttributeSet;
-public abstract class IndicatorControlContainer extends IndicatorControl {
+public abstract class IndicatorControlContainer extends IndicatorControl
+ implements OnIndicatorEventListener {
public abstract void initialize(Context context, PreferenceGroup group,
boolean isZoomSupported, String[] keys, String[] otherSettingKeys);
@@ -30,4 +31,6 @@ public abstract class IndicatorControlContainer extends IndicatorControl {
}
public abstract void enableZoom(boolean enabled);
+
+ public abstract void dismissSecondLevelIndicator();
}
diff --git a/src/com/android/camera/ui/IndicatorControlWheelContainer.java b/src/com/android/camera/ui/IndicatorControlWheelContainer.java
index 664aa9b..14539da 100644
--- a/src/com/android/camera/ui/IndicatorControlWheelContainer.java
+++ b/src/com/android/camera/ui/IndicatorControlWheelContainer.java
@@ -31,8 +31,7 @@ import android.view.View;
* ShutterButton, a IndicatorControlWheel (which combines first-level and
* second-level indicators) and a ZoomControlWheel.
*/
-public class IndicatorControlWheelContainer extends IndicatorControlContainer
- implements OnIndicatorEventListener {
+public class IndicatorControlWheelContainer extends IndicatorControlContainer {
public static final int STROKE_WIDTH = 87;
public static final int SHUTTER_BUTTON_RADIUS = 74;
public static final int FULL_WHEEL_RADIUS = 93;
@@ -221,4 +220,9 @@ public class IndicatorControlWheelContainer extends IndicatorControlContainer
public void overrideSettings(final String ... keyvalues) {
mIndicatorControlWheel.overrideSettings(keyvalues);
}
+
+ @Override
+ public void dismissSecondLevelIndicator() {
+ // TODO: back to first-level indicator set.
+ }
}