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() { |
Artem Titov | d325196 | 2021-11-15 15:57:07 | [diff] [blame] | 37 | RTC_DCHECK_NOTREACHED() |
| 38 | << "DEBUG: RtpTransceiverInterface::StopStandard called"; |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 39 | return RTCError::OK(); |
| 40 | } |
| 41 | |
| 42 | void RtpTransceiverInterface::StopInternal() { |
Artem Titov | d325196 | 2021-11-15 15:57:07 | [diff] [blame] | 43 | RTC_DCHECK_NOTREACHED() |
| 44 | << "DEBUG: RtpTransceiverInterface::StopInternal called"; |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 45 | } |
| 46 | |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 47 | // TODO(bugs.webrtc.org/11839) Remove default implementations when clients |
| 48 | // are updated. |
| 49 | void RtpTransceiverInterface::SetDirection( |
| 50 | RtpTransceiverDirection new_direction) { |
| 51 | SetDirectionWithError(new_direction); |
| 52 | } |
| 53 | |
| 54 | RTCError RtpTransceiverInterface::SetDirectionWithError( |
| 55 | RtpTransceiverDirection new_direction) { |
Artem Titov | d325196 | 2021-11-15 15:57:07 | [diff] [blame] | 56 | RTC_DCHECK_NOTREACHED() << "Default implementation called"; |
Harald Alvestrand | 6060df5 | 2020-08-11 07:54:02 | [diff] [blame] | 57 | return RTCError::OK(); |
| 58 | } |
| 59 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 60 | } // namespace webrtc |