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

Unified Diff: media/filters/chunk_demuxer.h

Issue 2605993002: Experiment with more aggressive MSE GC on memory pressure (Closed)
Patch Set: rebase/resolve conflicts Created 3 years, 11 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 | « media/blink/webmediaplayer_params.cc ('k') | 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 020aa1417e4198da25871326c37fee2511d2c9a7..32eaded69fb2e42e255b8ba866af7b4c3c5e04bd 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -16,6 +16,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/memory_pressure_listener.h"
#include "base/synchronization/lock.h"
#include "media/base/byte_queue.h"
#include "media/base/demuxer.h"
@@ -66,6 +67,11 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
// https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
bool EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize);
+ void OnMemoryPressure(
+ DecodeTimestamp media_time,
+ base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level,
+ bool force_instant_gc);
+
// Signal to the stream that duration has changed to |duration|.
void OnSetDuration(base::TimeDelta duration);
@@ -270,6 +276,11 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
base::TimeDelta currentMediaTime,
size_t newDataSize);
+ void OnMemoryPressure(
+ base::TimeDelta currentMediaTime,
+ base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level,
+ bool force_instant_gc);
+
// Returns the current presentation duration.
double GetDuration();
double GetDuration_Locked();
« no previous file with comments | « media/blink/webmediaplayer_params.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698