summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-04-03 18:48:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-03 18:48:28 +0000
commit002135d149d8604e972d1b353d768f293fbce15f (patch)
tree2b574bf6a084149bb75975e372b2f0516bf2276c /include
parentaa80951a578c1843708227b63456474f99e5e868 (diff)
parentd47dfcb5a2e5901c96fc92662cec7aa30f7f8843 (diff)
downloadframeworks_av-002135d149d8604e972d1b353d768f293fbce15f.zip
frameworks_av-002135d149d8604e972d1b353d768f293fbce15f.tar.gz
frameworks_av-002135d149d8604e972d1b353d768f293fbce15f.tar.bz2
Merge "HLS: misc bug fixes"
Diffstat (limited to 'include')
-rw-r--r--include/media/IStreamSource.h7
-rw-r--r--include/media/stagefright/Utils.h11
2 files changed, 18 insertions, 0 deletions
diff --git a/include/media/IStreamSource.h b/include/media/IStreamSource.h
index 677119b..149bd49 100644
--- a/include/media/IStreamSource.h
+++ b/include/media/IStreamSource.h
@@ -81,6 +81,13 @@ struct IStreamListener : public IInterface {
// with the next PTS occuring in the stream. The value is of type int64_t.
static const char *const kKeyMediaTimeUs;
+ // Optionally signalled as part of a discontinuity that includes
+ // DISCONTINUITY_TIME. It indicates the media time (in us) of a recent
+ // sample from the same content, and is used as a hint for the parser to
+ // handle PTS wraparound. This is required when a new parser is created
+ // to continue parsing content from the same timeline.
+ static const char *const kKeyRecentMediaTimeUs;
+
virtual void issueCommand(
Command cmd, bool synchronous, const sp<AMessage> &msg = NULL) = 0;
};
diff --git a/include/media/stagefright/Utils.h b/include/media/stagefright/Utils.h
index a795c80..ec3a10e 100644
--- a/include/media/stagefright/Utils.h
+++ b/include/media/stagefright/Utils.h
@@ -65,6 +65,17 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
AString uriDebugString(const AString &uri, bool incognito = false);
+struct HLSTime {
+ int32_t mSeq;
+ int64_t mTimeUs;
+ sp<AMessage> mMeta;
+
+ HLSTime(const sp<AMessage> &meta = NULL);
+ int64_t getSegmentTimeUs(bool midpoint = false) const;
+};
+
+bool operator <(const HLSTime &t0, const HLSTime &t1);
+
} // namespace android
#endif // UTILS_H_