From b4b27f2c7738cd5e3f31a281d66a33f4698810b3 Mon Sep 17 00:00:00 2001 From: Shashi Shekhar Date: Fri, 16 Jan 2015 10:16:25 -0800 Subject: 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 --- .../android/camera/burst/BurstControllerImpl.java | 36 ++++++++-------------- .../android/camera/one/v2/OneCameraCreator.java | 4 ++- 2 files changed, 15 insertions(+), 25 deletions(-) (limited to 'src_pd') 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 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); } -- cgit v1.2.3