| Index: media/filters/chunk_demuxer.h
|
| diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
|
| index 1ef8d263755e695e4f7f344eeb4bc039a2cb0e54..c475b6a68c9d475bac480a21dc8f973c065e4924 100644
|
| --- a/media/filters/chunk_demuxer.h
|
| +++ b/media/filters/chunk_demuxer.h
|
| @@ -56,6 +56,13 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
|
| void Remove(base::TimeDelta start, base::TimeDelta end,
|
| base::TimeDelta duration);
|
|
|
| + // If the buffer is full, runs Frame Removal to try to free up space, as
|
| + // specified in the "Coded Frame Eviction Algorithm" in the Media Source
|
| + // Extensions Spec. Returns false iff buffer is still full after running
|
| + // eviction
|
| + // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
|
| + bool EvictFrames(DecodeTimestamp media_time);
|
| +
|
| // Signal to the stream that duration has changed to |duration|.
|
| void OnSetDuration(base::TimeDelta duration);
|
|
|
| @@ -145,6 +152,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
|
|
| typedef base::Closure InitSegmentReceivedCB;
|
|
|
| + typedef base::Callback<base::TimeDelta(void)> GetMediaTimeCB;
|
| +
|
| // |open_cb| Run when Initialize() is called to signal that the demuxer
|
| // is ready to receive media data via AppenData().
|
| // |encrypted_media_init_data_cb| Run when the demuxer determines that an
|
| @@ -152,12 +161,15 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| // |enable_text| Process inband text tracks in the normal way when true,
|
| // otherwise ignore them.
|
| // |log_cb| Run when the demuxer needs to emit MediaLog messages.
|
| + // |get_media_time_cb| Should return current media playback time, which
|
| + // is used to ensure unconsumed data is not garbage collected.
|
| // |splice_frames_enabled| Indicates that it's okay to generate splice frames
|
| // per the MSE specification. Renderers must understand DecoderBuffer's
|
| // splice_timestamp() field.
|
| ChunkDemuxer(const base::Closure& open_cb,
|
| const EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
|
| const LogCB& log_cb,
|
| + const GetMediaTimeCB& get_media_time_cb,
|
| const scoped_refptr<MediaLog>& media_log,
|
| bool splice_frames_enabled);
|
| ~ChunkDemuxer() override;
|
| @@ -241,6 +253,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| void Remove(const std::string& id, base::TimeDelta start,
|
| base::TimeDelta end);
|
|
|
| + bool EvictFrames();
|
| +
|
| // Returns the current presentation duration.
|
| double GetDuration();
|
| double GetDuration_Locked();
|
| @@ -362,6 +376,7 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| // Callback used to report log messages that can help the web developer
|
| // figure out what is wrong with the content.
|
| LogCB log_cb_;
|
| + GetMediaTimeCB get_media_time_cb_;
|
| scoped_refptr<MediaLog> media_log_;
|
|
|
| PipelineStatusCB init_cb_;
|
|
|