summaryrefslogtreecommitdiffstats
path: root/src_wrapper
diff options
context:
space:
mode:
authorVijay kumar Tumati <vtumati@codeaurora.org>2015-04-13 15:36:33 +0530
committerBruno Martins <bgcngm@gmail.com>2018-11-20 12:32:17 +0000
commitba56ec209ff1ec039794c550d132c9aa291c95c7 (patch)
treefe00edb9b8c64aaf3d3cbe23b52a55e164826d53 /src_wrapper
parent47d271752d54d16195606b78925dde7cbe66b5c9 (diff)
downloadandroid_packages_apps_Snap-ba56ec209ff1ec039794c550d132c9aa291c95c7.tar.gz
android_packages_apps_Snap-ba56ec209ff1ec039794c550d132c9aa291c95c7.tar.bz2
android_packages_apps_Snap-ba56ec209ff1ec039794c550d132c9aa291c95c7.zip
SnapdragonCamera: Longshot with Burst Functionality.
This is a new Longshot feature where in the snapshot frames captured at ISP is @ 3fps and output JPEG encoded rate is @ 1.2 fps. This can be enabled by setting following setprop with the maximum number of snapshots. adb shell setprop persist.camera.longshot.max <max_number> e.g.:adb shell setprop persist.camera.longshot.max 10 If the number is -1, then the existing Longshot will be used. Main changes: 1) The number of Snapshot/Preview/Metadata buffers are increased to make sure no frames will be dropped @ ISP and to maintain burst fps. e.g.: For max number of 10 snapshots, Snapshot buffers are increased to 9 from existing 6. This buffer numbers are derived considering snapshot YUV frames @ 3 fps and JPEG encoding @ 1.2 fps. 2) Shutter will be played after receiving YUV frame instead of reprocess frame. 3) New Longshot stop command is sent after receiving all the required YUV callbacks or releasing the shutter before reaching Max number. 4) Existing Longshot off command is sent after receiving all JPEG CB.s for the issued TakePictures() and also shutter button will be disabled until all the JPEG callbacks are received. Change-Id: Id0c21aeb67245530768bf3ab859d39dea7e2bc40
Diffstat (limited to 'src_wrapper')
-rw-r--r--src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
index 6739686e9..bbde33af2 100644
--- a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
+++ b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
@@ -119,4 +119,21 @@ public class CameraWrapper extends Wrapper{
}
}
+ private static Method method_stopLongshot = null;
+ public static final void stopLongshot(Camera camera){
+ if ( DEBUG ){
+ Log.e(TAG, "" + Camera.class + " no stopLongshot");
+ return;
+ }
+ try {
+ if (method_stopLongshot == null) {
+ method_stopLongshot =
+ Camera.class.getDeclaredMethod("stopLongshot");
+ }
+ method_stopLongshot.invoke(camera);
+ }catch (Exception exception){
+ exception.printStackTrace();
+ }
+ }
+
}