xref: /aosp_15_r20/external/webrtc/pc/peer_connection_factory_proxy.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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 PC_PEER_CONNECTION_FACTORY_PROXY_H_
12 #define PC_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 "pc/proxy.h"
20 
21 namespace webrtc {
22 
23 // TODO(deadbeef): Move this to .cc file. What threads methods are called on is
24 // an implementation detail.
25 BEGIN_PROXY_MAP(PeerConnectionFactory)
26 PROXY_PRIMARY_THREAD_DESTRUCTOR()
27 PROXY_METHOD1(void, SetOptions, const Options&)
28 PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<PeerConnectionInterface>>,
29               CreatePeerConnectionOrError,
30               const PeerConnectionInterface::RTCConfiguration&,
31               PeerConnectionDependencies)
32 PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
33                    GetRtpSenderCapabilities,
34                    cricket::MediaType)
35 PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
36                    GetRtpReceiverCapabilities,
37                    cricket::MediaType)
38 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
39               CreateLocalMediaStream,
40               const std::string&)
41 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
42               CreateAudioSource,
43               const cricket::AudioOptions&)
44 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
45               CreateVideoTrack,
46               const std::string&,
47               VideoTrackSourceInterface*)
48 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
49               CreateAudioTrack,
50               const std::string&,
51               AudioSourceInterface*)
52 PROXY_SECONDARY_METHOD2(bool, StartAecDump, FILE*, int64_t)
53 PROXY_SECONDARY_METHOD0(void, StopAecDump)
54 END_PROXY_MAP(PeerConnectionFactory)
55 
56 }  // namespace webrtc
57 
58 #endif  // PC_PEER_CONNECTION_FACTORY_PROXY_H_
59