diff options
author | Robert Shih <robertshih@google.com> | 2014-08-29 18:02:56 -0700 |
---|---|---|
committer | Robert Shih <robertshih@google.com> | 2014-09-11 16:20:27 -0700 |
commit | 0ad776d2e4c6b4968d9dcd9bf34b962366b312a9 (patch) | |
tree | f641c387fc9020e9f652a12b99d5dd164011936d /media/libstagefright/httplive/LiveSession.h | |
parent | 8962e08c4989368d2c821b64f42632b6f5fb016e (diff) | |
download | frameworks_av-0ad776d2e4c6b4968d9dcd9bf34b962366b312a9.zip frameworks_av-0ad776d2e4c6b4968d9dcd9bf34b962366b312a9.tar.gz frameworks_av-0ad776d2e4c6b4968d9dcd9bf34b962366b312a9.tar.bz2 |
LiveSession: added onSwitchDown
additionally in this change
- AnotherPacketSource: added getEstimatedDurationUs that avoids
looping through buffered access units in most cases; this method
is called by LiveSession before triggering onSwitchDown. Also fix
the original getBufferedDurationUs to accumulate durations across
discontinuities.
Bug: 13742612
Change-Id: I135932ea0c74671b7019a3c7054844926c18bc14
Diffstat (limited to 'media/libstagefright/httplive/LiveSession.h')
-rw-r--r-- | media/libstagefright/httplive/LiveSession.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/httplive/LiveSession.h b/media/libstagefright/httplive/LiveSession.h index 5423f0f..a68faf0 100644 --- a/media/libstagefright/httplive/LiveSession.h +++ b/media/libstagefright/httplive/LiveSession.h @@ -108,6 +108,8 @@ private: kWhatChangeConfiguration3 = 'chC3', kWhatFinishDisconnect2 = 'fin2', kWhatSwapped = 'swap', + kWhatCheckSwitchDown = 'ckSD', + kWhatSwitchDown = 'sDwn', }; struct BandwidthItem { @@ -202,6 +204,7 @@ private: bool mFirstTimeUsValid; int64_t mFirstTimeUs; int64_t mLastSeekTimeUs; + sp<AMessage> mSwitchDownMonitor; KeyedVector<size_t, int64_t> mDiscontinuityAbsStartTimesUs; KeyedVector<size_t, int64_t> mDiscontinuityOffsetTimesUs; @@ -246,6 +249,8 @@ private: void onChangeConfiguration2(const sp<AMessage> &msg); void onChangeConfiguration3(const sp<AMessage> &msg); void onSwapped(const sp<AMessage> &msg); + void onCheckSwitchDown(); + void onSwitchDown(); void tryToFinishBandwidthSwitch(); void scheduleCheckBandwidthEvent(); |