summaryrefslogtreecommitdiffstats
path: root/include/camera
diff options
context:
space:
mode:
Diffstat (limited to 'include/camera')
-rw-r--r--include/camera/Camera.h8
-rw-r--r--include/camera/ICamera.h12
-rw-r--r--include/camera/ICameraClient.h3
-rw-r--r--include/camera/ICameraService.h3
-rw-r--r--include/camera/ICameraServiceListener.h3
-rw-r--r--include/camera/IProCameraCallbacks.h3
-rw-r--r--include/camera/IProCameraUser.h3
7 files changed, 34 insertions, 1 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index 37626a4..c34b3ea 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -121,7 +121,15 @@ public:
void setListener(const sp<CameraListener>& listener);
void setRecordingProxyListener(const sp<ICameraRecordingProxyListener>& listener);
+
+ // Configure preview callbacks to app. Only one of the older
+ // callbacks or the callback surface can be active at the same time;
+ // enabling one will disable the other if active. Flags can be
+ // disabled by calling it with CAMERA_FRAME_CALLBACK_FLAG_NOOP, and
+ // Target by calling it with a NULL interface.
void setPreviewCallbackFlags(int preview_callback_flag);
+ status_t setPreviewCallbackTarget(
+ const sp<IGraphicBufferProducer>& callbackProducer);
sp<ICameraRecordingProxy> getRecordingProxy();
diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h
index 2236c1f..f3a186e 100644
--- a/include/camera/ICamera.h
+++ b/include/camera/ICamera.h
@@ -32,6 +32,9 @@ class Surface;
class ICamera: public IInterface
{
+ /**
+ * Keep up-to-date with ICamera.aidl in frameworks/base
+ */
public:
DECLARE_META_INTERFACE(Camera);
@@ -51,8 +54,15 @@ public:
const sp<IGraphicBufferProducer>& bufferProducer) = 0;
// set the preview callback flag to affect how the received frames from
- // preview are handled.
+ // preview are handled. Enabling preview callback flags disables any active
+ // preview callback surface set by setPreviewCallbackTarget().
virtual void setPreviewCallbackFlag(int flag) = 0;
+ // set a buffer interface to use for client-received preview frames instead
+ // of preview callback buffers. Passing a valid interface here disables any
+ // active preview callbacks set by setPreviewCallbackFlag(). Passing NULL
+ // disables the use of the callback target.
+ virtual status_t setPreviewCallbackTarget(
+ const sp<IGraphicBufferProducer>& callbackProducer) = 0;
// start preview mode, must call setPreviewDisplay first
virtual status_t startPreview() = 0;
diff --git a/include/camera/ICameraClient.h b/include/camera/ICameraClient.h
index b30aa7a..1584dba 100644
--- a/include/camera/ICameraClient.h
+++ b/include/camera/ICameraClient.h
@@ -28,6 +28,9 @@ namespace android {
class ICameraClient: public IInterface
{
+ /**
+ * Keep up-to-date with ICameraClient.aidl in frameworks/base
+ */
public:
DECLARE_META_INTERFACE(CameraClient);
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h
index aaf6eb3..3c2e60a 100644
--- a/include/camera/ICameraService.h
+++ b/include/camera/ICameraService.h
@@ -32,6 +32,9 @@ class ICameraServiceListener;
class ICameraService : public IInterface
{
public:
+ /**
+ * Keep up-to-date with ICameraService.aidl in frameworks/base
+ */
enum {
GET_NUMBER_OF_CAMERAS = IBinder::FIRST_CALL_TRANSACTION,
GET_CAMERA_INFO,
diff --git a/include/camera/ICameraServiceListener.h b/include/camera/ICameraServiceListener.h
index f2a11c2..0a0e43a 100644
--- a/include/camera/ICameraServiceListener.h
+++ b/include/camera/ICameraServiceListener.h
@@ -26,6 +26,9 @@ namespace android {
class ICameraServiceListener : public IInterface
{
+ /**
+ * Keep up-to-date with ICameraServiceListener.aidl in frameworks/base
+ */
public:
/**
diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h
index 563ec17..c774698 100644
--- a/include/camera/IProCameraCallbacks.h
+++ b/include/camera/IProCameraCallbacks.h
@@ -30,6 +30,9 @@ namespace android {
class IProCameraCallbacks : public IInterface
{
+ /**
+ * Keep up-to-date with IProCameraCallbacks.aidl in frameworks/base
+ */
public:
DECLARE_META_INTERFACE(ProCameraCallbacks);
diff --git a/include/camera/IProCameraUser.h b/include/camera/IProCameraUser.h
index 45b818c..2ccc4d2 100644
--- a/include/camera/IProCameraUser.h
+++ b/include/camera/IProCameraUser.h
@@ -34,6 +34,9 @@ class Surface;
class IProCameraUser: public IInterface
{
+ /**
+ * Keep up-to-date with IProCameraUser.aidl in frameworks/base
+ */
public:
DECLARE_META_INTERFACE(ProCameraUser);