blob: 7601ed144ec750b832be898bb0d58b0c96c15e92 [file] [log] [blame]
perkj@webrtc.org81134d02015-01-12 08:30:16 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2014 The WebRTC project authors. All Rights Reserved.
perkj@webrtc.org81134d02015-01-12 08:30:16 +00003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * 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.org81134d02015-01-12 08:30:16 +00009 */
jlmiller@webrtc.org5f93d0a2015-01-20 21:36:13 +000010
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef API_PEERCONNECTIONFACTORYPROXY_H_
12#define API_PEERCONNECTIONFACTORYPROXY_H_
perkj@webrtc.org81134d02015-01-12 08:30:16 +000013
kwibergd1fe2812016-04-27 06:47:29 -070014#include <memory>
perkj@webrtc.org81134d02015-01-12 08:30:16 +000015#include <string>
kwiberg0eb15ed2015-12-17 03:04:15 -080016#include <utility>
perkj@webrtc.org81134d02015-01-12 08:30:16 +000017
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "api/peerconnectioninterface.h"
19#include "api/proxy.h"
20#include "rtc_base/bind.h"
perkj@webrtc.org81134d02015-01-12 08:30:16 +000021
22namespace webrtc {
23
deadbeefb10f32f2017-02-08 01:38:21 -080024// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
25// are called on is an implementation detail.
nisse72c8d2b2016-04-15 03:49:07 -070026BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
deadbeefd99a2002017-01-18 08:55:23 -080027 PROXY_SIGNALING_THREAD_DESTRUCTOR()
deadbeef112b2e92017-02-10 20:13:37 -080028 // 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.org81134d02015-01-12 08:30:16 +000033 PROXY_METHOD1(void, SetOptions, const Options&)
deadbeefd99a2002017-01-18 08:55:23 -080034 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.org81134d02015-01-12 08:30:16 +000047 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
48 CreateLocalMediaStream, const std::string&)
49 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
50 CreateAudioSource, const MediaConstraintsInterface*)
htaa2a49d92016-03-04 02:51:39 -080051 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
52 CreateAudioSource,
53 const cricket::AudioOptions&)
perkja3ede6c2016-03-08 01:27:48 +010054 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
55 CreateVideoSource,
deadbeef112b2e92017-02-10 20:13:37 -080056 std::unique_ptr<cricket::VideoCapturer>,
perkj@webrtc.org81134d02015-01-12 08:30:16 +000057 const MediaConstraintsInterface*)
perkja3ede6c2016-03-08 01:27:48 +010058 PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
htaa2a49d92016-03-04 02:51:39 -080059 CreateVideoSource,
deadbeef112b2e92017-02-10 20:13:37 -080060 std::unique_ptr<cricket::VideoCapturer>)
perkj@webrtc.org81134d02015-01-12 08:30:16 +000061 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
perkja3ede6c2016-03-08 01:27:48 +010062 CreateVideoTrack,
63 const std::string&,
64 VideoTrackSourceInterface*)
perkj@webrtc.org81134d02015-01-12 08:30:16 +000065 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
66 CreateAudioTrack, const std::string&, AudioSourceInterface*)
ivocd66b44d2016-01-15 03:06:36 -080067 PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
ivoc797ef122015-10-22 03:25:41 -070068 PROXY_METHOD0(void, StopAecDump)
deadbeefd99a2002017-01-18 08:55:23 -080069END_PROXY_MAP()
perkj@webrtc.org81134d02015-01-12 08:30:16 +000070
71} // namespace webrtc
72
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020073#endif // API_PEERCONNECTIONFACTORYPROXY_H_