| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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/source_buffer_state.h" | 5 #include "media/filters/source_buffer_state.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 for (const auto& it : video_streams_) { | 481 for (const auto& it : video_streams_) { |
| 482 it.second->SetStreamMemoryLimit(memory_limit); | 482 it.second->SetStreamMemoryLimit(memory_limit); |
| 483 } | 483 } |
| 484 break; | 484 break; |
| 485 case DemuxerStream::TEXT: | 485 case DemuxerStream::TEXT: |
| 486 for (const auto& it : text_streams_) { | 486 for (const auto& it : text_streams_) { |
| 487 it.second->SetStreamMemoryLimit(memory_limit); | 487 it.second->SetStreamMemoryLimit(memory_limit); |
| 488 } | 488 } |
| 489 break; | 489 break; |
| 490 case DemuxerStream::UNKNOWN: | 490 case DemuxerStream::UNKNOWN: |
| 491 case DemuxerStream::NUM_TYPES: | |
| 492 NOTREACHED(); | 491 NOTREACHED(); |
| 493 break; | 492 break; |
| 494 } | 493 } |
| 495 } | 494 } |
| 496 | 495 |
| 497 bool SourceBufferState::IsSeekWaitingForData() const { | 496 bool SourceBufferState::IsSeekWaitingForData() const { |
| 498 for (const auto& it : audio_streams_) { | 497 for (const auto& it : audio_streams_) { |
| 499 if (it.second->IsSeekWaitingForData()) | 498 if (it.second->IsSeekWaitingForData()) |
| 500 return true; | 499 return true; |
| 501 } | 500 } |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 } | 887 } |
| 889 void SourceBufferState::OnSourceInitDone( | 888 void SourceBufferState::OnSourceInitDone( |
| 890 const StreamParser::InitParameters& params) { | 889 const StreamParser::InitParameters& params) { |
| 891 DCHECK_EQ(state_, PENDING_PARSER_INIT); | 890 DCHECK_EQ(state_, PENDING_PARSER_INIT); |
| 892 state_ = PARSER_INITIALIZED; | 891 state_ = PARSER_INITIALIZED; |
| 893 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; | 892 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; |
| 894 base::ResetAndReturn(&init_cb_).Run(params); | 893 base::ResetAndReturn(&init_cb_).Run(params); |
| 895 } | 894 } |
| 896 | 895 |
| 897 } // namespace media | 896 } // namespace media |
| OLD | NEW |