summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-07-17 14:23:16 -0700
committerLajos Molnar <lajos@google.com>2014-07-17 19:11:46 -0700
commitc9a11abbb6b48604ea063daedd6118024cfbfa92 (patch)
treeeb36a7ac17829b550ac64f92068788f5e80435aa /include
parent20965b564a606f9432177668c032ce97d1913e26 (diff)
downloadframeworks_av-c9a11abbb6b48604ea063daedd6118024cfbfa92.zip
frameworks_av-c9a11abbb6b48604ea063daedd6118024cfbfa92.tar.gz
frameworks_av-c9a11abbb6b48604ea063daedd6118024cfbfa92.tar.bz2
stagefright: add nonblocking MediaBufferGroup.acquire_buffer method
Bug: 15699665 Change-Id: I31c1ab4413c62ff3dd4e0d5b06a398064b4aaddd
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaBufferGroup.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/media/stagefright/MediaBufferGroup.h b/include/media/stagefright/MediaBufferGroup.h
index 0488292..a006f7f 100644
--- a/include/media/stagefright/MediaBufferGroup.h
+++ b/include/media/stagefright/MediaBufferGroup.h
@@ -34,9 +34,12 @@ public:
void add_buffer(MediaBuffer *buffer);
- // Blocks until a buffer is available and returns it to the caller,
- // the returned buffer will have a reference count of 1.
- status_t acquire_buffer(MediaBuffer **buffer);
+ // If nonBlocking is false, it blocks until a buffer is available and
+ // passes it to the caller in *buffer, while returning OK.
+ // The returned buffer will have a reference count of 1.
+ // If nonBlocking is true and a buffer is not immediately available,
+ // buffer is set to NULL and it returns WOULD_BLOCK.
+ status_t acquire_buffer(MediaBuffer **buffer, bool nonBlocking = false);
protected:
virtual void signalBufferReturned(MediaBuffer *buffer);