xref: /aosp_15_r20/external/webrtc/api/rtp_transceiver_interface.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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 
11 #include "api/rtp_transceiver_interface.h"
12 
13 #include "rtc_base/checks.h"
14 
15 namespace webrtc {
16 
17 RtpTransceiverInit::RtpTransceiverInit() = default;
18 
19 RtpTransceiverInit::RtpTransceiverInit(const RtpTransceiverInit& rhs) = default;
20 
21 RtpTransceiverInit::~RtpTransceiverInit() = default;
22 
23 absl::optional<RtpTransceiverDirection>
fired_direction() const24 RtpTransceiverInterface::fired_direction() const {
25   return absl::nullopt;
26 }
27 
stopping() const28 bool RtpTransceiverInterface::stopping() const {
29   return false;
30 }
31 
Stop()32 void RtpTransceiverInterface::Stop() {
33   StopInternal();
34 }
35 
StopStandard()36 RTCError RtpTransceiverInterface::StopStandard() {
37   RTC_DCHECK_NOTREACHED()
38       << "DEBUG: RtpTransceiverInterface::StopStandard called";
39   return RTCError::OK();
40 }
41 
StopInternal()42 void RtpTransceiverInterface::StopInternal() {
43   RTC_DCHECK_NOTREACHED()
44       << "DEBUG: RtpTransceiverInterface::StopInternal called";
45 }
46 
47 // TODO(bugs.webrtc.org/11839) Remove default implementations when clients
48 // are updated.
SetDirection(RtpTransceiverDirection new_direction)49 void RtpTransceiverInterface::SetDirection(
50     RtpTransceiverDirection new_direction) {
51   SetDirectionWithError(new_direction);
52 }
53 
SetDirectionWithError(RtpTransceiverDirection new_direction)54 RTCError RtpTransceiverInterface::SetDirectionWithError(
55     RtpTransceiverDirection new_direction) {
56   RTC_DCHECK_NOTREACHED() << "Default implementation called";
57   return RTCError::OK();
58 }
59 
60 }  // namespace webrtc
61