summaryrefslogtreecommitdiffstats
path: root/include/media/IOMX.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-09-15 12:49:11 -0700
committerAndreas Huber <andih@google.com>2009-09-15 12:49:11 -0700
commit1b84df1a0823fbcb9cec754311f53eaccfe85ae3 (patch)
treed6f4de4d8cb283ed7dbb0a8b0f5f9c4626a24fc6 /include/media/IOMX.h
parent85cca02ebdc636e9b3ed5894503671fd043bf2a7 (diff)
downloadframeworks_av-1b84df1a0823fbcb9cec754311f53eaccfe85ae3.zip
frameworks_av-1b84df1a0823fbcb9cec754311f53eaccfe85ae3.tar.gz
frameworks_av-1b84df1a0823fbcb9cec754311f53eaccfe85ae3.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/media/IOMX.h')
-rw-r--r--include/media/IOMX.h13
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 {