OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/base/factory.h" |
| 6 |
| 7 namespace media { |
| 8 |
| 9 FilterFactory::FilterFactory() {} |
| 10 |
| 11 FilterFactory::~FilterFactory() {} |
| 12 |
| 13 FilterFactoryCollection::FilterFactoryCollection() {} |
| 14 |
| 15 void FilterFactoryCollection::AddFactory(FilterFactory* factory) { |
| 16 factories_.push_back(factory); |
| 17 } |
| 18 |
| 19 MediaFilter* FilterFactoryCollection::Create(FilterType filter_type, |
| 20 const MediaFormat& media_format) { |
| 21 MediaFilter* filter = NULL; |
| 22 for (FactoryVector::iterator factory = factories_.begin(); |
| 23 !filter && factory != factories_.end(); |
| 24 ++factory) { |
| 25 filter = (*factory)->Create(filter_type, media_format); |
| 26 } |
| 27 return filter; |
| 28 } |
| 29 |
| 30 FilterFactoryCollection::~FilterFactoryCollection() {} |
| 31 |
| 32 |
| 33 } // namespace media |
OLD | NEW |