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 #ifndef MEDIA_BASE_FILTER_FACTORIES_H_ | 4 #ifndef MEDIA_BASE_FILTER_FACTORIES_H_ |
5 #define MEDIA_BASE_FILTER_FACTORIES_H_ | 5 #define MEDIA_BASE_FILTER_FACTORIES_H_ |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 | 8 |
9 #include "media/base/pipeline.h" | 9 #include "media/base/pipeline.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 virtual ~DataSourceFactory(); | 21 virtual ~DataSourceFactory(); |
22 | 22 |
23 // Builds a DataSource for |url| and returns it via |callback|. | 23 // Builds a DataSource for |url| and returns it via |callback|. |
24 virtual void Build(const std::string& url, BuildCallback* callback) = 0; | 24 virtual void Build(const std::string& url, BuildCallback* callback) = 0; |
25 | 25 |
26 // Makes a copy of this factory. | 26 // Makes a copy of this factory. |
27 // NOTE: Pending requests are not cloned. | 27 // NOTE: Pending requests are not cloned. |
28 virtual DataSourceFactory* Clone() const = 0; | 28 virtual DataSourceFactory* Clone() const = 0; |
29 }; | 29 }; |
30 | 30 |
| 31 class Demuxer; |
| 32 |
| 33 // Asynchronous factory interface for building Demuxer objects. |
| 34 class DemuxerFactory { |
| 35 public: |
| 36 // Ownership of the Demuxer is transferred through this callback. |
| 37 typedef Callback2<PipelineError, Demuxer*>::Type BuildCallback; |
| 38 |
| 39 virtual ~DemuxerFactory(); |
| 40 |
| 41 // Builds a Demuxer for |url| and returns it via |callback|. |
| 42 virtual void Build(const std::string& url, BuildCallback* callback) = 0; |
| 43 |
| 44 // Makes a copy of this factory. |
| 45 // NOTE: Pending requests are not cloned. |
| 46 virtual DemuxerFactory* Clone() const = 0; |
| 47 }; |
| 48 |
31 } // namespace media | 49 } // namespace media |
32 | 50 |
33 #endif // MEDIA_BASE_FILTER_FACTORIES_H_ | 51 #endif // MEDIA_BASE_FILTER_FACTORIES_H_ |
OLD | NEW |