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

Unified Diff: public/platform/WebSourceBuffer.h

Issue 1013923002: Fix MSE GC, make it less aggressive, more spec-compliant (Blink CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: m_loader might be released before didFail, if appendStream failed due to full buffer Created 5 years, 4 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 | « Source/modules/mediasource/SourceBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebSourceBuffer.h
diff --git a/public/platform/WebSourceBuffer.h b/public/platform/WebSourceBuffer.h
index 689504b47cf9dd0789cf73c360b571c32fe829ab..f394d7a35f33363ad410564e49bdec2d28a42c02 100644
--- a/public/platform/WebSourceBuffer.h
+++ b/public/platform/WebSourceBuffer.h
@@ -53,6 +53,14 @@ public:
virtual bool setMode(AppendMode) = 0;
virtual WebTimeRanges buffered() = 0;
+ // Run coded frame eviction/garbage collection algorithm.
+ // |currentPlaybackTime| is HTMLMediaElement::currentTime. The algorithm
+ // will try to preserve data around current playback position.
+ // |newDataSize| is size of new data about to be appended to SourceBuffer.
+ // Could be zero for appendStream if stream size is unknown in advance.
+ // Returns false if buffer is still full after eviction.
+ virtual bool evictCodedFrames(double currentPlaybackTime, size_t newDataSize) = 0;
+
// Appends data and runs the segment parser loop algorithm.
// The algorithm may update |*timestampOffset| if |timestampOffset| is not null.
virtual void append(const unsigned char* data, unsigned length, double* timestampOffset) = 0;
« no previous file with comments | « Source/modules/mediasource/SourceBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698