summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-03-27 15:53:45 -0700
committerChong Zhang <chz@google.com>2015-04-02 16:31:09 -0700
commitd47dfcb5a2e5901c96fc92662cec7aa30f7f8843 (patch)
treeac077cfad563e38bf91e4b2c95e7e28056bf7439 /include
parentac41a6f253a69671f6e018fcc84daf0030615ca9 (diff)
downloadframeworks_av-d47dfcb5a2e5901c96fc92662cec7aa30f7f8843.zip
frameworks_av-d47dfcb5a2e5901c96fc92662cec7aa30f7f8843.tar.gz
frameworks_av-d47dfcb5a2e5901c96fc92662cec7aa30f7f8843.tar.bz2
HLS: misc bug fixes
- fix no target-duration case - fix for audio-only <=> audio/video switching - disable audio-only variants if there is at least one variant with video - fix mpeg2ts PTS wraparound when bandwidth adapting - tweak up/down switch marks bug: 19567254 Change-Id: Ib46144203c56dfc96eccd6ddaa3867e8a4f2c6a9
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_