| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 ChunkDemuxerStream* CreateDemuxerStream(DemuxerStream::Type type); | 288 ChunkDemuxerStream* CreateDemuxerStream(DemuxerStream::Type type); |
| 289 | 289 |
| 290 void OnNewTextTrack(ChunkDemuxerStream* text_stream, | 290 void OnNewTextTrack(ChunkDemuxerStream* text_stream, |
| 291 const TextTrackConfig& config); | 291 const TextTrackConfig& config); |
| 292 void OnNewMediaSegment(const std::string& source_id, | 292 void OnNewMediaSegment(const std::string& source_id, |
| 293 base::TimeDelta start_timestamp); | 293 base::TimeDelta start_timestamp); |
| 294 | 294 |
| 295 // Returns true if |source_id| is valid, false otherwise. | 295 // Returns true if |source_id| is valid, false otherwise. |
| 296 bool IsValidId(const std::string& source_id) const; | 296 bool IsValidId(const std::string& source_id) const; |
| 297 | 297 |
| 298 // Increases |duration_| if |last_appended_buffer_timestamp| exceeds the | 298 // Increases |duration_| to |new_duration|, if |new_duration| is higher. |
| 299 // current |duration_|. The |duration_| is set to the end buffered timestamp | 299 void IncreaseDurationIfNecessary(base::TimeDelta new_duration); |
| 300 // of |stream|. | |
| 301 void IncreaseDurationIfNecessary( | |
| 302 base::TimeDelta last_appended_buffer_timestamp, | |
| 303 ChunkDemuxerStream* stream); | |
| 304 | 300 |
| 305 // Decreases |duration_| if the buffered region is less than |duration_| when | 301 // Decreases |duration_| if the buffered region is less than |duration_| when |
| 306 // EndOfStream() is called. | 302 // EndOfStream() is called. |
| 307 void DecreaseDurationIfNecessary(); | 303 void DecreaseDurationIfNecessary(); |
| 308 | 304 |
| 309 // Sets |duration_| to |new_duration|, sets |user_specified_duration_| to -1 | 305 // Sets |duration_| to |new_duration|, sets |user_specified_duration_| to -1 |
| 310 // and notifies |host_|. | 306 // and notifies |host_|. |
| 311 void UpdateDuration(base::TimeDelta new_duration); | 307 void UpdateDuration(base::TimeDelta new_duration); |
| 312 | 308 |
| 313 // Returns the ranges representing the buffered data in the demuxer. | 309 // Returns the ranges representing the buffered data in the demuxer. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 370 |
| 375 // Indicates that splice frame generation is enabled. | 371 // Indicates that splice frame generation is enabled. |
| 376 const bool splice_frames_enabled_; | 372 const bool splice_frames_enabled_; |
| 377 | 373 |
| 378 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 374 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 379 }; | 375 }; |
| 380 | 376 |
| 381 } // namespace media | 377 } // namespace media |
| 382 | 378 |
| 383 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 379 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |