Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Unified Diff: media/filters/chunk_demuxer.h

Issue 10800041: Update media duration if data is appended after the previous duration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ChunkDemuxer tests Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index d480c7f0af51098b2866d6f43a23299f4623a4c6..fb2ad891b01b73d3b7cac4e95976f844d0854c05 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -136,6 +136,16 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// Returns true if |source_id| is valid, false otherwise.
bool IsValidId(const std::string& source_id) const;
+ // Increases |duration_| if the newly appended |buffers| exceeds the current
+ // |duration_|.
+ void IncreaseDurationIfNecessary(const StreamParser::BufferQueue& buffers);
+
+ // Sets |duration_| to |new_duration| and notifies |host_|.
+ void UpdateDuration(base::TimeDelta new_duration);
+
+ // Returns the ranges representing the buffered data in the demuxer.
+ Ranges<base::TimeDelta> GetBufferedRanges() const;
+
mutable base::Lock lock_;
State state_;

Powered by Google App Engine
This is Rietveld 408576698