diff options
author | Chong Zhang <chz@google.com> | 2015-03-17 16:27:56 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2015-03-27 15:36:39 -0700 |
commit | 7c8708046117e03c0d38006bdd9685139df3ac6b (patch) | |
tree | e921d42722d2c627e3c002560dadd5ea501e3919 /media/libstagefright/mpeg2ts/AnotherPacketSource.h | |
parent | 514d7af22c5d6526309e71fadcff42b072c30241 (diff) | |
download | frameworks_av-7c8708046117e03c0d38006bdd9685139df3ac6b.zip frameworks_av-7c8708046117e03c0d38006bdd9685139df3ac6b.tar.gz frameworks_av-7c8708046117e03c0d38006bdd9685139df3ac6b.tar.bz2 |
HLS: faster switching and pause/resume on low buffer
- when upswitching, discard excessive buffering on low
bandwidth variant, switch to new variant earlier
- when downswitching, report newly found IDR positions
continuously, and switch as soon as new fetcher passes
playback position. This allows us to skip time-consuming
resumeUntil() of old fetcher most of the time
- implement pause/resume on low buffering, and notify
buffering percentage
- buffering parameter tuning, separate pause/resume/ready
buffer level and up/down switch buffer level, boost up
fetcher buffering significantly
bug: 19567254
Change-Id: I750dfcc6f861d78d16a71f501beb86d8129cb048
Diffstat (limited to 'media/libstagefright/mpeg2ts/AnotherPacketSource.h')
-rw-r--r-- | media/libstagefright/mpeg2ts/AnotherPacketSource.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.h b/media/libstagefright/mpeg2ts/AnotherPacketSource.h index d4fde7c..e126006 100644 --- a/media/libstagefright/mpeg2ts/AnotherPacketSource.h +++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.h @@ -70,8 +70,14 @@ struct AnotherPacketSource : public MediaSource { bool isFinished(int64_t duration) const; + void enable(bool enable); + sp<AMessage> getLatestEnqueuedMeta(); sp<AMessage> getLatestDequeuedMeta(); + sp<AMessage> getMetaAfterLastDequeued(int64_t delayUs); + + void trimBuffersAfterTimeUs(size_t discontinuitySeq, int64_t timeUs); + sp<AMessage> trimBuffersBeforeTimeUs(size_t discontinuitySeq, int64_t timeUs); protected: virtual ~AnotherPacketSource(); @@ -82,6 +88,7 @@ private: bool mIsAudio; bool mIsVideo; + bool mEnabled; sp<MetaData> mFormat; int64_t mLastQueuedTimeUs; List<sp<ABuffer> > mBuffers; |