summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/IOMX.h3
-rw-r--r--include/media/stagefright/HardwareAPI.h12
2 files changed, 15 insertions, 0 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index cb36bbb..16a9342 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -85,6 +85,9 @@ public:
virtual status_t enableGraphicBuffers(
node_id node, OMX_U32 port_index, OMX_BOOL enable) = 0;
+ virtual status_t getGraphicBufferUsage(
+ node_id node, OMX_U32 port_index, OMX_U32* usage) = 0;
+
virtual status_t useBuffer(
node_id node, OMX_U32 port_index, const sp<IMemory> &params,
buffer_id *buffer) = 0;
diff --git a/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h
index 17908b4..d1ecaaf 100644
--- a/include/media/stagefright/HardwareAPI.h
+++ b/include/media/stagefright/HardwareAPI.h
@@ -87,6 +87,18 @@ struct UseAndroidNativeBufferParams {
const sp<android_native_buffer_t>& nativeBuffer;
};
+// A pointer to this struct is passed to OMX_GetParameter when the extension
+// index for the 'OMX.google.android.index.getAndroidNativeBufferUsage'
+// extension is given. The usage bits returned from this query will be used to
+// allocate the Gralloc buffers that get passed to the useAndroidNativeBuffer
+// command.
+struct GetAndroidNativeBufferUsageParams {
+ OMX_U32 nSize; // IN
+ OMX_VERSIONTYPE nVersion; // IN
+ OMX_U32 nPortIndex; // IN
+ OMX_U32 nUsage; // OUT
+};
+
} // namespace android
extern android::OMXPluginBase *createOMXPlugin();