blob: eea5b5565c504688b9935fbdf682669c841ed271 [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)
Yves Gerey665174f2018-06-19 15:03:05 +020027PROXY_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.
32using PeerConnectionFactoryInterface::CreateVideoSource;
33PROXY_METHOD1(void, SetOptions, const Options&)
34PROXY_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*);
41PROXY_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*);
47PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
48 CreatePeerConnection,
49 const PeerConnectionInterface::RTCConfiguration&,
50 PeerConnectionDependencies);
51PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
52 CreateLocalMediaStream,
53 const std::string&)
54PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
55 CreateAudioSource,
56 const cricket::AudioOptions&)
57PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
58 CreateVideoSource,
59 std::unique_ptr<cricket::VideoCapturer>,
60 const MediaConstraintsInterface*)
61PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
62 CreateVideoSource,
63 std::unique_ptr<cricket::VideoCapturer>)
64PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
65 CreateVideoTrack,
66 const std::string&,
67 VideoTrackSourceInterface*)
68PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
69 CreateAudioTrack,
70 const std::string&,
71 AudioSourceInterface*)
72PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
73PROXY_METHOD0(void, StopAecDump)
deadbeefd99a2002017-01-18 08:55:23 -080074END_PROXY_MAP()
perkj@webrtc.org81134d02015-01-12 08:30:16 +000075
76} // namespace webrtc
77
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020078#endif // API_PEERCONNECTIONFACTORYPROXY_H_