blob: db52083567bd94f7253e937ee724c97f15c14e8a [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);
Florent Castelli72b751a2018-06-28 14:09:33 +020051PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
52 GetRtpSenderCapabilities,
53 cricket::MediaType);
54PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
55 GetRtpReceiverCapabilities,
56 cricket::MediaType);
Yves Gerey665174f2018-06-19 15:03:05 +020057PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
58 CreateLocalMediaStream,
59 const std::string&)
60PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
61 CreateAudioSource,
62 const cricket::AudioOptions&)
63PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
64 CreateVideoSource,
65 std::unique_ptr<cricket::VideoCapturer>,
66 const MediaConstraintsInterface*)
67PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
68 CreateVideoSource,
69 std::unique_ptr<cricket::VideoCapturer>)
70PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
71 CreateVideoTrack,
72 const std::string&,
73 VideoTrackSourceInterface*)
74PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
75 CreateAudioTrack,
76 const std::string&,
77 AudioSourceInterface*)
78PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
79PROXY_METHOD0(void, StopAecDump)
deadbeefd99a2002017-01-18 08:55:23 -080080END_PROXY_MAP()
perkj@webrtc.org81134d02015-01-12 08:30:16 +000081
82} // namespace webrtc
83
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020084#endif // API_PEERCONNECTIONFACTORYPROXY_H_