diff options
author | Andreas Huber <andih@google.com> | 2013-02-06 10:44:39 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2013-02-06 10:44:39 -0800 |
commit | 0c3f0fa983107a8b5a4d6274179d15333fde8d3c (patch) | |
tree | 6ede9b14751812fcd5b9101e3f53a1910a3ac7a5 /media/libstagefright/include | |
parent | 7f475c34ffc8e35345f2cceee2ef56a50bb5fea6 (diff) | |
download | frameworks_av-0c3f0fa983107a8b5a4d6274179d15333fde8d3c.zip frameworks_av-0c3f0fa983107a8b5a4d6274179d15333fde8d3c.tar.gz frameworks_av-0c3f0fa983107a8b5a4d6274179d15333fde8d3c.tar.bz2 |
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
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/LiveSession.h | 15 |
1 files changed, 14 insertions, 1 deletions
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<AMessage> ¬ify, + uint32_t flags = 0, bool uidValid = false, uid_t uid = 0); sp<DataSource> 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<AMessage> mNotify; uint32_t mFlags; bool mUIDValid; uid_t mUID; + bool mInPreparationPhase; + sp<LiveDataSource> mDataSource; sp<HTTPBase> 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); }; |