summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive/PlaylistFetcher.h
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-03-06 14:00:54 -0800
committerChong Zhang <chz@google.com>2015-03-17 09:53:35 -0700
commitc4547ba77f78632172db3647a09659d9863d3b5c (patch)
treea1d76a900d2bafdb64414ccea16cacdcffead747 /media/libstagefright/httplive/PlaylistFetcher.h
parentc84eb736fd051c37e1d7e8585d14612713388a58 (diff)
downloadframeworks_av-c4547ba77f78632172db3647a09659d9863d3b5c.zip
frameworks_av-c4547ba77f78632172db3647a09659d9863d3b5c.tar.gz
frameworks_av-c4547ba77f78632172db3647a09659d9863d3b5c.tar.bz2
HLS: some fixes for seek with discontinuity.
- keep old fetcher when seeking, unless the URI is changing. - when restarting after a seek, check discontinuity seq, and queue format change if it's changed. - add a simple kill switch to abort when stop (or pause for seek). - when seeking, if searching for start time goes into 2nd segment, do not signal time discontinuity or reset first PTS. - use setFormat() to set format in AnotherPacketSource, otherwise video/audio flags are not updated and format are not cleared on discontinuities. - do not start queueing video access unit until first IDR after start bug: 19656539 Change-Id: I79108d26964f59ea00d2eeac8f5f9318747f8541
Diffstat (limited to 'media/libstagefright/httplive/PlaylistFetcher.h')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h
index 2f11949..6b1296f 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.h
+++ b/media/libstagefright/httplive/PlaylistFetcher.h
@@ -67,7 +67,7 @@ struct PlaylistFetcher : public AHandler {
int32_t startDiscontinuitySeq = 0,
bool adaptive = false);
- void pauseAsync();
+ void pauseAsync(bool immediate = false);
void stopAsync(bool clear = true);
@@ -130,13 +130,20 @@ private:
int32_t mSeqNumber;
int32_t mNumRetries;
bool mStartup;
+ bool mIDRFound;
bool mAdaptive;
bool mPrepared;
+ bool mTimeChangeSignaled;
int64_t mNextPTSTimeUs;
int32_t mMonitorQueueGeneration;
const int32_t mSubtitleGeneration;
+ int32_t mLastDiscontinuitySeq;
+
+ Mutex mStoppingLock;
+ bool mStopping;
+
enum RefreshState {
INITIAL_MINIMUM_RELOAD_DELAY,
FIRST_UNCHANGED_RELOAD_ATTEMPT,
@@ -152,7 +159,6 @@ private:
bool mFirstPTSValid;
uint64_t mFirstPTS;
int64_t mFirstTimeUs;
- int64_t mAbsoluteTimeAnchorUs;
sp<AnotherPacketSource> mVideoBuffer;
// Stores the initialization vector to decrypt the next block of cipher text, which can
@@ -175,6 +181,7 @@ private:
void postMonitorQueue(int64_t delayUs = 0, int64_t minDelayUs = 0);
void cancelMonitorQueue();
+ void setStopping(bool stopping);
int64_t delayUsToRefreshPlaylist() const;
status_t refreshPlaylist();