summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/mpeg2ts/AnotherPacketSource.h
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-03-18 10:31:13 -0700
committerChong Zhang <chz@google.com>2015-03-20 15:30:53 -0700
commita48d372833ccec13c96ece9efcc226e8beac7f59 (patch)
treed525483a442a026414d9ff33550153f65d007b93 /media/libstagefright/mpeg2ts/AnotherPacketSource.h
parent7c963e92bc11d4b6a22696c51f9abf42987a1f74 (diff)
downloadframeworks_av-a48d372833ccec13c96ece9efcc226e8beac7f59.zip
frameworks_av-a48d372833ccec13c96ece9efcc226e8beac7f59.tar.gz
frameworks_av-a48d372833ccec13c96ece9efcc226e8beac7f59.tar.bz2
HLS: allow pause/resume in the middle of a segment
- when down switching, decide whether to finish current segment based on bandwidth settings, abort current segment if needed. - when switching, pause new fetcher after the first 47K chunk, and go back to resume old fethcer to stop point immediately. - when old fetcher reaches stop point, swap packet sources and resume new fetcher. - mark switching as done as soon as old fecther reaches stop point. This allows us to resume bandwidth monitoring earlier, and do subsequent switches sooner. bug: 19567254 Change-Id: Iba4b5fb9b06541bb1e49592536648f5d4cbc69ab
Diffstat (limited to 'media/libstagefright/mpeg2ts/AnotherPacketSource.h')
-rw-r--r--media/libstagefright/mpeg2ts/AnotherPacketSource.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/mpeg2ts/AnotherPacketSource.h b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
index 809a858..d4fde7c 100644
--- a/media/libstagefright/mpeg2ts/AnotherPacketSource.h
+++ b/media/libstagefright/mpeg2ts/AnotherPacketSource.h
@@ -43,8 +43,12 @@ struct AnotherPacketSource : public MediaSource {
void clear();
+ // Returns true if we have any packets including discontinuities
bool hasBufferAvailable(status_t *finalResult);
+ // Returns true if we have packets that's not discontinuities
+ bool hasDataBufferAvailable(status_t *finalResult);
+
// Returns the difference between the last and the first queued
// presentation timestamps since the last discontinuity (if any).
int64_t getBufferedDurationUs(status_t *finalResult);