OSDN Git Service

Add a BufferItem parameter to onFrameAvailable
authorDan Stoza <stoza@google.com>
Tue, 4 Nov 2014 19:39:35 +0000 (11:39 -0800)
committerDan Stoza <stoza@google.com>
Tue, 4 Nov 2014 19:39:35 +0000 (11:39 -0800)
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0

tests/camera2/CameraStreamFixture.h
tests/camera2/camera2_utils.cpp
tests/camera2/camera2_utils.h

index f56daf0..0be0a14 100644 (file)
@@ -130,7 +130,7 @@ protected:
         }
 
         // CpuConsumer::FrameAvailableListener implementation
-        virtual void onFrameAvailable() {
+        virtual void onFrameAvailable(const BufferItem& /* item */) {
             ALOGV("Frame now available (start)");
 
             Mutex::Autolock lock(mMutex);
index 3c0767a..9cc6c90 100644 (file)
@@ -574,7 +574,7 @@ status_t FrameWaiter::waitForFrame(nsecs_t timeout) {
     return OK;
 }
 
-void FrameWaiter::onFrameAvailable() {
+void FrameWaiter::onFrameAvailable(const BufferItem& /* item */) {
     Mutex::Autolock lock(mMutex);
     mPendingFrames++;
     mCondition.signal();
index 0cdf4a3..c1d1e72 100644 (file)
@@ -231,7 +231,7 @@ class FrameWaiter : public CpuConsumer::FrameAvailableListener {
      */
     status_t waitForFrame(nsecs_t timeout);
 
-    virtual void onFrameAvailable();
+    virtual void onFrameAvailable(const BufferItem& item);
 
     int mPendingFrames;
     Mutex mMutex;