diff options
author | Andreas Huber <andih@google.com> | 2009-09-15 12:49:11 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-09-15 12:49:11 -0700 |
commit | 9f9afef3d5da3be6812192e60797b1c035445c3c (patch) | |
tree | ef76ce488456bbe610d157b6379cd91b35e82c55 /include | |
parent | e80534ff59b2e62a0ddf4359147b81f5ba10de86 (diff) | |
download | frameworks_base-9f9afef3d5da3be6812192e60797b1c035445c3c.zip frameworks_base-9f9afef3d5da3be6812192e60797b1c035445c3c.tar.gz frameworks_base-9f9afef3d5da3be6812192e60797b1c035445c3c.tar.bz2 |
Added an API IOMX::createRendererFromJavaSurface.
This api allows to instantiate a renderer by specifying the hosting java Surface object. This hides the implementation details of (java-)Surface, (native-)Surface and friends.
Diffstat (limited to 'include')
-rw-r--r-- | include/media/IOMX.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h index 0014d5c..10e0197 100644 --- a/include/media/IOMX.h +++ b/include/media/IOMX.h @@ -25,6 +25,8 @@ #include <OMX_Core.h> #include <OMX_Video.h> +#include "jni.h" + namespace android { class IMemory; @@ -102,15 +104,22 @@ public: size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight) = 0; - // Note: This method is _not_ virtual, it exists as a wrapper around + // Note: These methods are _not_ virtual, it exists as a wrapper around // the virtual "createRenderer" method above facilitating extraction - // of the ISurface from a regular Surface. + // of the ISurface from a regular Surface or a java Surface object. sp<IOMXRenderer> createRenderer( const sp<Surface> &surface, const char *componentName, OMX_COLOR_FORMATTYPE colorFormat, size_t encodedWidth, size_t encodedHeight, size_t displayWidth, size_t displayHeight); + + sp<IOMXRenderer> createRendererFromJavaSurface( + JNIEnv *env, jobject javaSurface, + const char *componentName, + OMX_COLOR_FORMATTYPE colorFormat, + size_t encodedWidth, size_t encodedHeight, + size_t displayWidth, size_t displayHeight); }; struct omx_message { |