From 0c3f0fa983107a8b5a4d6274179d15333fde8d3c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Wed, 6 Feb 2013 10:44:39 -0800 Subject: HLS now properly publishes its "seekable" flags after connection has successfully completed and a sufficient amount of data fetched, and only then signals that preparation is completed. Change-Id: I7684a14238b826909f518f2af506966e522dfcfc --- media/libstagefright/include/LiveSession.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'media/libstagefright/include') diff --git a/media/libstagefright/include/LiveSession.h b/media/libstagefright/include/LiveSession.h index f329cc9..db44a33 100644 --- a/media/libstagefright/include/LiveSession.h +++ b/media/libstagefright/include/LiveSession.h @@ -35,7 +35,9 @@ struct LiveSession : public AHandler { // Don't log any URLs. kFlagIncognito = 1, }; - LiveSession(uint32_t flags = 0, bool uidValid = false, uid_t uid = 0); + LiveSession( + const sp ¬ify, + uint32_t flags = 0, bool uidValid = false, uid_t uid = 0); sp getDataSource(); @@ -53,6 +55,12 @@ struct LiveSession : public AHandler { bool isSeekable() const; bool hasDynamicDuration() const; + // Posted notification's "what" field will carry one of the following: + enum { + kWhatPrepared, + kWhatPreparationFailed, + }; + protected: virtual ~LiveSession(); @@ -76,10 +84,13 @@ private: unsigned long mBandwidth; }; + sp mNotify; uint32_t mFlags; bool mUIDValid; uid_t mUID; + bool mInPreparationPhase; + sp mDataSource; sp mHTTPDataSource; @@ -144,6 +155,8 @@ private: // This is computed by summing the durations of all segments before it. int64_t getSegmentStartTimeUs(int32_t seqNumber) const; + void signalEOS(status_t err); + DISALLOW_EVIL_CONSTRUCTORS(LiveSession); }; -- cgit v1.1