summaryrefslogtreecommitdiffstats
path: root/include/camera
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-02-20 17:41:57 -0800
committerIgor Murashkin <iam@google.com>2013-02-22 10:50:14 -0800
commit5376573eff55f370f041889618c9a7a9e1894615 (patch)
treeb90f41af6bb5a6952c7e7deb6812626c3035d927 /include/camera
parent634a51509ee50475f3e9f8ccf897e90fc72ded31 (diff)
downloadframeworks_av-5376573eff55f370f041889618c9a7a9e1894615.zip
frameworks_av-5376573eff55f370f041889618c9a7a9e1894615.tar.gz
frameworks_av-5376573eff55f370f041889618c9a7a9e1894615.tar.bz2
Camera: ProClient add asynchronous locks and such
Change-Id: I551e5e5e76d9be733fab5224beaa7309268c0f38
Diffstat (limited to 'include/camera')
-rw-r--r--include/camera/IProCameraCallbacks.h8
-rw-r--r--include/camera/ProCamera.h7
2 files changed, 13 insertions, 2 deletions
diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h
index ac1d5eb..e5be099 100644
--- a/include/camera/IProCameraCallbacks.h
+++ b/include/camera/IProCameraCallbacks.h
@@ -39,6 +39,14 @@ public:
virtual void dataCallbackTimestamp(nsecs_t timestamp,
int32_t msgType,
const sp<IMemory>& data) = 0;
+
+ enum LockStatus {
+ LOCK_ACQUIRED,
+ LOCK_RELEASED,
+ LOCK_STOLEN,
+ };
+
+ virtual void onLockStatusChanged(LockStatus newLockStatus) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h
index ba5fdc0..2dd01e3 100644
--- a/include/camera/ProCamera.h
+++ b/include/camera/ProCamera.h
@@ -34,9 +34,10 @@ class ProCameraListener : public CameraListener
public:
// Lock has been acquired. Write operations now available.
virtual void onLockAcquired() = 0;
- // Lock has been released with exclusiveUnlock, or has been stolen by
- // another client.
+ // Lock has been released with exclusiveUnlock.
virtual void onLockReleased() = 0;
+ // Lock has been stolen by another client.
+ virtual void onLockStolen() = 0;
// Lock free.
virtual void onTriggerNotify(int32_t msgType, int32_t ext1, int32_t ext2)
@@ -129,6 +130,8 @@ protected:
virtual void dataCallbackTimestamp(nsecs_t timestamp,
int32_t msgType,
const sp<IMemory>& dataPtr);
+ virtual void onLockStatusChanged(
+ IProCameraCallbacks::LockStatus newLockStatus);
class DeathNotifier: public IBinder::DeathRecipient
{