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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // otherwise ignore them. | 194 // otherwise ignore them. |
195 void Initialize(DemuxerHost* host, | 195 void Initialize(DemuxerHost* host, |
196 const PipelineStatusCB& cb, | 196 const PipelineStatusCB& cb, |
197 bool enable_text_tracks) override; | 197 bool enable_text_tracks) override; |
198 void Stop() override; | 198 void Stop() override; |
199 void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override; | 199 void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override; |
200 base::Time GetTimelineOffset() const override; | 200 base::Time GetTimelineOffset() const override; |
201 DemuxerStream* GetStream(DemuxerStream::Type type) override; | 201 DemuxerStream* GetStream(DemuxerStream::Type type) override; |
202 base::TimeDelta GetStartTime() const override; | 202 base::TimeDelta GetStartTime() const override; |
203 int64_t GetMemoryUsage() const override; | 203 int64_t GetMemoryUsage() const override; |
| 204 void AbortPendingReads() override; |
204 | 205 |
205 // ChunkDemuxer reads are abortable. StartWaitingForSeek() and | 206 // ChunkDemuxer reads are abortable. StartWaitingForSeek() and |
206 // CancelPendingSeek() always abort pending and future reads until the | 207 // CancelPendingSeek() always abort pending and future reads until the |
207 // expected seek occurs, so that ChunkDemuxer can stay synchronized with the | 208 // expected seek occurs, so that ChunkDemuxer can stay synchronized with the |
208 // associated JS method calls. | 209 // associated JS method calls. |
209 void StartWaitingForSeek(base::TimeDelta seek_time) override; | 210 void StartWaitingForSeek(base::TimeDelta seek_time) override; |
210 void CancelPendingSeek(base::TimeDelta seek_time) override; | 211 void CancelPendingSeek(base::TimeDelta seek_time) override; |
211 | 212 |
212 // Registers a new |id| to use for AppendData() calls. |type| indicates | 213 // Registers a new |id| to use for AppendData() calls. |type| indicates |
213 // the MIME type for the data that we intend to append for this ID. | 214 // the MIME type for the data that we intend to append for this ID. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 // Sets |duration_| to |new_duration|, sets |user_specified_duration_| to -1 | 367 // Sets |duration_| to |new_duration|, sets |user_specified_duration_| to -1 |
367 // and notifies |host_|. | 368 // and notifies |host_|. |
368 void UpdateDuration(base::TimeDelta new_duration); | 369 void UpdateDuration(base::TimeDelta new_duration); |
369 | 370 |
370 // Returns the ranges representing the buffered data in the demuxer. | 371 // Returns the ranges representing the buffered data in the demuxer. |
371 Ranges<base::TimeDelta> GetBufferedRanges_Locked() const; | 372 Ranges<base::TimeDelta> GetBufferedRanges_Locked() const; |
372 | 373 |
373 // Start returning data on all DemuxerStreams. | 374 // Start returning data on all DemuxerStreams. |
374 void StartReturningData(); | 375 void StartReturningData(); |
375 | 376 |
376 // Aborts pending reads on all DemuxerStreams. | 377 void AbortPendingReads_Locked(); |
377 void AbortPendingReads(); | |
378 | 378 |
379 // Completes any pending reads if it is possible to do so. | 379 // Completes any pending reads if it is possible to do so. |
380 void CompletePendingReadsIfPossible(); | 380 void CompletePendingReadsIfPossible(); |
381 | 381 |
382 // Seeks all SourceBufferStreams to |seek_time|. | 382 // Seeks all SourceBufferStreams to |seek_time|. |
383 void SeekAllSources(base::TimeDelta seek_time); | 383 void SeekAllSources(base::TimeDelta seek_time); |
384 | 384 |
385 // Generates and returns a unique media track id. | 385 // Generates and returns a unique media track id. |
386 static MediaTrack::Id GenerateMediaTrackId(); | 386 static MediaTrack::Id GenerateMediaTrackId(); |
387 | 387 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 int detected_text_track_count_; | 445 int detected_text_track_count_; |
446 | 446 |
447 std::map<MediaTrack::Id, const DemuxerStream*> track_id_to_demux_stream_map_; | 447 std::map<MediaTrack::Id, const DemuxerStream*> track_id_to_demux_stream_map_; |
448 | 448 |
449 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 449 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
450 }; | 450 }; |
451 | 451 |
452 } // namespace media | 452 } // namespace media |
453 | 453 |
454 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 454 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |