diff options
author | Andreas Huber <andih@google.com> | 2010-03-12 08:59:22 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-03-12 09:05:10 -0800 |
commit | e94bd14078d327ef2f800e69907efce641a13272 (patch) | |
tree | b0316c579a69bc32d23c5881fe27003ec4f6e160 /media/libstagefright/include/AwesomePlayer.h | |
parent | 6fc13ab8d00819b7420d1b0a500896264e820409 (diff) | |
download | frameworks_av-e94bd14078d327ef2f800e69907efce641a13272.zip frameworks_av-e94bd14078d327ef2f800e69907efce641a13272.tar.gz frameworks_av-e94bd14078d327ef2f800e69907efce641a13272.tar.bz2 |
HTTPStream and HTTPDataSource now support cancellation of the connection process, AwesomePlayer takes advantage of this in cases where ::reset() or ::suspend() is called while in the preparation phase to bail out early. Also fixes in issue where the audio codec was not properly stopped if no audio player object ever took ownership.
Change-Id: I6d73defe6d276693853a469db267bb2668d07af5
related-to-bugs: 2475845,2414536
Diffstat (limited to 'media/libstagefright/include/AwesomePlayer.h')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 7106524..32c28c1 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -22,6 +22,7 @@ #include <media/MediaPlayerInterface.h> #include <media/stagefright/DataSource.h> +#include <media/stagefright/HTTPDataSource.h> #include <media/stagefright/OMXClient.h> #include <utils/threads.h> @@ -87,12 +88,13 @@ private: friend struct AwesomeEvent; enum Flags { - PLAYING = 1, - LOOPING = 2, - FIRST_FRAME = 4, - PREPARING = 8, - PREPARED = 16, - AT_EOS = 32, + PLAYING = 1, + LOOPING = 2, + FIRST_FRAME = 4, + PREPARING = 8, + PREPARED = 16, + AT_EOS = 32, + PREPARE_CANCELLED = 64, }; mutable Mutex mLock; @@ -160,6 +162,7 @@ private: MediaBuffer *mVideoBuffer; sp<Prefetcher> mPrefetcher; + sp<HTTPDataSource> mConnectingDataSource; struct SuspensionState { String8 mUri; |