| Index: media/filters/chunk_demuxer.h
|
| diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
|
| index d5224c7e4ceb5d6334b763bec5b6f99b9598a53b..cf1676715d8a139653a9d9b9cd95ea20d71d2207 100644
|
| --- a/media/filters/chunk_demuxer.h
|
| +++ b/media/filters/chunk_demuxer.h
|
| @@ -57,6 +57,12 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
|
| void Remove(base::TimeDelta start, base::TimeDelta end,
|
| base::TimeDelta duration);
|
|
|
| + // If the buffer is full, attempts 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 EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize);
|
| +
|
| // Signal to the stream that duration has changed to |duration|.
|
| void OnSetDuration(base::TimeDelta duration);
|
|
|
| @@ -67,6 +73,9 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
|
| // Returns base::TimeDelta() if the stream has no buffered data.
|
| base::TimeDelta GetBufferedDuration() const;
|
|
|
| + // Returns the size of the buffered data in bytes.
|
| + size_t GetBufferedSize() const;
|
| +
|
| // Signal to the stream that buffers handed in through subsequent calls to
|
| // Append() belong to a media segment that starts at |start_timestamp|.
|
| void OnNewMediaSegment(DecodeTimestamp start_timestamp);
|
| @@ -244,6 +253,14 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| void Remove(const std::string& id, base::TimeDelta start,
|
| base::TimeDelta end);
|
|
|
| + // If the buffer is full, attempts 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 EvictCodedFrames(const std::string& id,
|
| + base::TimeDelta currentMediaTime,
|
| + size_t newDataSize);
|
| +
|
| // Returns the current presentation duration.
|
| double GetDuration();
|
| double GetDuration_Locked();
|
|
|