diff options
author | Lajos Molnar <lajos@google.com> | 2015-06-01 14:58:37 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-06-01 15:31:13 -0700 |
commit | cc7cc67349b7a3f498882087aa42ffc05a2daf11 (patch) | |
tree | 8eee8d499bf395c14750b900a82ecc59d47e6dbd /media/libstagefright/OMXClient.cpp | |
parent | f9a3dce5d44b1ba598cc6f6a2e80da36e44618f7 (diff) | |
download | frameworks_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 'media/libstagefright/OMXClient.cpp')
-rw-r--r-- | media/libstagefright/OMXClient.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp index f1ebea2..c91a37f 100644 --- a/media/libstagefright/OMXClient.cpp +++ b/media/libstagefright/OMXClient.cpp @@ -90,7 +90,7 @@ struct MuxOMX : public IOMX { virtual status_t useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, - buffer_id *buffer); + buffer_id *buffer, OMX_U32 allottedSize); virtual status_t useGraphicBuffer( node_id node, OMX_U32 port_index, @@ -120,7 +120,7 @@ struct MuxOMX : public IOMX { virtual status_t allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, - buffer_id *buffer); + buffer_id *buffer, OMX_U32 allottedSize); virtual status_t freeBuffer( node_id node, OMX_U32 port_index, buffer_id buffer); @@ -322,8 +322,8 @@ status_t MuxOMX::getGraphicBufferUsage( status_t MuxOMX::useBuffer( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, - buffer_id *buffer) { - return getOMX(node)->useBuffer(node, port_index, params, buffer); + buffer_id *buffer, OMX_U32 allottedSize) { + return getOMX(node)->useBuffer(node, port_index, params, buffer, allottedSize); } status_t MuxOMX::useGraphicBuffer( @@ -375,9 +375,9 @@ status_t MuxOMX::allocateBuffer( status_t MuxOMX::allocateBufferWithBackup( node_id node, OMX_U32 port_index, const sp<IMemory> ¶ms, - buffer_id *buffer) { + buffer_id *buffer, OMX_U32 allottedSize) { return getOMX(node)->allocateBufferWithBackup( - node, port_index, params, buffer); + node, port_index, params, buffer, allottedSize); } status_t MuxOMX::freeBuffer( |