summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authorShashi Shekhar <shashishekhar@google.com>2015-01-16 10:16:25 -0800
committerShashi Shekhar <shashishekhar@google.com>2015-02-11 17:24:13 -0800
commitb4b27f2c7738cd5e3f31a281d66a33f4698810b3 (patch)
tree1f5c3f83cee9632816724d718817ef0947815f48 /src_pd
parentf27cf91653d6be413e14c362a0887d3bf1f5ca50 (diff)
downloadandroid_packages_apps_Camera2-b4b27f2c7738cd5e3f31a281d66a33f4698810b3.tar.gz
android_packages_apps_Camera2-b4b27f2c7738cd5e3f31a281d66a33f4698810b3.tar.bz2
android_packages_apps_Camera2-b4b27f2c7738cd5e3f31a281d66a33f4698810b3.zip
Port burst to use FrameServer.
Port burst to frameserver - simplifies burst interfaces - removes burst methods from OneCamera. - locks orientation when burst is running. - Deletes most old code for burst integration. - Removes frame distributor preview forwarding, instead frames are streamed using a surface texture the Surface for which is passed as a output target to the create capture session. - Deletes FrameDistributor, now the low-res frames are streamed to a new surface specifically setup for burst. Change-Id: I50f2955bb48610a7e284f9609cd70b8e4e1f1059
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/camera/burst/BurstControllerImpl.java36
-rw-r--r--src_pd/com/android/camera/one/v2/OneCameraCreator.java4
2 files changed, 15 insertions, 25 deletions
diff --git a/src_pd/com/android/camera/burst/BurstControllerImpl.java b/src_pd/com/android/camera/burst/BurstControllerImpl.java
index 0c8156446..dfbc030eb 100644
--- a/src_pd/com/android/camera/burst/BurstControllerImpl.java
+++ b/src_pd/com/android/camera/burst/BurstControllerImpl.java
@@ -15,22 +15,21 @@
package com.android.camera.burst;
import android.content.Context;
+import android.graphics.SurfaceTexture;
-import com.android.camera.gl.FrameDistributor.FrameConsumer;
+import com.android.camera.burst.BurstResultsListener;
+import com.android.camera.burst.EvictionHandler;
+import com.android.camera.burst.BurstController.ImageStreamProperties;
+import com.android.camera.one.v2.camera2proxy.ImageProxy;
+
+import java.util.List;
/**
* Stub implementation for burst controller.
*/
class BurstControllerImpl implements BurstController {
- /**
- * Create a new BurstController.
- *
- * @param context the context of the application.
- * @param resultsListener listener for listening to burst events.
- */
- public BurstControllerImpl(Context context, BurstResultsListener resultsListener) {
- }
+ public BurstControllerImpl(Context context) {}
/**
* Returns true if burst mode is supported by camera.
*/
@@ -39,25 +38,14 @@ class BurstControllerImpl implements BurstController {
}
@Override
- public BurstConfiguration startBurst() {
+ public EvictionHandler startBurst(SurfaceTexture surfaceTexture,
+ ImageStreamProperties imageStreamProperties,
+ BurstResultsListener resultsListener) {
return null;
}
@Override
- public void stopBurst(ResultsAccessor resultsAccessor) {
+ public void processBurstResults(List<ImageProxy> capturedImages) {
// no op
}
-
- @Override
- public void onPreviewSizeChanged(int width, int height) {
- }
-
- @Override
- public void onOrientationChanged(int orientation, boolean isMirrored) {
- }
-
- @Override
- public FrameConsumer getPreviewFrameConsumer() {
- throw new IllegalStateException("Not implemented.");
- }
}
diff --git a/src_pd/com/android/camera/one/v2/OneCameraCreator.java b/src_pd/com/android/camera/one/v2/OneCameraCreator.java
index a1736ec31..7d67e2f8f 100644
--- a/src_pd/com/android/camera/one/v2/OneCameraCreator.java
+++ b/src_pd/com/android/camera/one/v2/OneCameraCreator.java
@@ -23,6 +23,7 @@ import android.util.DisplayMetrics;
import com.android.camera.SoundPlayer;
import com.android.camera.app.AppController;
import com.android.camera.async.MainThread;
+import com.android.camera.burst.BurstFacade;
import com.android.camera.one.OneCamera;
import com.android.camera.one.v2.photo.ImageRotationCalculator;
import com.android.camera.util.Size;
@@ -32,7 +33,8 @@ public class OneCameraCreator {
CameraCharacteristics characteristics, Size pictureSize,
int maxMemoryMB,
DisplayMetrics displayMetrics, SoundPlayer soundPlayer,
- MainThread mainThread, ImageRotationCalculator imageRotationCalculator) {
+ MainThread mainThread, ImageRotationCalculator imageRotationCalculator,
+ BurstFacade burstController) {
// TODO: Might want to switch current camera to vendor HDR.
return new OneCameraImpl(device, characteristics, pictureSize);
}