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

Unified Diff: media/filters/chunk_demuxer.h

Issue 341083004: Introduce the playback time into the MSE garbage collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New flow to pass the media time to SourceBufferStream. Created 6 years, 6 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
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index f19a3d4f557fc33026962019f186122ac06a27f3..ddc1f1c53bd29f76178f91902bd20522e4efa933 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -43,7 +43,8 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
// Add buffers to this stream. Buffers are stored in SourceBufferStreams,
// which handle ordering and overlap resolution.
// Returns true if buffers were successfully added.
- bool Append(const StreamParser::BufferQueue& buffers);
+ bool Append(const StreamParser::BufferQueue& buffers,
+ base::TimeDelta media_time);
// Removes buffers between |start| and |end| according to the steps
// in the "Coded Frame Removal Algorithm" in the Media Source
@@ -367,6 +368,10 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
base::TimeDelta duration_;
+ // Current media time used to prevent garbage collecting buffers
+ // between the media time and the source buffer read position.
+ base::TimeDelta media_time_;
+
// The duration passed to the last SetDuration(). If
// SetDuration() is never called or an AppendData() call or
// a EndOfStream() call changes |duration_|, then this
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698