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 #include "media/filters/chunk_demuxer.h" | 5 #include "media/filters/chunk_demuxer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 } | 704 } |
705 | 705 |
706 // First disable all streams that need to be disabled and then enable streams | 706 // First disable all streams that need to be disabled and then enable streams |
707 // that are enabled. | 707 // that are enabled. |
708 for (const auto& stream : audio_streams_) { | 708 for (const auto& stream : audio_streams_) { |
709 if (enabled_streams.find(stream.get()) == enabled_streams.end()) { | 709 if (enabled_streams.find(stream.get()) == enabled_streams.end()) { |
710 DVLOG(1) << __func__ << ": disabling stream " << stream.get(); | 710 DVLOG(1) << __func__ << ": disabling stream " << stream.get(); |
711 stream->set_enabled(false, currTime); | 711 stream->set_enabled(false, currTime); |
712 } | 712 } |
713 } | 713 } |
714 for (const auto& stream : enabled_streams) { | 714 for (auto* stream : enabled_streams) { |
715 DVLOG(1) << __func__ << ": enabling stream " << stream; | 715 DVLOG(1) << __func__ << ": enabling stream " << stream; |
716 stream->set_enabled(true, currTime); | 716 stream->set_enabled(true, currTime); |
717 } | 717 } |
718 } | 718 } |
719 | 719 |
720 void ChunkDemuxer::OnSelectedVideoTrackChanged( | 720 void ChunkDemuxer::OnSelectedVideoTrackChanged( |
721 const std::vector<MediaTrack::Id>& track_ids, | 721 const std::vector<MediaTrack::Id>& track_ids, |
722 base::TimeDelta currTime) { | 722 base::TimeDelta currTime) { |
723 DCHECK_LE(track_ids.size(), 1u); | 723 DCHECK_LE(track_ids.size(), 1u); |
724 | 724 |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 } | 1329 } |
1330 | 1330 |
1331 void ChunkDemuxer::ShutdownAllStreams() { | 1331 void ChunkDemuxer::ShutdownAllStreams() { |
1332 for (auto itr = source_state_map_.begin(); itr != source_state_map_.end(); | 1332 for (auto itr = source_state_map_.begin(); itr != source_state_map_.end(); |
1333 ++itr) { | 1333 ++itr) { |
1334 itr->second->Shutdown(); | 1334 itr->second->Shutdown(); |
1335 } | 1335 } |
1336 } | 1336 } |
1337 | 1337 |
1338 } // namespace media | 1338 } // namespace media |
OLD | NEW |