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.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/media/libstagefright/include/LiveSession.h b/media/libstagefright/include/LiveSession.h
index 3a11612..f329cc9 100644
--- a/media/libstagefright/include/LiveSession.h
+++ b/media/libstagefright/include/LiveSession.h
@@ -48,8 +48,10 @@ struct LiveSession : public AHandler {
// Blocks until seek is complete.
void seekTo(int64_t timeUs);
- status_t getDuration(int64_t *durationUs);
- bool isSeekable();
+ status_t getDuration(int64_t *durationUs) const;
+
+ bool isSeekable() const;
+ bool hasDynamicDuration() const;
protected:
virtual ~LiveSession();
@@ -95,10 +97,12 @@ private:
int32_t mSeqNumber;
int64_t mSeekTimeUs;
int32_t mNumRetries;
+ bool mStartOfPlayback;
- Mutex mLock;
+ mutable Mutex mLock;
Condition mCondition;
int64_t mDurationUs;
+ bool mDurationFixed; // Duration has been determined once and for all.
bool mSeekDone;
bool mDisconnectPending;
@@ -136,6 +140,10 @@ private:
static int SortByBandwidth(const BandwidthItem *, const BandwidthItem *);
+ // Returns the media time in us of the segment specified by seqNumber.
+ // This is computed by summing the durations of all segments before it.
+ int64_t getSegmentStartTimeUs(int32_t seqNumber) const;
+
DISALLOW_EVIL_CONSTRUCTORS(LiveSession);
};