• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_PEER_CONNECTION_FACTORY_PROXY_H_
12 #define API_PEER_CONNECTION_FACTORY_PROXY_H_
13 
14 #include <memory>
15 #include <string>
16 #include <utility>
17 
18 #include "api/peer_connection_interface.h"
19 #include "api/proxy.h"
20 #include "rtc_base/bind.h"
21 
22 namespace 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.
26 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
27 PROXY_SIGNALING_THREAD_DESTRUCTOR()
28 PROXY_METHOD1(void, SetOptions, const Options&)
29 PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
30               CreatePeerConnection,
31               const PeerConnectionInterface::RTCConfiguration&,
32               std::unique_ptr<cricket::PortAllocator>,
33               std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
34               PeerConnectionObserver*)
35 PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
36               CreatePeerConnection,
37               const PeerConnectionInterface::RTCConfiguration&,
38               PeerConnectionDependencies)
39 PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
40                    GetRtpSenderCapabilities,
41                    cricket::MediaType)
42 PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
43                    GetRtpReceiverCapabilities,
44                    cricket::MediaType)
45 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
46               CreateLocalMediaStream,
47               const std::string&)
48 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
49               CreateAudioSource,
50               const cricket::AudioOptions&)
51 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
52               CreateVideoTrack,
53               const std::string&,
54               VideoTrackSourceInterface*)
55 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
56               CreateAudioTrack,
57               const std::string&,
58               AudioSourceInterface*)
59 PROXY_METHOD2(bool, StartAecDump, FILE*, int64_t)
60 PROXY_METHOD0(void, StopAecDump)
61 END_PROXY_MAP()
62 
63 }  // namespace webrtc
64 
65 #endif  // API_PEER_CONNECTION_FACTORY_PROXY_H_
66