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 <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 void AppendData(const std::string& id, const uint8* data, size_t length, | 236 void AppendData(const std::string& id, const uint8* data, size_t length, |
237 base::TimeDelta append_window_start, | 237 base::TimeDelta append_window_start, |
238 base::TimeDelta append_window_end, | 238 base::TimeDelta append_window_end, |
239 base::TimeDelta* timestamp_offset, | 239 base::TimeDelta* timestamp_offset, |
240 const InitSegmentReceivedCB& init_segment_received_cb); | 240 const InitSegmentReceivedCB& init_segment_received_cb); |
241 | 241 |
242 // Aborts parsing the current segment and reset the parser to a state where | 242 // Aborts parsing the current segment and reset the parser to a state where |
243 // it can accept a new segment. | 243 // it can accept a new segment. |
244 // Some pending frames can be emitted during that process. These frames are | 244 // Some pending frames can be emitted during that process. These frames are |
245 // applied |timestamp_offset|. | 245 // applied |timestamp_offset|. |
246 void Abort(const std::string& id, | 246 void ResetParserState(const std::string& id, |
247 base::TimeDelta append_window_start, | 247 base::TimeDelta append_window_start, |
248 base::TimeDelta append_window_end, | 248 base::TimeDelta append_window_end, |
249 base::TimeDelta* timestamp_offset); | 249 base::TimeDelta* timestamp_offset); |
250 | 250 |
251 // Remove buffers between |start| and |end| for the source buffer | 251 // Remove buffers between |start| and |end| for the source buffer |
252 // associated with |id|. | 252 // associated with |id|. |
253 void Remove(const std::string& id, base::TimeDelta start, | 253 void Remove(const std::string& id, base::TimeDelta start, |
254 base::TimeDelta end); | 254 base::TimeDelta end); |
255 | 255 |
256 // If the buffer is full, attempts to try to free up space, as specified in | 256 // If the buffer is full, attempts to try to free up space, as specified in |
257 // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec. | 257 // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec. |
258 // Returns false iff buffer is still full after running eviction. | 258 // Returns false iff buffer is still full after running eviction. |
259 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction | 259 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 // Indicates that splice frame generation is enabled. | 417 // Indicates that splice frame generation is enabled. |
418 const bool splice_frames_enabled_; | 418 const bool splice_frames_enabled_; |
419 | 419 |
420 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 420 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
421 }; | 421 }; |
422 | 422 |
423 } // namespace media | 423 } // namespace media |
424 | 424 |
425 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 425 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |