| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/filter_collection.h" | 5 #include "media/base/filter_collection.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| 11 FilterCollection::FilterCollection() {} | 11 FilterCollection::FilterCollection() {} |
| 12 | 12 |
| 13 FilterCollection::~FilterCollection() {} | 13 FilterCollection::~FilterCollection() {} |
| 14 | 14 |
| 15 void FilterCollection::SetDemuxerFactory(DemuxerFactory* factory) { | 15 void FilterCollection::SetDemuxerFactory(scoped_ptr<DemuxerFactory> factory) { |
| 16 DCHECK(factory); | 16 DCHECK(factory.get()); |
| 17 demuxer_factory_.reset(factory); | 17 demuxer_factory_ = factory.Pass(); |
| 18 } | 18 } |
| 19 | 19 |
| 20 DemuxerFactory* FilterCollection::GetDemuxerFactory() { | 20 DemuxerFactory* FilterCollection::GetDemuxerFactory() { |
| 21 return demuxer_factory_.get(); | 21 return demuxer_factory_.get(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void FilterCollection::AddVideoDecoder(VideoDecoder* filter) { | 24 void FilterCollection::AddVideoDecoder(VideoDecoder* filter) { |
| 25 AddFilter(VIDEO_DECODER, filter); | 25 AddFilter(VIDEO_DECODER, filter); |
| 26 } | 26 } |
| 27 | 27 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ++it; | 88 ++it; |
| 89 } | 89 } |
| 90 | 90 |
| 91 if (it != filters_.end()) { | 91 if (it != filters_.end()) { |
| 92 *filter_out = it->second.get(); | 92 *filter_out = it->second.get(); |
| 93 filters_.erase(it); | 93 filters_.erase(it); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace media | 97 } // namespace media |
| OLD | NEW |