From d47dfcb5a2e5901c96fc92662cec7aa30f7f8843 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Fri, 27 Mar 2015 15:53:45 -0700 Subject: 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 --- include/media/IStreamSource.h | 7 +++++++ include/media/stagefright/Utils.h | 11 +++++++++++ 2 files changed, 18 insertions(+) (limited to 'include') 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 &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& meta, bool hasVideo, AString uriDebugString(const AString &uri, bool incognito = false); +struct HLSTime { + int32_t mSeq; + int64_t mTimeUs; + sp mMeta; + + HLSTime(const sp &meta = NULL); + int64_t getSegmentTimeUs(bool midpoint = false) const; +}; + +bool operator <(const HLSTime &t0, const HLSTime &t1); + } // namespace android #endif // UTILS_H_ -- cgit v1.1