blob: f82e84b80f24a580304d45a796cde9c3a197947e [file] [log] [blame]
Mirko Bonadei79eb4dd2018-07-19 08:39:301/*
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 Anton10542f22019-01-11 17:11:0011#include "api/peer_connection_interface.h"
Jonas Olssona4d87372019-07-05 17:08:3312
Steve Anton10542f22019-01-11 17:11:0013#include "api/dtls_transport_interface.h"
Harald Alvestrandc85328f2019-02-28 06:51:0014#include "api/sctp_transport_interface.h"
Mirko Bonadei79eb4dd2018-07-19 08:39:3015
16namespace webrtc {
17
18PeerConnectionInterface::IceServer::IceServer() = default;
19PeerConnectionInterface::IceServer::IceServer(const IceServer& rhs) = default;
20PeerConnectionInterface::IceServer::~IceServer() = default;
21
22PeerConnectionInterface::RTCConfiguration::RTCConfiguration() = default;
23
24PeerConnectionInterface::RTCConfiguration::RTCConfiguration(
25 const RTCConfiguration& rhs) = default;
26
27PeerConnectionInterface::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
43PeerConnectionInterface::RTCConfiguration::~RTCConfiguration() = default;
44
Steve Anton24db5732018-07-23 17:27:3345RTCError PeerConnectionInterface::RemoveTrackNew(
46 rtc::scoped_refptr<RtpSenderInterface> sender) {
47 return RTCError(RemoveTrack(sender) ? RTCErrorType::NONE
48 : RTCErrorType::INTERNAL_ERROR);
49}
50
Niels Möller2579f0c2019-08-19 07:58:1751RTCError PeerConnectionInterface::SetConfiguration(
Mirko Bonadei79eb4dd2018-07-19 08:39:3052 const PeerConnectionInterface::RTCConfiguration& config) {
Niels Möller2579f0c2019-08-19 07:58:1753 return RTCError();
Mirko Bonadei79eb4dd2018-07-19 08:39:3054}
55
Mirko Bonadei79eb4dd2018-07-19 08:39:3056PeerConnectionDependencies::PeerConnectionDependencies(
57 PeerConnectionObserver* observer_in)
58 : observer(observer_in) {}
59
60PeerConnectionDependencies::PeerConnectionDependencies(
61 PeerConnectionDependencies&&) = default;
62
63PeerConnectionDependencies::~PeerConnectionDependencies() = default;
64
65PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies() =
66 default;
67
68PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies(
69 PeerConnectionFactoryDependencies&&) = default;
70
71PeerConnectionFactoryDependencies::~PeerConnectionFactoryDependencies() =
72 default;
73
74rtc::scoped_refptr<PeerConnectionInterface>
75PeerConnectionFactoryInterface::CreatePeerConnection(
76 const PeerConnectionInterface::RTCConfiguration& configuration,
Mirko Bonadei79eb4dd2018-07-19 08:39:3077 std::unique_ptr<cricket::PortAllocator> allocator,
78 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
79 PeerConnectionObserver* observer) {
80 return nullptr;
81}
82
83rtc::scoped_refptr<PeerConnectionInterface>
84PeerConnectionFactoryInterface::CreatePeerConnection(
85 const PeerConnectionInterface::RTCConfiguration& configuration,
86 PeerConnectionDependencies dependencies) {
87 return nullptr;
88}
89
90RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities(
91 cricket::MediaType kind) const {
92 return {};
93}
94
95RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities(
96 cricket::MediaType kind) const {
97 return {};
98}
99
Mirko Bonadei79eb4dd2018-07-19 08:39:30100} // namespace webrtc