summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-08-07 12:01:29 -0700
committerAndreas Huber <andih@google.com>2009-08-10 12:58:05 -0700
commitccf8b94169197875af6c89172015b9644919b064 (patch)
tree8ac3af6d1e44dd5dfd37168dc635e17329c990ae /include
parent07cbacc11705f1f05a1150083aad000c53942dea (diff)
downloadframeworks_base-ccf8b94169197875af6c89172015b9644919b064.zip
frameworks_base-ccf8b94169197875af6c89172015b9644919b064.tar.gz
frameworks_base-ccf8b94169197875af6c89172015b9644919b064.tar.bz2
Expose a variation of the createRenderer API that works on a plain Surface.
Diffstat (limited to 'include')
-rw-r--r--include/media/IOMX.h11
-rw-r--r--include/ui/Surface.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index 857b2bd..7e5ff61 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -31,6 +31,7 @@ class IMemory;
class IOMXObserver;
class IOMXRenderer;
class ISurface;
+class Surface;
class IOMX : public IInterface {
public:
@@ -87,6 +88,16 @@ public:
OMX_COLOR_FORMATTYPE colorFormat,
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
+ // the virtual "createRenderer" method above facilitating extraction
+ // of the ISurface from a regular Surface.
+ 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);
};
struct omx_message {
diff --git a/include/ui/Surface.h b/include/ui/Surface.h
index 5665c1f..d5dad31 100644
--- a/include/ui/Surface.h
+++ b/include/ui/Surface.h
@@ -35,8 +35,8 @@ namespace android {
// ---------------------------------------------------------------------------
class BufferMapper;
+class IOMX;
class Rect;
-class MediaPlayerImpl;
class Surface;
class SurfaceComposerClient;
struct per_client_cblk_t;
@@ -181,7 +181,7 @@ private:
// mediaplayer needs access to ISurface for display
friend class MediaPlayer;
friend class Test;
- friend class MediaPlayerImpl;
+ friend class IOMX;
const sp<ISurface>& getISurface() const { return mSurface; }
status_t getBufferLocked(int index);