| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 |
| 11 | #ifndef PC_MEDIA_FACTORY_H_ |
| 12 | #define PC_MEDIA_FACTORY_H_ |
| 13 |
| 14 | #include <memory> |
| 15 |
| 16 | #include "api/environment/environment.h" |
| 17 | #include "call/call.h" |
| 18 | #include "call/call_config.h" |
| 19 | #include "media/base/media_engine.h" |
| 20 |
| 21 | namespace webrtc { |
| 22 |
| 23 | // PeerConnectionFactoryDependencies is forward declared because of circular |
| 24 | // dependency between MediaFactory and PeerConnectionFactoryDependencies: |
| 25 | // PeerConnectionFactoryDependencies keeps an instance of MediaFactory and thus |
| 26 | // needs to know how to destroy it. |
| 27 | // MediaFactory mentions PeerConnectionFactoryDependencies in api, but does not |
| 28 | // need its full definition. |
| 29 | struct PeerConnectionFactoryDependencies; |
| 30 |
| 31 | // Interface repsponsible for constructing media specific classes for |
| 32 | // PeerConnectionFactory and PeerConnection. |
| 33 | class MediaFactory { |
| 34 | public: |
| 35 | virtual ~MediaFactory() = default; |
| 36 |
| 37 | virtual std::unique_ptr<Call> CreateCall(const CallConfig& config) = 0; |
| 38 | virtual std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine( |
| 39 | const Environment& env, |
| 40 | PeerConnectionFactoryDependencies& dependencies) = 0; |
| 41 | }; |
| 42 |
| 43 | } // namespace webrtc |
| 44 |
| 45 | #endif // PC_MEDIA_FACTORY_H_ |
| 46 |