summaryrefslogtreecommitdiffstats
path: root/include/media/IOMX.h
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-06-01 14:58:37 -0700
committerLajos Molnar <lajos@google.com>2015-06-01 15:31:13 -0700
commitcc7cc67349b7a3f498882087aa42ffc05a2daf11 (patch)
tree8eee8d499bf395c14750b900a82ecc59d47e6dbd /include/media/IOMX.h
parentf9a3dce5d44b1ba598cc6f6a2e80da36e44618f7 (diff)
downloadframeworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.zip
frameworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.tar.gz
frameworks_av-cc7cc67349b7a3f498882087aa42ffc05a2daf11.tar.bz2
stagefright: allow to overallocate OMX codec buffers
Specify allottedSize for useBuffer and allocateBufferWithBackup, where OMX will see only the allottedSize, even though framework may allocate and use a bigger buffer. Bug: 13222807 Change-Id: Ibfa93f6c7b7c8ca0853ef17d4a0758e496eaf921
Diffstat (limited to 'include/media/IOMX.h')
-rw-r--r--include/media/IOMX.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index d33d142..46c363a 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -98,9 +98,10 @@ public:
virtual status_t getGraphicBufferUsage(
node_id node, OMX_U32 port_index, OMX_U32* usage) = 0;
+ // Use |params| as an OMX buffer, but limit the size of the OMX buffer to |allottedSize|.
virtual status_t useBuffer(
node_id node, OMX_U32 port_index, const sp<IMemory> &params,
- buffer_id *buffer) = 0;
+ buffer_id *buffer, OMX_U32 allottedSize) = 0;
virtual status_t useGraphicBuffer(
node_id node, OMX_U32 port_index,
@@ -132,9 +133,11 @@ public:
node_id node, OMX_U32 port_index, size_t size,
buffer_id *buffer, void **buffer_data) = 0;
+ // Allocate an OMX buffer of size |allotedSize|. Use |params| as the backup buffer, which
+ // may be larger.
virtual status_t allocateBufferWithBackup(
node_id node, OMX_U32 port_index, const sp<IMemory> &params,
- buffer_id *buffer) = 0;
+ buffer_id *buffer, OMX_U32 allottedSize) = 0;
virtual status_t freeBuffer(
node_id node, OMX_U32 port_index, buffer_id buffer) = 0;