1/*
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved.
3 *
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.
9 */
10
11#ifndef API_PEERCONNECTIONFACTORYPROXY_H_
12#define API_PEERCONNECTIONFACTORYPROXY_H_
13
14#include <memory>
15#include <string>
16#include <utility>
17
18#include "api/peerconnectioninterface.h"
19#include "api/proxy.h"
20#include "rtc_base/bind.h"
21
22namespace webrtc {
23
24// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
25// are called on is an implementation detail.
26BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
27PROXY_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_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
35 CreatePeerConnection,
36 const PeerConnectionInterface::RTCConfiguration&,
37 std::unique_ptr<cricket::PortAllocator>,
38 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
39 PeerConnectionObserver*);
40PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
41 CreatePeerConnection,
42 const PeerConnectionInterface::RTCConfiguration&,
43 PeerConnectionDependencies);
44PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
45 GetRtpSenderCapabilities,
46 cricket::MediaType);
47PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
48 GetRtpReceiverCapabilities,
49 cricket::MediaType);
50PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
51 CreateLocalMediaStream,
52 const std::string&)
53PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
54 CreateAudioSource,
55 const cricket::AudioOptions&)
56PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
57 CreateVideoSource,
58 std::unique_ptr<cricket::VideoCapturer>,
59 const MediaConstraintsInterface*)
60PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
61 CreateVideoSource,
62 std::unique_ptr<cricket::VideoCapturer>)
63PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
64 CreateVideoTrack,
65 const std::string&,
66 VideoTrackSourceInterface*)
67PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
68 CreateAudioTrack,
69 const std::string&,
70 AudioSourceInterface*)
71PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
72PROXY_METHOD0(void, StopAecDump)
73END_PROXY_MAP()
74
75} // namespace webrtc
76
77#endif // API_PEERCONNECTIONFACTORYPROXY_H_
78