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

Unified Diff: media/filters/source_buffer_stream.h

Issue 341083004: Introduce the playback time into the MSE garbage collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/source_buffer_stream.cc » ('j') | media/filters/source_buffer_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_stream.h
diff --git a/media/filters/source_buffer_stream.h b/media/filters/source_buffer_stream.h
index 95b2e0970b16ecbde8e60307e9bdc5d3e07625f8..c051b0b22ece640f65eefbb2136edec4e25609c0 100644
--- a/media/filters/source_buffer_stream.h
+++ b/media/filters/source_buffer_stream.h
@@ -86,6 +86,12 @@ class MEDIA_EXPORT SourceBufferStream {
void Remove(base::TimeDelta start, base::TimeDelta end,
base::TimeDelta duration);
+ // Update the playback time.
+ // This playback time is used to avoid garbage collecting buffers
+ // corresponding to the playback time:
+ // MSE spec - 2.4.4 SourceBuffer Monitoring.
+ void NotifyMediaTimeUpdate(base::TimeDelta media_time);
+
// Changes the SourceBufferStream's state so that it will start returning
// buffers starting from the closest keyframe before |timestamp|.
void Seek(base::TimeDelta timestamp);
@@ -368,6 +374,11 @@ class MEDIA_EXPORT SourceBufferStream {
// emptied.
SourceBufferRange* selected_range_;
+ // Current media time.
+ // This does not need to be very accurate as long as it represents a lower
+ // bound of the media time.
+ base::TimeDelta current_media_time_;
+
// Queue of the next buffers to be returned from calls to GetNextBuffer(). If
// |track_buffer_| is empty, return buffers from |selected_range_|.
BufferQueue track_buffer_;
« no previous file with comments | « no previous file | media/filters/source_buffer_stream.cc » ('j') | media/filters/source_buffer_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698