summaryrefslogtreecommitdiffstats
path: root/include/camera
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-02-21 12:02:29 -0800
committerIgor Murashkin <iam@google.com>2013-02-22 10:50:15 -0800
commita91537e268f2b35f9f0dfdc0c4f84655c93285ae (patch)
tree114691436e16b7c8dfc5929d922712edd2c41aff /include/camera
parenteb72e1796b3af548e87891a6d2b73b0567807f25 (diff)
downloadframeworks_av-a91537e268f2b35f9f0dfdc0c4f84655c93285ae.zip
frameworks_av-a91537e268f2b35f9f0dfdc0c4f84655c93285ae.tar.gz
frameworks_av-a91537e268f2b35f9f0dfdc0c4f84655c93285ae.tar.bz2
Camera: ProCamera - implement onResultReceived callback for metadata callbacks
Change-Id: I46775402b007244bc383d6343a620eebbd492aad
Diffstat (limited to 'include/camera')
-rw-r--r--include/camera/IProCameraCallbacks.h7
-rw-r--r--include/camera/ProCamera.h17
2 files changed, 18 insertions, 6 deletions
diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h
index e5be099..fc24026 100644
--- a/include/camera/IProCameraCallbacks.h
+++ b/include/camera/IProCameraCallbacks.h
@@ -24,6 +24,8 @@
#include <utils/Timers.h>
#include <system/camera.h>
+struct camera_metadata;
+
namespace android {
class IProCameraCallbacks: public IInterface
@@ -47,6 +49,11 @@ public:
};
virtual void onLockStatusChanged(LockStatus newLockStatus) = 0;
+
+ /** Missing by design: implementation is client-side in ProCamera.cpp **/
+ // virtual void onBufferReceived(int streamId,
+ // const CpuConsumer::LockedBufer& buf);
+ virtual void onResultReceived(int32_t frameId, camera_metadata* result) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h
index 4dda533..7cd9138 100644
--- a/include/camera/ProCamera.h
+++ b/include/camera/ProCamera.h
@@ -49,17 +49,19 @@ public:
// OnBufferReceived and OnRequestReceived can come in with any order,
// use android.sensor.timestamp and LockedBuffer.timestamp to correlate them
- // TODO: implement in IProCameraCallbacks, ProCamera2Client
-
// A new frame buffer has been received for this stream.
// -- This callback only fires for createStreamCpu streams
+ // -- Use buf.timestamp to correlate with metadata's
+ // android.sensor.timestamp
// -- The buffer must not be accessed after this function call completes
virtual void onBufferReceived(int streamId,
const CpuConsumer::LockedBuffer& buf) = 0;
- // A new metadata buffer has been received.
- // -- Ownership of request passes on to the callee,
- // free with free_camera_metadata.
- virtual void onRequestReceived(camera_metadata* request) = 0;
+ /**
+ * A new metadata buffer has been received.
+ * -- Ownership of request passes on to the callee, free with
+ * free_camera_metadata.
+ */
+ virtual void onResultReceived(int32_t frameId, camera_metadata* result) = 0;
};
class ProCamera : public BnProCameraCallbacks, public IBinder::DeathRecipient
@@ -189,6 +191,9 @@ protected:
virtual void onLockStatusChanged(
IProCameraCallbacks::LockStatus newLockStatus);
+ virtual void onResultReceived(int32_t frameId,
+ camera_metadata* result);
+
class DeathNotifier: public IBinder::DeathRecipient
{
public: