diff options
author | James Dong <jdong@google.com> | 2010-10-20 17:38:41 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-10-21 14:06:17 -0700 |
commit | e870772a78ffe08b1c14a791e368f1499f1be0f3 (patch) | |
tree | a443d9a157f12b32e524ae2953219d56dd3a770f /media/libmedia | |
parent | f83dd80384f70da1f6d36d60e831439ff7739ad7 (diff) | |
download | frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.tar.gz frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.tar.bz2 frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.zip |
OMX extension to support storing meta data in video input buffers during recording
bug - 3042125
Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/IOMX.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 40801a26d0..f975217a6a 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -24,6 +24,7 @@ enum { ENABLE_GRAPHIC_BUFFERS, USE_BUFFER, USE_GRAPHIC_BUFFER, + STORE_META_DATA_IN_BUFFERS, ALLOC_BUFFER, ALLOC_BUFFER_WITH_BACKUP, FREE_BUFFER, @@ -276,6 +277,19 @@ public: return err; } + virtual status_t storeMetaDataInBuffers( + node_id node, OMX_U32 port_index, OMX_BOOL enable) { + Parcel data, reply; + data.writeInterfaceToken(IOMX::getInterfaceDescriptor()); + data.writeIntPtr((intptr_t)node); + data.writeInt32(port_index); + data.writeInt32((uint32_t)enable); + remote()->transact(STORE_META_DATA_IN_BUFFERS, data, &reply); + + status_t err = reply.readInt32(); + return err; + } + virtual status_t allocateBuffer( node_id node, OMX_U32 port_index, size_t size, buffer_id *buffer, void **buffer_data) { @@ -634,6 +648,20 @@ status_t BnOMX::onTransact( return NO_ERROR; } + case STORE_META_DATA_IN_BUFFERS: + { + CHECK_INTERFACE(IOMX, data, reply); + + node_id node = (void*)data.readIntPtr(); + OMX_U32 port_index = data.readInt32(); + OMX_BOOL enable = (OMX_BOOL)data.readInt32(); + + status_t err = storeMetaDataInBuffers(node, port_index, enable); + reply->writeInt32(err); + + return NO_ERROR; + } + case ALLOC_BUFFER: { CHECK_INTERFACE(IOMX, data, reply); |