diff options
author | Glenn Kasten <gkasten@google.com> | 2011-06-23 16:43:24 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2011-11-16 15:25:30 -0800 |
commit | 9c0227a63c9903cf407da4a713ff619e49c6bc73 (patch) | |
tree | fa4abf755c8d500a684879a00ddfa3f38a341075 /include | |
parent | 5a4718183340a108b55eba7bf755b4432153caa1 (diff) | |
download | frameworks_base-9c0227a63c9903cf407da4a713ff619e49c6bc73.zip frameworks_base-9c0227a63c9903cf407da4a713ff619e49c6bc73.tar.gz frameworks_base-9c0227a63c9903cf407da4a713ff619e49c6bc73.tar.bz2 |
JetPlayer uses C++ Thread not createThreadEtc
This permits leveraging future improvements to Thread.
Change-Id: I60deed8565ed54f13d9f770c76504e411b154276
Diffstat (limited to 'include')
-rw-r--r-- | include/media/JetPlayer.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/media/JetPlayer.h b/include/media/JetPlayer.h index 16764a9..6d53989 100644 --- a/include/media/JetPlayer.h +++ b/include/media/JetPlayer.h @@ -65,7 +65,6 @@ public: private: - static int renderThread(void*); int render(); void fireUpdateOnStatusChange(); void fireEventsFromJetQueue(); @@ -97,6 +96,28 @@ private: char mJetFilePath[256]; + class JetPlayerThread : public Thread { + public: + JetPlayerThread(JetPlayer *player) : mPlayer(player) { + } + + protected: + virtual ~JetPlayerThread() {} + + private: + JetPlayer *mPlayer; + + bool threadLoop() { + int result; + result = mPlayer->render(); + return false; + } + + JetPlayerThread(const JetPlayerThread &); + JetPlayerThread &operator=(const JetPlayerThread &); + }; + + sp<JetPlayerThread> mThread; }; // end class JetPlayer |