blob: 9f962d84fc7fd625a65430700747c48e70894dce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BASE_COMPOSITE_DATA_SOURCE_FACTORY_H_
#define MEDIA_BASE_COMPOSITE_DATA_SOURCE_FACTORY_H_
#include <list>
#include <set>
#include "base/synchronization/lock.h"
#include "media/base/async_filter_factory_base.h"
namespace media {
class MEDIA_EXPORT CompositeDataSourceFactory
: public AsyncDataSourceFactoryBase {
public:
CompositeDataSourceFactory();
virtual ~CompositeDataSourceFactory();
// Add factory to this composite. Ownership is transferred here.
void AddFactory(DataSourceFactory* factory);
// DataSourceFactory method.
virtual DataSourceFactory* Clone() const OVERRIDE;
protected:
// AsyncDataSourceFactoryBase methods.
virtual bool AllowRequests() const OVERRIDE;
virtual AsyncDataSourceFactoryBase::BuildRequest* CreateRequest(
const std::string& url, const BuildCallback& callback) OVERRIDE;
private:
class BuildRequest;
typedef std::list<DataSourceFactory*> FactoryList;
FactoryList factories_;
DISALLOW_COPY_AND_ASSIGN(CompositeDataSourceFactory);
};
} // namespace media
#endif // MEDIA_BASE_COMPOSITE_DATA_SOURCE_FACTORY_H_
|