summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/Camera2Device.h
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-10-05 11:24:08 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-05 11:24:08 -0700
commit16e0e1f5568cb530416641f28835adf21f0ec88b (patch)
tree79b802a2ed8aa45aeff851f1b3d301c6a4b1ec11 /services/camera/libcameraservice/Camera2Device.h
parentae2b028b86381a523a4c93e1efbcf4eb31fa2dd9 (diff)
parent577ac8a74e8af7fcc7bc714874b8da21f57989b5 (diff)
downloadframeworks_av-16e0e1f5568cb530416641f28835adf21f0ec88b.zip
frameworks_av-16e0e1f5568cb530416641f28835adf21f0ec88b.tar.gz
frameworks_av-16e0e1f5568cb530416641f28835adf21f0ec88b.tar.bz2
am 577ac8a7: am 4865c526: Camera2: Synchronize mode changes and triggers
* commit '577ac8a74e8af7fcc7bc714874b8da21f57989b5': Camera2: Synchronize mode changes and triggers
Diffstat (limited to 'services/camera/libcameraservice/Camera2Device.h')
-rw-r--r--services/camera/libcameraservice/Camera2Device.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/Camera2Device.h b/services/camera/libcameraservice/Camera2Device.h
index 38662e3..29830bd 100644
--- a/services/camera/libcameraservice/Camera2Device.h
+++ b/services/camera/libcameraservice/Camera2Device.h
@@ -67,6 +67,13 @@ class Camera2Device : public virtual RefBase {
status_t clearStreamingRequest();
/**
+ * Wait until a request with the given ID has been dequeued by the
+ * HAL. Returns TIMED_OUT if the timeout duration is reached. Returns
+ * immediately if the latest request received by the HAL has this id.
+ */
+ status_t waitUntilRequestReceived(int32_t requestId, nsecs_t timeout);
+
+ /**
* Create an output stream of the requested size and format.
*
* If format is CAMERA2_HAL_PIXEL_FORMAT_OPAQUE, then the HAL device selects
@@ -226,6 +233,9 @@ class Camera2Device : public virtual RefBase {
status_t dequeue(camera_metadata_t **buf, bool incrementCount = true);
int getBufferCount();
status_t waitForBuffer(nsecs_t timeout);
+ // Wait until a buffer with the given ID is dequeued. Will return
+ // immediately if the latest buffer dequeued has that ID.
+ status_t waitForDequeue(int32_t id, nsecs_t timeout);
// Set repeating buffer(s); if the queue is empty on a dequeue call, the
// queue copies the contents of the stream slot into the queue, and then
@@ -247,6 +257,8 @@ class Camera2Device : public virtual RefBase {
Condition notEmpty;
int mFrameCount;
+ int32_t mLatestRequestId;
+ Condition mNewRequestId;
int mCount;
List<camera_metadata_t*> mEntries;