diff options
author | Chong Zhang <chz@google.com> | 2015-04-12 01:03:51 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2015-04-17 14:26:32 -0700 |
commit | 978449984366946a2e5c9f7cf350746f4306caf8 (patch) | |
tree | 21d406ec763c97554a5db234b49807ecb7a659b2 /media/libstagefright/httplive/PlaylistFetcher.h | |
parent | 2170233c49e50f3986cdc4f726016d6003cb5b8e (diff) | |
download | frameworks_av-978449984366946a2e5c9f7cf350746f4306caf8.zip frameworks_av-978449984366946a2e5c9f7cf350746f4306caf8.tar.gz frameworks_av-978449984366946a2e5c9f7cf350746f4306caf8.tar.bz2 |
HLS: reduce number of guessed wrong seq numbers
- account for playlist age in live streaming when calculating
segment time
- be more conservative on downswitching if bandwidth is unstable
- adjust forward or backward if guessed wrong seq number
- code refactor
bug: 19567254
Change-Id: I0b61cea888fdffd1b3ee2446747ed10152e9e7d7
Diffstat (limited to 'media/libstagefright/httplive/PlaylistFetcher.h')
-rw-r--r-- | media/libstagefright/httplive/PlaylistFetcher.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h index bb14a0d..cace649 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.h +++ b/media/libstagefright/httplive/PlaylistFetcher.h @@ -138,6 +138,7 @@ private: KeyedVector<AString, sp<ABuffer> > mAESKeyForURI; int64_t mLastPlaylistFetchTimeUs; + int64_t mPlaylistTimeUs; sp<M3UParser> mPlaylist; int32_t mSeqNumber; int32_t mNumRetries; @@ -238,8 +239,7 @@ private: void queueDiscontinuity( ATSParser::DiscontinuityType type, const sp<AMessage> &extra); - int32_t getSeqNumberWithAnchorTime( - int64_t anchorTimeUs, int64_t targetDurationUs) const; + bool adjustSeqNumberWithAnchorTime(int64_t anchorTimeUs); int32_t getSeqNumberForDiscontinuity(size_t discontinuitySeq) const; int32_t getSeqNumberForTime(int64_t timeUs) const; |