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