summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/LiveSession.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/include/LiveSession.h')
-rw-r--r--media/libstagefright/include/LiveSession.h15
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> &notify,
+ 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);
};