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 /include | |
parent | f83dd80384f70da1f6d36d60e831439ff7739ad7 (diff) | |
download | frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.zip frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.tar.gz frameworks_av-e870772a78ffe08b1c14a791e368f1499f1be0f3.tar.bz2 |
OMX extension to support storing meta data in video input buffers during recording
bug - 3042125
Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
Diffstat (limited to 'include')
-rw-r--r-- | include/media/IOMX.h | 3 | ||||
-rw-r--r-- | include/media/stagefright/HardwareAPI.h | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h index 1f8ce71..fa775e7 100644 --- a/include/media/IOMX.h +++ b/include/media/IOMX.h @@ -79,6 +79,9 @@ public: node_id node, OMX_INDEXTYPE index, const void *params, size_t size) = 0; + virtual status_t storeMetaDataInBuffers( + node_id node, OMX_U32 port_index, OMX_BOOL enable) = 0; + virtual status_t enableGraphicBuffers( node_id node, OMX_U32 port_index, OMX_BOOL enable) = 0; diff --git a/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h index 4ded5e8..b009e1b 100644 --- a/include/media/stagefright/HardwareAPI.h +++ b/include/media/stagefright/HardwareAPI.h @@ -49,6 +49,32 @@ struct EnableAndroidNativeBuffersParams { OMX_BOOL enable; }; +// A pointer to this struct is passed to OMX_SetParameter() when the extension +// index "OMX.google.android.index.storeMetaDataInBuffers" +// is given. +// +// When meta data is stored in the video buffers passed between OMX clients +// and OMX components, interpretation of the buffer data is up to the +// buffer receiver, and the data may or may not be the actual video data, but +// some information helpful for the receiver to locate the actual data. +// The buffer receiver thus needs to know how to interpret what is stored +// in these buffers, with mechanisms pre-determined externally. How to +// interpret the meta data is outside of the scope of this method. +// +// Currently, this is specifically used to pass meta data from video source +// (camera component, for instance) to video encoder to avoid memcpying of +// input video frame data. To do this, bStoreMetaDta is set to OMX_TRUE. +// If bStoreMetaData is set to false, real YUV frame data will be stored +// in the buffers. In addition, if no OMX_SetParameter() call is made +// with the corresponding extension index, real YUV data is stored +// in the buffers. +struct StoreMetaDataInBuffersParams { + OMX_U32 nSize; + OMX_VERSIONTYPE nVersion; + OMX_U32 nPortIndex; + OMX_BOOL bStoreMetaData; +}; + // Color formats in the range [OMX_COLOR_FormatAndroidPrivateStart, // OMX_COLOR_FormatAndroidPrivateEnd) will be converted to a gralloc pixel // format when used to allocate Android native buffers via gralloc. The |