Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ffmpeg_demuxer.h" 5 #include "media/filters/ffmpeg_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 1626
1627 // First disable all streams that need to be disabled and then enable streams 1627 // First disable all streams that need to be disabled and then enable streams
1628 // that are enabled. 1628 // that are enabled.
1629 for (const auto& stream : streams_) { 1629 for (const auto& stream : streams_) {
1630 if (stream && stream->type() == DemuxerStream::AUDIO && 1630 if (stream && stream->type() == DemuxerStream::AUDIO &&
1631 enabled_streams.find(stream.get()) == enabled_streams.end()) { 1631 enabled_streams.find(stream.get()) == enabled_streams.end()) {
1632 DVLOG(1) << __func__ << ": disabling stream " << stream.get(); 1632 DVLOG(1) << __func__ << ": disabling stream " << stream.get();
1633 stream->set_enabled(false, currTime); 1633 stream->set_enabled(false, currTime);
1634 } 1634 }
1635 } 1635 }
1636 for (const auto& stream : enabled_streams) { 1636 for (auto* stream : enabled_streams) {
1637 DCHECK(stream); 1637 DCHECK(stream);
1638 DVLOG(1) << __func__ << ": enabling stream " << stream; 1638 DVLOG(1) << __func__ << ": enabling stream " << stream;
1639 stream->set_enabled(true, currTime); 1639 stream->set_enabled(true, currTime);
1640 } 1640 }
1641 } 1641 }
1642 1642
1643 void FFmpegDemuxer::OnSelectedVideoTrackChanged( 1643 void FFmpegDemuxer::OnSelectedVideoTrackChanged(
1644 const std::vector<MediaTrack::Id>& track_ids, 1644 const std::vector<MediaTrack::Id>& track_ids,
1645 base::TimeDelta currTime) { 1645 base::TimeDelta currTime) {
1646 DCHECK(task_runner_->BelongsToCurrentThread()); 1646 DCHECK(task_runner_->BelongsToCurrentThread());
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 1816
1817 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { 1817 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) {
1818 DCHECK(task_runner_->BelongsToCurrentThread()); 1818 DCHECK(task_runner_->BelongsToCurrentThread());
1819 for (const auto& stream : streams_) { 1819 for (const auto& stream : streams_) {
1820 if (stream) 1820 if (stream)
1821 stream->SetLiveness(liveness); 1821 stream->SetLiveness(liveness);
1822 } 1822 }
1823 } 1823 }
1824 1824
1825 } // namespace media 1825 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698