summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive/PlaylistFetcher.h
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-04-24 17:22:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-24 17:22:36 +0000
commitbb6635d0aa35d6d31ec7de7c0d957720983fdc55 (patch)
treeb4e21defce1e51deb55186c9747ccf49786edb7b /media/libstagefright/httplive/PlaylistFetcher.h
parenta739165147bd58f7396d605fed1dfa8b68aaf6a8 (diff)
parent5abbd3dcbb0bb32a3d4b90dddbcf90458967eb6f (diff)
downloadframeworks_av-bb6635d0aa35d6d31ec7de7c0d957720983fdc55.zip
frameworks_av-bb6635d0aa35d6d31ec7de7c0d957720983fdc55.tar.gz
frameworks_av-bb6635d0aa35d6d31ec7de7c0d957720983fdc55.tar.bz2
Merge "HLS: make disconnect faster to prevent ANR"
Diffstat (limited to 'media/libstagefright/httplive/PlaylistFetcher.h')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h
index 1f5e9b0..c8ca457 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.h
+++ b/media/libstagefright/httplive/PlaylistFetcher.h
@@ -49,6 +49,7 @@ struct PlaylistFetcher : public AHandler {
kWhatPreparationFailed,
kWhatStartedAt,
kWhatStopReached,
+ kWhatPlaylistFetched,
kWhatMetadataDetected,
};
@@ -61,8 +62,6 @@ struct PlaylistFetcher : public AHandler {
int32_t getFetcherID() const;
- sp<DataSource> getDataSource();
-
void startAsync(
const sp<AnotherPacketSource> &audioSource,
const sp<AnotherPacketSource> &videoSource,
@@ -74,12 +73,14 @@ struct PlaylistFetcher : public AHandler {
int32_t startDiscontinuitySeq = -1,
LiveSession::SeekMode seekMode = LiveSession::kSeekModeExactPosition);
- void pauseAsync(float thresholdRatio);
+ void pauseAsync(float thresholdRatio, bool disconnect);
void stopAsync(bool clear = true);
void resumeUntilAsync(const sp<AMessage> &params);
+ void fetchPlaylistAsync();
+
uint32_t getStreamTypeMask() const {
return mStreamTypeMask;
}
@@ -100,6 +101,7 @@ private:
kWhatMonitorQueue = 'moni',
kWhatResumeUntil = 'rsme',
kWhatDownloadNext = 'dlnx',
+ kWhatFetchPlaylist = 'flst'
};
struct DownloadState;
@@ -114,7 +116,7 @@ private:
sp<AMessage> mNotify;
sp<AMessage> mStartTimeUsNotify;
- sp<HTTPBase> mHTTPDataSource;
+ sp<HTTPDownloader> mHTTPDownloader;
sp<LiveSession> mSession;
AString mURI;
@@ -197,7 +199,9 @@ private:
void postMonitorQueue(int64_t delayUs = 0, int64_t minDelayUs = 0);
void cancelMonitorQueue();
- void setStoppingThreshold(float thresholdRatio);
+ void setStoppingThreshold(float thresholdRatio, bool disconnect);
+ void resetStoppingThreshold(bool disconnect);
+ float getStoppingThreshold();
bool shouldPauseDownload();
int64_t delayUsToRefreshPlaylist() const;