OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #include "media/filters/media_source_state.h" | 5 #include "media/filters/media_source_state.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "media/base/media_track.h" | 9 #include "media/base/media_track.h" |
10 #include "media/base/media_tracks.h" | 10 #include "media/base/media_tracks.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 if (video_) | 443 if (video_) |
444 video_->SetStreamMemoryLimit(memory_limit); | 444 video_->SetStreamMemoryLimit(memory_limit); |
445 break; | 445 break; |
446 case DemuxerStream::TEXT: | 446 case DemuxerStream::TEXT: |
447 for (TextStreamMap::iterator itr = text_stream_map_.begin(); | 447 for (TextStreamMap::iterator itr = text_stream_map_.begin(); |
448 itr != text_stream_map_.end(); ++itr) { | 448 itr != text_stream_map_.end(); ++itr) { |
449 itr->second->SetStreamMemoryLimit(memory_limit); | 449 itr->second->SetStreamMemoryLimit(memory_limit); |
450 } | 450 } |
451 break; | 451 break; |
452 case DemuxerStream::UNKNOWN: | 452 case DemuxerStream::UNKNOWN: |
| 453 case DemuxerStream::URL: |
453 case DemuxerStream::NUM_TYPES: | 454 case DemuxerStream::NUM_TYPES: |
454 NOTREACHED(); | 455 NOTREACHED(); |
455 break; | 456 break; |
456 } | 457 } |
457 } | 458 } |
458 | 459 |
459 bool MediaSourceState::IsSeekWaitingForData() const { | 460 bool MediaSourceState::IsSeekWaitingForData() const { |
460 if (audio_ && audio_->IsSeekWaitingForData()) | 461 if (audio_ && audio_->IsSeekWaitingForData()) |
461 return true; | 462 return true; |
462 | 463 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 | 741 |
741 void MediaSourceState::OnSourceInitDone( | 742 void MediaSourceState::OnSourceInitDone( |
742 const StreamParser::InitParameters& params) { | 743 const StreamParser::InitParameters& params) { |
743 DCHECK_EQ(state_, PENDING_PARSER_INIT); | 744 DCHECK_EQ(state_, PENDING_PARSER_INIT); |
744 state_ = PARSER_INITIALIZED; | 745 state_ = PARSER_INITIALIZED; |
745 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; | 746 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; |
746 base::ResetAndReturn(&init_cb_).Run(params); | 747 base::ResetAndReturn(&init_cb_).Run(params); |
747 } | 748 } |
748 | 749 |
749 } // namespace media | 750 } // namespace media |
OLD | NEW |