summaryrefslogtreecommitdiffstats
path: root/include/media/IOMX.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-07-31 11:52:50 -0700
committerAndreas Huber <andih@google.com>2009-07-31 12:48:53 -0700
commit8b938cdab5bd3d074d9b41bc2915fcfc11e47f27 (patch)
treef2015fc5b3786ef4e1a3db436cd0897727be3569 /include/media/IOMX.h
parent81573ec97eaf631cc63eedceb928e123dafd593c (diff)
downloadframeworks_av-8b938cdab5bd3d074d9b41bc2915fcfc11e47f27.zip
frameworks_av-8b938cdab5bd3d074d9b41bc2915fcfc11e47f27.tar.gz
frameworks_av-8b938cdab5bd3d074d9b41bc2915fcfc11e47f27.tar.bz2
The IOMX interface now instantiates IOMXRenderers to hide the details of hardware accelerated blitting.
Diffstat (limited to 'include/media/IOMX.h')
-rw-r--r--include/media/IOMX.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index 5c61c50..0010d84 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -23,6 +23,7 @@
#include <utils/String8.h>
#include <OMX_Core.h>
+#include <OMX_Video.h>
#define IOMX_USES_SOCKETS 0
@@ -30,6 +31,8 @@ namespace android {
class IMemory;
class IOMXObserver;
+class IOMXRenderer;
+class ISurface;
class IOMX : public IInterface {
public:
@@ -87,6 +90,13 @@ public:
OMX_U32 range_offset, OMX_U32 range_length,
OMX_U32 flags, OMX_TICKS timestamp) = 0;
#endif
+
+ virtual sp<IOMXRenderer> createRenderer(
+ const sp<ISurface> &surface,
+ const char *componentName,
+ OMX_COLOR_FORMATTYPE colorFormat,
+ size_t encodedWidth, size_t encodedHeight,
+ size_t displayWidth, size_t displayHeight) = 0;
};
struct omx_message {
@@ -155,6 +165,13 @@ public:
virtual void on_message(const omx_message &msg) = 0;
};
+class IOMXRenderer : public IInterface {
+public:
+ DECLARE_META_INTERFACE(OMXRenderer);
+
+ virtual void render(IOMX::buffer_id buffer) = 0;
+};
+
////////////////////////////////////////////////////////////////////////////////
class BnOMX : public BnInterface<IOMX> {
@@ -171,6 +188,13 @@ public:
uint32_t flags = 0);
};
+class BnOMXRenderer : public BnInterface<IOMXRenderer> {
+public:
+ virtual status_t onTransact(
+ uint32_t code, const Parcel &data, Parcel *reply,
+ uint32_t flags = 0);
+};
+
} // namespace android
#endif // ANDROID_IOMX_H_