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/rtp_transceiver_interface.h" |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 12 | |
Yves Gerey | 988cc08 | 2018-10-23 10:03:01 | [diff] [blame] | 13 | #include "rtc_base/checks.h" |
| 14 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 15 | namespace webrtc { |
| 16 | |
| 17 | RtpTransceiverInit::RtpTransceiverInit() = default; |
| 18 | |
Mirko Bonadei | 2ffed6d | 2018-07-20 09:09:32 | [diff] [blame] | 19 | RtpTransceiverInit::RtpTransceiverInit(const RtpTransceiverInit& rhs) = default; |
| 20 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 21 | RtpTransceiverInit::~RtpTransceiverInit() = default; |
| 22 | |
| 23 | absl::optional<RtpTransceiverDirection> |
| 24 | RtpTransceiverInterface::fired_direction() const { |
| 25 | return absl::nullopt; |
| 26 | } |
| 27 | |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 28 | bool RtpTransceiverInterface::stopping() const { |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | void RtpTransceiverInterface::Stop() { |
| 33 | StopInternal(); |
| 34 | } |
| 35 | |
| 36 | RTCError RtpTransceiverInterface::StopStandard() { |
| 37 | RTC_NOTREACHED() << "DEBUG: RtpTransceiverInterface::StopStandard called"; |
| 38 | return RTCError::OK(); |
| 39 | } |
| 40 | |
| 41 | void RtpTransceiverInterface::StopInternal() { |
| 42 | RTC_NOTREACHED() << "DEBUG: RtpTransceiverInterface::StopInternal called"; |
| 43 | } |
| 44 | |
Florent Castelli | 2d9d82e | 2019-04-23 17:25:51 | [diff] [blame] | 45 | RTCError RtpTransceiverInterface::SetCodecPreferences( |
Florent Castelli | 3807897 | 2018-09-24 17:10:40 | [diff] [blame] | 46 | rtc::ArrayView<RtpCodecCapability>) { |
| 47 | RTC_NOTREACHED() << "Not implemented"; |
Florent Castelli | 2d9d82e | 2019-04-23 17:25:51 | [diff] [blame] | 48 | return {}; |
| 49 | } |
| 50 | |
| 51 | std::vector<RtpCodecCapability> RtpTransceiverInterface::codec_preferences() |
| 52 | const { |
| 53 | return {}; |
Florent Castelli | 3807897 | 2018-09-24 17:10:40 | [diff] [blame] | 54 | } |
| 55 | |
Markus Handell | 0357b3e | 2020-03-16 12:40:51 | [diff] [blame] | 56 | std::vector<RtpHeaderExtensionCapability> |
| 57 | RtpTransceiverInterface::HeaderExtensionsToOffer() const { |
| 58 | return {}; |
| 59 | } |
| 60 | |
Markus Handell | 755c65d | 2020-06-23 23:06:10 | [diff] [blame] | 61 | webrtc::RTCError RtpTransceiverInterface::SetOfferedRtpHeaderExtensions( |
| 62 | rtc::ArrayView<const RtpHeaderExtensionCapability> |
| 63 | header_extensions_to_offer) { |
| 64 | return webrtc::RTCError(webrtc::RTCErrorType::UNSUPPORTED_OPERATION); |
| 65 | } |
| 66 | |
Markus Handell | 5932fe1 | 2020-12-17 21:19:40 | [diff] [blame] | 67 | std::vector<RtpHeaderExtensionCapability> |
| 68 | RtpTransceiverInterface::HeaderExtensionsNegotiated() const { |
| 69 | return {}; |
| 70 | } |
| 71 | |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 72 | // TODO(bugs.webrtc.org/11839) Remove default implementations when clients |
| 73 | // are updated. |
| 74 | void RtpTransceiverInterface::SetDirection( |
| 75 | RtpTransceiverDirection new_direction) { |
| 76 | SetDirectionWithError(new_direction); |
| 77 | } |
| 78 | |
| 79 | RTCError RtpTransceiverInterface::SetDirectionWithError( |
| 80 | RtpTransceiverDirection new_direction) { |
| 81 | RTC_NOTREACHED() << "Default implementation called"; |
| 82 | return RTCError::OK(); |
| 83 | } |
| 84 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 85 | } // namespace webrtc |