summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorVijay Kumar Tumati <vtumati@codeaurora.org>2015-04-22 12:50:02 +0530
committerSteve Kondik <steve@cyngn.com>2015-11-05 08:42:15 -0800
commitd6ba2d0fe68f30e1431c31dd18bbf312588ad683 (patch)
tree53e572f43db30c3f034da56ddd79e69273cbb33a /core/jni
parenta89168479cb14f482268af6f1a650b28eba0b393 (diff)
downloadframeworks_base-d6ba2d0fe68f30e1431c31dd18bbf312588ad683.zip
frameworks_base-d6ba2d0fe68f30e1431c31dd18bbf312588ad683.tar.gz
frameworks_base-d6ba2d0fe68f30e1431c31dd18bbf312588ad683.tar.bz2
Camera: Longshot with Burst Functionality.
New Longshot stop command is sent after receiving all the required YUV callbacks or releasing the shutter before reaching Max number. Change-Id: I264d94cde624b5f2ead88236bdff8d6db41e12e6
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_hardware_Camera.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index e375804..4cf317e 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -488,6 +488,21 @@ static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jbool
}
}
+static void android_hardware_Camera_stopLongshot(JNIEnv *env, jobject thiz)
+{
+ ALOGV("stopLongshot");
+ JNICameraContext* context;
+ status_t rc;
+ sp<Camera> camera = get_native_camera(env, thiz, &context);
+ if (camera == 0) return;
+
+ rc = camera->sendCommand(CAMERA_CMD_STOP_LONGSHOT, 0, 0);
+
+ if (rc != NO_ERROR) {
+ jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed");
+ }
+}
+
static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz)
{
ALOGV("sendHistogramData" );
@@ -1119,9 +1134,12 @@ static JNINativeMethod camMethods[] = {
{ "native_sendHistogramData",
"()V",
(void *)android_hardware_Camera_sendHistogramData },
- { "native_setLongshot",
- "(Z)V",
- (void *)android_hardware_Camera_setLongshot },
+ { "native_setLongshot",
+ "(Z)V",
+ (void *)android_hardware_Camera_setLongshot },
+ { "native_stopLongshot",
+ "()V",
+ (void *)android_hardware_Camera_stopLongshot },
{ "native_setParameters",
"(Ljava/lang/String;)V",
(void *)android_hardware_Camera_setParameters },