summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive/LiveSession.h
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2014-07-29 18:34:36 -0700
committerRobert Shih <robertshih@google.com>2014-08-05 20:46:56 -0700
commit309aa8bf5e4cd66fe988adf2654cac3fadc2a1c3 (patch)
tree7958aa68f244c1f1d0d8b98efe934d1c3d60ce2d /media/libstagefright/httplive/LiveSession.h
parent3423bbdb05f843a64356fa24e8657f03ecbb7d65 (diff)
downloadframeworks_av-309aa8bf5e4cd66fe988adf2654cac3fadc2a1c3.zip
frameworks_av-309aa8bf5e4cd66fe988adf2654cac3fadc2a1c3.tar.gz
frameworks_av-309aa8bf5e4cd66fe988adf2654cac3fadc2a1c3.tar.bz2
httplive: timestamp reporting, track selection
Bug: 15153976 Bug: 15763638 Bug: 16351654 Change-Id: I4462276d4b7342647286a0ca4be11692ce52ff6d
Diffstat (limited to 'media/libstagefright/httplive/LiveSession.h')
-rw-r--r--media/libstagefright/httplive/LiveSession.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/media/libstagefright/httplive/LiveSession.h b/media/libstagefright/httplive/LiveSession.h
index ed3818f..5423f0f 100644
--- a/media/libstagefright/httplive/LiveSession.h
+++ b/media/libstagefright/httplive/LiveSession.h
@@ -125,8 +125,19 @@ private:
struct StreamItem {
const char *mType;
AString mUri;
- StreamItem() : mType("") {}
- StreamItem(const char *type) : mType(type) {}
+ size_t mCurDiscontinuitySeq;
+ int64_t mLastDequeuedTimeUs;
+ int64_t mLastSampleDurationUs;
+ StreamItem()
+ : mType(""),
+ mCurDiscontinuitySeq(0),
+ mLastDequeuedTimeUs(0),
+ mLastSampleDurationUs(0) {}
+ StreamItem(const char *type)
+ : mType(type),
+ mCurDiscontinuitySeq(0),
+ mLastDequeuedTimeUs(0),
+ mLastSampleDurationUs(0) {}
AString uriKey() {
AString key(mType);
key.append("URI");
@@ -147,7 +158,7 @@ private:
AString mMasterURL;
Vector<BandwidthItem> mBandwidthItems;
- ssize_t mPrevBandwidthIndex;
+ ssize_t mCurBandwidthIndex;
sp<M3UParser> mPlaylist;
@@ -163,6 +174,7 @@ private:
// we use this to track reconfiguration progress.
uint32_t mSwapMask;
+ KeyedVector<StreamType, sp<AnotherPacketSource> > mDiscontinuities;
KeyedVector<StreamType, sp<AnotherPacketSource> > mPacketSources;
// A second set of packet sources that buffer content for the variant we're switching to.
KeyedVector<StreamType, sp<AnotherPacketSource> > mPacketSources2;
@@ -187,6 +199,12 @@ private:
uint32_t mDisconnectReplyID;
uint32_t mSeekReplyID;
+ bool mFirstTimeUsValid;
+ int64_t mFirstTimeUs;
+ int64_t mLastSeekTimeUs;
+ KeyedVector<size_t, int64_t> mDiscontinuityAbsStartTimesUs;
+ KeyedVector<size_t, int64_t> mDiscontinuityOffsetTimesUs;
+
sp<PlaylistFetcher> addFetcher(const char *uri);
void onConnect(const sp<AMessage> &msg);