OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // | 58 // |
59 // |duration| is the current duration of the presentation. It is | 59 // |duration| is the current duration of the presentation. It is |
60 // required by the computation outlined in the spec. | 60 // required by the computation outlined in the spec. |
61 void Remove(base::TimeDelta start, base::TimeDelta end, | 61 void Remove(base::TimeDelta start, base::TimeDelta end, |
62 base::TimeDelta duration); | 62 base::TimeDelta duration); |
63 | 63 |
64 // If the buffer is full, attempts to try to free up space, as specified in | 64 // If the buffer is full, attempts to try to free up space, as specified in |
65 // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec. | 65 // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec. |
66 // Returns false iff buffer is still full after running eviction. | 66 // Returns false iff buffer is still full after running eviction. |
67 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction | 67 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction |
68 bool EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize); | 68 bool EvictCodedFrames(base::TimeDelta media_time, size_t newDataSize); |
69 | 69 |
70 void OnMemoryPressure( | 70 void OnMemoryPressure( |
71 DecodeTimestamp media_time, | 71 DecodeTimestamp media_time, |
72 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level, | 72 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level, |
73 bool force_instant_gc); | 73 bool force_instant_gc); |
74 | 74 |
75 // Signal to the stream that duration has changed to |duration|. | 75 // Signal to the stream that duration has changed to |duration|. |
76 void OnSetDuration(base::TimeDelta duration); | 76 void OnSetDuration(base::TimeDelta duration); |
77 | 77 |
78 // Returns the range of buffered data in this stream, capped at |duration|. | 78 // Returns the range of buffered data in this stream, capped at |duration|. |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 int detected_text_track_count_; | 456 int detected_text_track_count_; |
457 | 457 |
458 std::map<MediaTrack::Id, ChunkDemuxerStream*> track_id_to_demux_stream_map_; | 458 std::map<MediaTrack::Id, ChunkDemuxerStream*> track_id_to_demux_stream_map_; |
459 | 459 |
460 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 460 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
461 }; | 461 }; |
462 | 462 |
463 } // namespace media | 463 } // namespace media |
464 | 464 |
465 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 465 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |