summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-10-22 14:07:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-22 14:07:41 -0700
commit5b2146fc017b02bb5f096b1ac336efd3558a117c (patch)
tree712e229b5079d927252391acd9ef6a7cd43679bb /include/media
parent7f6ff8eb6eed438590e24f0b536c65110976bcfb (diff)
parente870772a78ffe08b1c14a791e368f1499f1be0f3 (diff)
downloadframeworks_av-5b2146fc017b02bb5f096b1ac336efd3558a117c.zip
frameworks_av-5b2146fc017b02bb5f096b1ac336efd3558a117c.tar.gz
frameworks_av-5b2146fc017b02bb5f096b1ac336efd3558a117c.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.h3
-rw-r--r--include/media/stagefright/HardwareAPI.h26
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