| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ | 11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |
| 12 #define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ | 12 #define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <utility> | 16 #include <utility> |
| 17 | 17 |
| 18 #include "webrtc/api/peerconnectioninterface.h" | 18 #include "webrtc/api/peerconnectioninterface.h" |
| 19 #include "webrtc/api/proxy.h" | 19 #include "webrtc/api/proxy.h" |
| 20 #include "webrtc/base/bind.h" | 20 #include "webrtc/base/bind.h" |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 | 23 |
| 24 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods | 24 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 25 // are called on is an implementation detail. | 25 // are called on is an implementation detail. |
| 26 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) | 26 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) |
| 27 PROXY_SIGNALING_THREAD_DESTRUCTOR() | 27 PROXY_SIGNALING_THREAD_DESTRUCTOR() |
| 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; |
| 28 PROXY_METHOD1(void, SetOptions, const Options&) | 33 PROXY_METHOD1(void, SetOptions, const Options&) |
| 29 PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>, | 34 PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>, |
| 30 CreatePeerConnection, | 35 CreatePeerConnection, |
| 31 const PeerConnectionInterface::RTCConfiguration&, | 36 const PeerConnectionInterface::RTCConfiguration&, |
| 32 const MediaConstraintsInterface*, | 37 const MediaConstraintsInterface*, |
| 33 std::unique_ptr<cricket::PortAllocator>, | 38 std::unique_ptr<cricket::PortAllocator>, |
| 34 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, | 39 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 35 PeerConnectionObserver*); | 40 PeerConnectionObserver*); |
| 36 PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>, | 41 PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>, |
| 37 CreatePeerConnection, | 42 CreatePeerConnection, |
| 38 const PeerConnectionInterface::RTCConfiguration&, | 43 const PeerConnectionInterface::RTCConfiguration&, |
| 39 std::unique_ptr<cricket::PortAllocator>, | 44 std::unique_ptr<cricket::PortAllocator>, |
| 40 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, | 45 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 41 PeerConnectionObserver*); | 46 PeerConnectionObserver*); |
| 42 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, | 47 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, |
| 43 CreateLocalMediaStream, const std::string&) | 48 CreateLocalMediaStream, const std::string&) |
| 44 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, | 49 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 45 CreateAudioSource, const MediaConstraintsInterface*) | 50 CreateAudioSource, const MediaConstraintsInterface*) |
| 46 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, | 51 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 47 CreateAudioSource, | 52 CreateAudioSource, |
| 48 const cricket::AudioOptions&) | 53 const cricket::AudioOptions&) |
| 49 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>, | 54 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>, |
| 50 CreateVideoSource, | 55 CreateVideoSource, |
| 51 cricket::VideoCapturer*, | 56 std::unique_ptr<cricket::VideoCapturer>, |
| 52 const MediaConstraintsInterface*) | 57 const MediaConstraintsInterface*) |
| 53 PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>, | 58 PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>, |
| 54 CreateVideoSource, | 59 CreateVideoSource, |
| 55 cricket::VideoCapturer*) | 60 std::unique_ptr<cricket::VideoCapturer>) |
| 56 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>, | 61 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>, |
| 57 CreateVideoTrack, | 62 CreateVideoTrack, |
| 58 const std::string&, | 63 const std::string&, |
| 59 VideoTrackSourceInterface*) | 64 VideoTrackSourceInterface*) |
| 60 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, | 65 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, |
| 61 CreateAudioTrack, const std::string&, AudioSourceInterface*) | 66 CreateAudioTrack, const std::string&, AudioSourceInterface*) |
| 62 PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) | 67 PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) |
| 63 PROXY_METHOD0(void, StopAecDump) | 68 PROXY_METHOD0(void, StopAecDump) |
| 64 // TODO(ivoc): Remove the StartRtcEventLog and StopRtcEventLog functions as | 69 // TODO(ivoc): Remove the StartRtcEventLog and StopRtcEventLog functions as |
| 65 // soon as they are removed from PeerConnectionFactoryInterface. | 70 // soon as they are removed from PeerConnectionFactoryInterface. |
| 66 PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) | 71 PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) |
| 67 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) | 72 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) |
| 68 PROXY_METHOD0(void, StopRtcEventLog) | 73 PROXY_METHOD0(void, StopRtcEventLog) |
| 69 END_PROXY_MAP() | 74 END_PROXY_MAP() |
| 70 | 75 |
| 71 } // namespace webrtc | 76 } // namespace webrtc |
| 72 | 77 |
| 73 #endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ | 78 #endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |
| OLD | NEW |