| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 | 778 |
| 778 void MediaSourceState::OnSourceInitDone( | 779 void MediaSourceState::OnSourceInitDone( |
| 779 const StreamParser::InitParameters& params) { | 780 const StreamParser::InitParameters& params) { |
| 780 DCHECK_EQ(state_, PENDING_PARSER_INIT); | 781 DCHECK_EQ(state_, PENDING_PARSER_INIT); |
| 781 state_ = PARSER_INITIALIZED; | 782 state_ = PARSER_INITIALIZED; |
| 782 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; | 783 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; |
| 783 base::ResetAndReturn(&init_cb_).Run(params); | 784 base::ResetAndReturn(&init_cb_).Run(params); |
| 784 } | 785 } |
| 785 | 786 |
| 786 } // namespace media | 787 } // namespace media |
| OLD | NEW |