blob: e1d94dd8c7eddf62671e1b0756449133874d135c [file] [log] [blame]
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +02001/*
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 09:11:00 -080011#include "api/peer_connection_interface.h"
Jonas Olssona4d87372019-07-05 19:08:33 +020012
Steve Anton10542f22019-01-11 09:11:00 -080013#include "api/dtls_transport_interface.h"
Harald Alvestrandc85328f2019-02-28 07:51:00 +010014#include "api/sctp_transport_interface.h"
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020015
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 10:27:33 -070045RTCError 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 09:58:17 +020051RTCError PeerConnectionInterface::SetConfiguration(
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020052 const PeerConnectionInterface::RTCConfiguration& config) {
Niels Möller2579f0c2019-08-19 09:58:17 +020053 return RTCError();
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020054}
55
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020056PeerConnectionDependencies::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 10:39:30 +020077 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
Harald Alvestranda3dd7722020-11-27 08:05:42 +000090RTCErrorOr<rtc::scoped_refptr<PeerConnectionInterface>>
91PeerConnectionFactoryInterface::CreatePeerConnectionOrError(
92 const PeerConnectionInterface::RTCConfiguration& configuration,
93 PeerConnectionDependencies dependencies) {
94 return RTCError(RTCErrorType::INTERNAL_ERROR);
95}
96
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020097RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities(
98 cricket::MediaType kind) const {
99 return {};
100}
101
102RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities(
103 cricket::MediaType kind) const {
104 return {};
105}
106
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +0200107} // namespace webrtc