Add camera service support for SurfaceTexture.
This change enables the use of a SurfaceTexture in place of a Surface as
the destination of camera preview frames.
Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index d78d7e5..ccb9cf7 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -94,6 +94,7 @@
virtual status_t lock();
virtual status_t unlock();
virtual status_t setPreviewDisplay(const sp<Surface>& surface);
+ virtual status_t setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture);
virtual void setPreviewCallbackFlag(int flag);
virtual status_t startPreview();
virtual void stopPreview();
@@ -180,7 +181,8 @@
// Ensures atomicity among the public methods
mutable Mutex mLock;
- sp<ISurface> mSurface;
+ // This is a binder of Surface or SurfaceTexture.
+ sp<IBinder> mSurface;
sp<ANativeWindow> mPreviewWindow;
// If the user want us to return a copy of the preview frame (instead