From c85ca5d6b573e1a663a10950578220b4580c285c Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Wed, 13 Jul 2011 12:59:34 -0700 Subject: MediaPlayer: add ANativeWindow (dis)connect calls This change makes MediaPlayer connect to the ANativeWindow to which it is going to render video frames and disconnect when it is done. Change-Id: I88ab5c2fe62493aabdc84a283ff31634f795d415 --- include/media/mediaplayer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index ea5a9d3..1136f6c 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -25,6 +25,8 @@ #include #include +class ANativeWindow; + namespace android { class Surface; @@ -196,6 +198,8 @@ private: status_t prepareAsync_l(); status_t getDuration_l(int *msec); status_t setDataSource(const sp& player); + void disconnectNativeWindow(); + status_t reset_l(); sp mPlayer; thread_id_t mLockThreadId; @@ -218,6 +222,8 @@ private: int mVideoHeight; int mAudioSessionId; float mSendLevel; + sp mConnectedWindow; + sp mConnectedWindowBinder; }; }; // namespace android -- cgit v1.1