From 04f101c35eaa90b1f95939afac30674ec1611e6f Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Tue, 4 Nov 2014 11:32:52 -0800 Subject: Add a BufferItem parameter to onFrameAvailable 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 --- cmds/screenrecord/FrameOutput.cpp | 2 +- cmds/screenrecord/FrameOutput.h | 2 +- cmds/screenrecord/Overlay.cpp | 2 +- cmds/screenrecord/Overlay.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cmds') diff --git a/cmds/screenrecord/FrameOutput.cpp b/cmds/screenrecord/FrameOutput.cpp index 03e0062..bef74f5 100644 --- a/cmds/screenrecord/FrameOutput.cpp +++ b/cmds/screenrecord/FrameOutput.cpp @@ -206,7 +206,7 @@ void FrameOutput::reduceRgbaToRgb(uint8_t* buf, unsigned int pixelCount) { } // Callback; executes on arbitrary thread. -void FrameOutput::onFrameAvailable() { +void FrameOutput::onFrameAvailable(const BufferItem& /* item */) { Mutex::Autolock _l(mMutex); mFrameAvailable = true; mEventCond.signal(); diff --git a/cmds/screenrecord/FrameOutput.h b/cmds/screenrecord/FrameOutput.h index c49ec3b..4c0c3be 100644 --- a/cmds/screenrecord/FrameOutput.h +++ b/cmds/screenrecord/FrameOutput.h @@ -62,7 +62,7 @@ private: } // (overrides GLConsumer::FrameAvailableListener method) - virtual void onFrameAvailable(); + virtual void onFrameAvailable(const BufferItem& item); // Reduces RGBA to RGB, in place. static void reduceRgbaToRgb(uint8_t* buf, unsigned int pixelCount); diff --git a/cmds/screenrecord/Overlay.cpp b/cmds/screenrecord/Overlay.cpp index 7fef53d..c659170 100644 --- a/cmds/screenrecord/Overlay.cpp +++ b/cmds/screenrecord/Overlay.cpp @@ -274,7 +274,7 @@ void Overlay::getTimeString_l(nsecs_t monotonicNsec, char* buf, size_t bufLen) { } // Callback; executes on arbitrary thread. -void Overlay::onFrameAvailable() { +void Overlay::onFrameAvailable(const BufferItem& /* item */) { ALOGV("Overlay::onFrameAvailable"); Mutex::Autolock _l(mMutex); mFrameAvailable = true; diff --git a/cmds/screenrecord/Overlay.h b/cmds/screenrecord/Overlay.h index b1b5c29..ee3444d 100644 --- a/cmds/screenrecord/Overlay.h +++ b/cmds/screenrecord/Overlay.h @@ -78,7 +78,7 @@ private: const Program& texRender, TextRenderer& textRenderer); // (overrides GLConsumer::FrameAvailableListener method) - virtual void onFrameAvailable(); + virtual void onFrameAvailable(const BufferItem& item); // (overrides Thread method) virtual bool threadLoop(); -- cgit v1.1