| Index: media/filters/source_buffer_state.h
|
| diff --git a/media/filters/source_buffer_state.h b/media/filters/source_buffer_state.h
|
| index 269cf326d0d5826f886f085c85abb91bcf049cb5..81d50596e4418583f314d020c465e948ccf211de 100644
|
| --- a/media/filters/source_buffer_state.h
|
| +++ b/media/filters/source_buffer_state.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/memory_pressure_listener.h"
|
| #include "media/base/audio_codecs.h"
|
| #include "media/base/demuxer.h"
|
| #include "media/base/demuxer_stream.h"
|
| @@ -75,6 +76,17 @@ class MEDIA_EXPORT SourceBufferState {
|
| // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
|
| bool EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize);
|
|
|
| + // Gets invoked when the system is experiencing memory pressure, i.e. there's
|
| + // not enough free memory. The |media_time| is the media playback position at
|
| + // the time of memory pressure notification (needed for accurate GC). The
|
| + // |memory_pressure_listener| indicates memory pressure severity. The
|
| + // |force_instant_gc| is used to force the MSE garbage collection algorithm to
|
| + // be run right away, without waiting for the next append.
|
| + void OnMemoryPressure(
|
| + DecodeTimestamp media_time,
|
| + base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level,
|
| + bool force_instant_gc);
|
| +
|
| // Returns true if currently parsing a media segment, or false otherwise.
|
| bool parsing_media_segment() const { return parsing_media_segment_; }
|
|
|
|
|