diff options
author | James Dong <jdong@google.com> | 2010-10-22 14:07:41 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-22 14:07:41 -0700 |
commit | 2351e69a13e8b9372cc4a33d28c1fd230f51faa3 (patch) | |
tree | 22d0d65011668acd4383e4eae09e0ba032a6d0c2 /include/media | |
parent | 2191b4b22f4bb497ec08f503c37d112428968afe (diff) | |
parent | 387e38dd87ae9c04ef79ebe06ea798762916ff5c (diff) | |
download | frameworks_base-2351e69a13e8b9372cc4a33d28c1fd230f51faa3.zip frameworks_base-2351e69a13e8b9372cc4a33d28c1fd230f51faa3.tar.gz frameworks_base-2351e69a13e8b9372cc4a33d28c1fd230f51faa3.tar.bz2 |
Merge "OMX extension to support storing meta data in video input buffers during recording"
Diffstat (limited to 'include/media')
-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 |