summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-09-14 15:44:04 -0700
committerRonghua Wu <ronghuawu@google.com>2015-10-05 10:42:09 -0700
commit4b710f086070fabe022b3a1f474bfcbec842b8fc (patch)
treed51001f392edfe4473a18f2075e2fc72445d64d6 /include
parent4bd8f46cf6d4a05361fdbdfb39510c0197b1f2ec (diff)
downloadframeworks_av-4b710f086070fabe022b3a1f474bfcbec842b8fc.zip
frameworks_av-4b710f086070fabe022b3a1f474bfcbec842b8fc.tar.gz
frameworks_av-4b710f086070fabe022b3a1f474bfcbec842b8fc.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaCodec.h5
1 files changed, 4 insertions, 1 deletions
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.
*/