From 4b710f086070fabe022b3a1f474bfcbec842b8fc Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Mon, 14 Sep 2015 15:44:04 -0700 Subject: libstagefright: don't reclaim codec when there's buffer owned by client. Notify the client and try to reclaim again in 0.5s. Bug: 23703241 Bug: 23949540 Change-Id: I1afe50c71635645668bfb73ffa0d801765b5ae3c --- include/media/stagefright/MediaCodec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h index c10963d..cdfa159 100644 --- a/include/media/stagefright/MediaCodec.h +++ b/include/media/stagefright/MediaCodec.h @@ -176,7 +176,7 @@ protected: private: // used by ResourceManagerClient - status_t reclaim(); + status_t reclaim(bool force = false); friend struct ResourceManagerClient; private: @@ -385,6 +385,9 @@ private: uint64_t getGraphicBufferSize(); void addResource(const String8 &type, const String8 &subtype, uint64_t value); + bool hasPendingBuffer(int portIndex); + bool hasPendingBuffer(); + /* called to get the last codec error when the sticky flag is set. * if no such codec error is found, returns UNKNOWN_ERROR. */ -- cgit v1.1