summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/HTTPStream.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-03-12 08:59:22 -0800
committerAndreas Huber <andih@google.com>2010-03-12 09:05:10 -0800
commite94bd14078d327ef2f800e69907efce641a13272 (patch)
treeb0316c579a69bc32d23c5881fe27003ec4f6e160 /media/libstagefright/include/HTTPStream.h
parent6fc13ab8d00819b7420d1b0a500896264e820409 (diff)
downloadframeworks_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/HTTPStream.h')
-rw-r--r--media/libstagefright/include/HTTPStream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/include/HTTPStream.h b/media/libstagefright/include/HTTPStream.h
index 43ef614..5d638f3 100644
--- a/media/libstagefright/include/HTTPStream.h
+++ b/media/libstagefright/include/HTTPStream.h
@@ -24,6 +24,7 @@
#include <media/stagefright/MediaErrors.h>
#include <utils/KeyedVector.h>
+#include <utils/threads.h>
namespace android {
@@ -54,10 +55,12 @@ public:
private:
enum State {
READY,
+ CONNECTING,
CONNECTED
};
State mState;
+ Mutex mLock;
int mSocket;
KeyedVector<string, string> mHeaders;