summaryrefslogtreecommitdiffstats
path: root/include/media/MediaPlayerInterface.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-02-08 17:26:17 -0800
committerGlenn Kasten <gkasten@google.com>2011-02-23 15:02:56 -0800
commit1173118eace0e9e347cb007f0da817cee87579ed (patch)
treed2d23b2120010097d1edda29cd0adffd938105c3 /include/media/MediaPlayerInterface.h
parentf7f3e824a8cb2b38355db8e4f99e43b90ee71ce4 (diff)
downloadframeworks_av-1173118eace0e9e347cb007f0da817cee87579ed.zip
frameworks_av-1173118eace0e9e347cb007f0da817cee87579ed.tar.gz
frameworks_av-1173118eace0e9e347cb007f0da817cee87579ed.tar.bz2
Bug 3438258 Add SurfaceTexture as MediaPlayer sink
This change enables the use of a SurfaceTexture in place of a Surface as the video sink for an android.media.MediaPlayer. The new API MediaPlayer.setTexture is currently hidden. This includes: - New Java and C++ interfaces - C++ plumbing and implementation (JNI, Binder) - Stagefright AwesomePlayer and NuPlayer use ANativeWindow (either Surface or SurfaceTextureClient) Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
Diffstat (limited to 'include/media/MediaPlayerInterface.h')
-rw-r--r--include/media/MediaPlayerInterface.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index 048f041..117d7eb 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -34,6 +34,7 @@ namespace android {
class Parcel;
class ISurface;
class Surface;
+class ISurfaceTexture;
template<typename T> class SortedVector;
@@ -112,7 +113,13 @@ public:
return INVALID_OPERATION;
}
+ // pass the buffered Surface to the media player service
virtual status_t setVideoSurface(const sp<Surface>& surface) = 0;
+
+ // pass the buffered ISurfaceTexture to the media player service
+ virtual status_t setVideoSurfaceTexture(
+ const sp<ISurfaceTexture>& surfaceTexture) = 0;
+
virtual status_t prepare() = 0;
virtual status_t prepareAsync() = 0;
virtual status_t start() = 0;
@@ -177,7 +184,7 @@ protected:
sp<AudioSink> mAudioSink;
};
-// Implement this class for media players that output directo to hardware
+// Implement this class for media players that output audio directly to hardware
class MediaPlayerHWInterface : public MediaPlayerBase
{
public: