Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 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 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #include "api/peer_connection_interface.h" |
Jonas Olsson | a4d8737 | 2019-07-05 17:08:33 | [diff] [blame] | 12 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 13 | #include "api/dtls_transport_interface.h" |
Harald Alvestrand | c85328f | 2019-02-28 06:51:00 | [diff] [blame] | 14 | #include "api/sctp_transport_interface.h" |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 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 | |
| 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 | |
Steve Anton | 24db573 | 2018-07-23 17:27:33 | [diff] [blame] | 45 | RTCError PeerConnectionInterface::RemoveTrackNew( |
| 46 | rtc::scoped_refptr<RtpSenderInterface> sender) { |
| 47 | return RTCError(RemoveTrack(sender) ? RTCErrorType::NONE |
| 48 | : RTCErrorType::INTERNAL_ERROR); |
| 49 | } |
| 50 | |
Niels Möller | 2579f0c | 2019-08-19 07:58:17 | [diff] [blame] | 51 | RTCError PeerConnectionInterface::SetConfiguration( |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 52 | const PeerConnectionInterface::RTCConfiguration& config) { |
Niels Möller | 2579f0c | 2019-08-19 07:58:17 | [diff] [blame] | 53 | return RTCError(); |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 54 | } |
| 55 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 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> |
| 75 | PeerConnectionFactoryInterface::CreatePeerConnection( |
| 76 | const PeerConnectionInterface::RTCConfiguration& configuration, |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 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> |
| 84 | PeerConnectionFactoryInterface::CreatePeerConnection( |
| 85 | const PeerConnectionInterface::RTCConfiguration& configuration, |
| 86 | PeerConnectionDependencies dependencies) { |
| 87 | return nullptr; |
| 88 | } |
| 89 | |
| 90 | RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities( |
| 91 | cricket::MediaType kind) const { |
| 92 | return {}; |
| 93 | } |
| 94 | |
| 95 | RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities( |
| 96 | cricket::MediaType kind) const { |
| 97 | return {}; |
| 98 | } |
| 99 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 100 | } // namespace webrtc |