perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2014 The WebRTC project authors. All Rights Reserved. |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 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. |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 9 | */ |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef API_PEERCONNECTIONFACTORYPROXY_H_ |
| 12 | #define API_PEERCONNECTIONFACTORYPROXY_H_ |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 13 | |
kwiberg | d1fe281 | 2016-04-27 06:47:29 -0700 | [diff] [blame] | 14 | #include <memory> |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 15 | #include <string> |
kwiberg | 0eb15ed | 2015-12-17 03:04:15 -0800 | [diff] [blame] | 16 | #include <utility> |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 17 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 18 | #include "api/peerconnectioninterface.h" |
| 19 | #include "api/proxy.h" |
| 20 | #include "rtc_base/bind.h" |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 21 | |
| 22 | namespace webrtc { |
| 23 | |
deadbeef | b10f32f | 2017-02-08 01:38:21 -0800 | [diff] [blame] | 24 | // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 25 | // are called on is an implementation detail. |
nisse | 72c8d2b | 2016-04-15 03:49:07 -0700 | [diff] [blame] | 26 | BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 27 | PROXY_SIGNALING_THREAD_DESTRUCTOR() |
deadbeef | 112b2e9 | 2017-02-10 20:13:37 -0800 | [diff] [blame] | 28 | // Use the overloads of CreateVideoSource that take raw VideoCapturer |
| 29 | // pointers from PeerConnectionFactoryInterface. |
| 30 | // TODO(deadbeef): Remove this using statement once those overloads are |
| 31 | // removed. |
| 32 | using PeerConnectionFactoryInterface::CreateVideoSource; |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 33 | PROXY_METHOD1(void, SetOptions, const Options&) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 34 | PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>, |
| 35 | CreatePeerConnection, |
| 36 | const PeerConnectionInterface::RTCConfiguration&, |
| 37 | const MediaConstraintsInterface*, |
| 38 | std::unique_ptr<cricket::PortAllocator>, |
| 39 | std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 40 | PeerConnectionObserver*); |
| 41 | PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>, |
| 42 | CreatePeerConnection, |
| 43 | const PeerConnectionInterface::RTCConfiguration&, |
| 44 | std::unique_ptr<cricket::PortAllocator>, |
| 45 | std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 46 | PeerConnectionObserver*); |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 47 | PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, |
| 48 | CreateLocalMediaStream, const std::string&) |
| 49 | PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 50 | CreateAudioSource, const MediaConstraintsInterface*) |
hta | a2a49d9 | 2016-03-04 02:51:39 -0800 | [diff] [blame] | 51 | PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 52 | CreateAudioSource, |
| 53 | const cricket::AudioOptions&) |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 54 | PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>, |
| 55 | CreateVideoSource, |
deadbeef | 112b2e9 | 2017-02-10 20:13:37 -0800 | [diff] [blame] | 56 | std::unique_ptr<cricket::VideoCapturer>, |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 57 | const MediaConstraintsInterface*) |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 58 | PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>, |
hta | a2a49d9 | 2016-03-04 02:51:39 -0800 | [diff] [blame] | 59 | CreateVideoSource, |
deadbeef | 112b2e9 | 2017-02-10 20:13:37 -0800 | [diff] [blame] | 60 | std::unique_ptr<cricket::VideoCapturer>) |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 61 | PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>, |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 62 | CreateVideoTrack, |
| 63 | const std::string&, |
| 64 | VideoTrackSourceInterface*) |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 65 | PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, |
| 66 | CreateAudioTrack, const std::string&, AudioSourceInterface*) |
ivoc | d66b44d | 2016-01-15 03:06:36 -0800 | [diff] [blame] | 67 | PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) |
ivoc | 797ef12 | 2015-10-22 03:25:41 -0700 | [diff] [blame] | 68 | PROXY_METHOD0(void, StopAecDump) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 69 | END_PROXY_MAP() |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 70 | |
| 71 | } // namespace webrtc |
| 72 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 73 | #endif // API_PEERCONNECTIONFACTORYPROXY_H_ |