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

Unified Diff: media/filters/source_buffer_stream.h

Issue 794343003: Implement evictFrames() to support MSE's coded frame eviction algorithm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated existing SourceBufferStream unittests Created 6 years 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 | « media/filters/source_buffer_range.cc ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »
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 362a9ab6272f49d9a9f33f6af8f9da870397814e..40445c2b530303c646b2a4eb53876d9b21767790 100644
--- a/media/filters/source_buffer_stream.h
+++ b/media/filters/source_buffer_stream.h
@@ -89,6 +89,9 @@ class MEDIA_EXPORT SourceBufferStream {
void Remove(base::TimeDelta start, base::TimeDelta end,
base::TimeDelta duration);
+ // Frees up space if the SourceBufferStream is taking up too much memory.
+ bool GarbageCollectIfNeeded(DecodeTimestamp 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);
@@ -149,14 +152,13 @@ class MEDIA_EXPORT SourceBufferStream {
private:
friend class SourceBufferStreamTest;
- // Frees up space if the SourceBufferStream is taking up too much memory.
- void GarbageCollectIfNeeded();
-
// Attempts to delete approximately |total_bytes_to_free| amount of data
// |ranges_|, starting at the front of |ranges_| and moving linearly forward
// through the buffers. Deletes starting from the back if |reverse_direction|
// is true. Returns the number of bytes freed.
- int FreeBuffers(int total_bytes_to_free, bool reverse_direction);
+ int FreeBuffers(int total_bytes_to_free,
+ DecodeTimestamp media_time,
+ bool reverse_direction);
// Attempts to delete approximately |total_bytes_to_free| amount of data from
// |ranges_|, starting after the last appended buffer before the current
« no previous file with comments | « media/filters/source_buffer_range.cc ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698