• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2018 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 #include "api/peer_connection_interface.h"
12 
13 #include "api/dtls_transport_interface.h"
14 #include "api/sctp_transport_interface.h"
15 
16 namespace webrtc {
17 
18 PeerConnectionInterface::IceServer::IceServer() = default;
19 PeerConnectionInterface::IceServer::IceServer(const IceServer& rhs) = default;
20 PeerConnectionInterface::IceServer::~IceServer() = default;
21 
22 PeerConnectionInterface::RTCConfiguration::RTCConfiguration() = default;
23 
24 PeerConnectionInterface::RTCConfiguration::RTCConfiguration(
25     const RTCConfiguration& rhs) = default;
26 
RTCConfiguration(RTCConfigurationType type)27 PeerConnectionInterface::RTCConfiguration::RTCConfiguration(
28     RTCConfigurationType type) {
29   if (type == RTCConfigurationType::kAggressive) {
30     // These parameters are also defined in Java and IOS configurations,
31     // so their values may be overwritten by the Java or IOS configuration.
32     bundle_policy = kBundlePolicyMaxBundle;
33     rtcp_mux_policy = kRtcpMuxPolicyRequire;
34     ice_connection_receiving_timeout = kAggressiveIceConnectionReceivingTimeout;
35 
36     // These parameters are not defined in Java or IOS configuration,
37     // so their values will not be overwritten.
38     enable_ice_renomination = true;
39     redetermine_role_on_ice_restart = false;
40   }
41 }
42 
43 PeerConnectionInterface::RTCConfiguration::~RTCConfiguration() = default;
44 
RemoveTrackNew(rtc::scoped_refptr<RtpSenderInterface> sender)45 RTCError PeerConnectionInterface::RemoveTrackNew(
46     rtc::scoped_refptr<RtpSenderInterface> sender) {
47   return RTCError(RemoveTrack(sender) ? RTCErrorType::NONE
48                                       : RTCErrorType::INTERNAL_ERROR);
49 }
50 
SetConfiguration(const PeerConnectionInterface::RTCConfiguration & config)51 RTCError PeerConnectionInterface::SetConfiguration(
52     const PeerConnectionInterface::RTCConfiguration& config) {
53   return RTCError();
54 }
55 
PeerConnectionDependencies(PeerConnectionObserver * observer_in)56 PeerConnectionDependencies::PeerConnectionDependencies(
57     PeerConnectionObserver* observer_in)
58     : observer(observer_in) {}
59 
60 PeerConnectionDependencies::PeerConnectionDependencies(
61     PeerConnectionDependencies&&) = default;
62 
63 PeerConnectionDependencies::~PeerConnectionDependencies() = default;
64 
65 PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies() =
66     default;
67 
68 PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies(
69     PeerConnectionFactoryDependencies&&) = default;
70 
71 PeerConnectionFactoryDependencies::~PeerConnectionFactoryDependencies() =
72     default;
73 
74 rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(const PeerConnectionInterface::RTCConfiguration & configuration,std::unique_ptr<cricket::PortAllocator> allocator,std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,PeerConnectionObserver * observer)75 PeerConnectionFactoryInterface::CreatePeerConnection(
76     const PeerConnectionInterface::RTCConfiguration& configuration,
77     std::unique_ptr<cricket::PortAllocator> allocator,
78     std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
79     PeerConnectionObserver* observer) {
80   return nullptr;
81 }
82 
83 rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(const PeerConnectionInterface::RTCConfiguration & configuration,PeerConnectionDependencies dependencies)84 PeerConnectionFactoryInterface::CreatePeerConnection(
85     const PeerConnectionInterface::RTCConfiguration& configuration,
86     PeerConnectionDependencies dependencies) {
87   return nullptr;
88 }
89 
GetRtpSenderCapabilities(cricket::MediaType kind) const90 RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities(
91     cricket::MediaType kind) const {
92   return {};
93 }
94 
GetRtpReceiverCapabilities(cricket::MediaType kind) const95 RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities(
96     cricket::MediaType kind) const {
97   return {};
98 }
99 
100 }  // namespace webrtc
101