blob: 454e450c8d7f5d5c912fedb7c02ee0204020a652 [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/rtp_transceiver_interface.h"
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020012
Yves Gerey988cc082018-10-23 12:03:01 +020013#include "rtc_base/checks.h"
14
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020015namespace webrtc {
16
17RtpTransceiverInit::RtpTransceiverInit() = default;
18
Mirko Bonadei2ffed6d2018-07-20 11:09:32 +020019RtpTransceiverInit::RtpTransceiverInit(const RtpTransceiverInit& rhs) = default;
20
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020021RtpTransceiverInit::~RtpTransceiverInit() = default;
22
23absl::optional<RtpTransceiverDirection>
24RtpTransceiverInterface::fired_direction() const {
25 return absl::nullopt;
26}
27
Harald Alvestrand6060df52020-08-11 09:54:02 +020028bool RtpTransceiverInterface::stopping() const {
29 return false;
30}
31
32void RtpTransceiverInterface::Stop() {
33 StopInternal();
34}
35
36RTCError RtpTransceiverInterface::StopStandard() {
Artem Titovd3251962021-11-15 16:57:07 +010037 RTC_DCHECK_NOTREACHED()
38 << "DEBUG: RtpTransceiverInterface::StopStandard called";
Harald Alvestrand6060df52020-08-11 09:54:02 +020039 return RTCError::OK();
40}
41
42void RtpTransceiverInterface::StopInternal() {
Artem Titovd3251962021-11-15 16:57:07 +010043 RTC_DCHECK_NOTREACHED()
44 << "DEBUG: RtpTransceiverInterface::StopInternal called";
Harald Alvestrand6060df52020-08-11 09:54:02 +020045}
46
Florent Castelli2d9d82e2019-04-23 19:25:51 +020047RTCError RtpTransceiverInterface::SetCodecPreferences(
Florent Castelli38078972018-09-24 19:10:40 +020048 rtc::ArrayView<RtpCodecCapability>) {
Artem Titovd3251962021-11-15 16:57:07 +010049 RTC_DCHECK_NOTREACHED() << "Not implemented";
Florent Castelli2d9d82e2019-04-23 19:25:51 +020050 return {};
51}
52
53std::vector<RtpCodecCapability> RtpTransceiverInterface::codec_preferences()
54 const {
55 return {};
Florent Castelli38078972018-09-24 19:10:40 +020056}
57
Markus Handell0357b3e2020-03-16 13:40:51 +010058std::vector<RtpHeaderExtensionCapability>
59RtpTransceiverInterface::HeaderExtensionsToOffer() const {
60 return {};
61}
62
Markus Handell755c65d2020-06-24 01:06:10 +020063webrtc::RTCError RtpTransceiverInterface::SetOfferedRtpHeaderExtensions(
64 rtc::ArrayView<const RtpHeaderExtensionCapability>
65 header_extensions_to_offer) {
66 return webrtc::RTCError(webrtc::RTCErrorType::UNSUPPORTED_OPERATION);
67}
68
Markus Handell5932fe12020-12-17 22:19:40 +010069std::vector<RtpHeaderExtensionCapability>
70RtpTransceiverInterface::HeaderExtensionsNegotiated() const {
71 return {};
72}
73
Harald Alvestrand6060df52020-08-11 09:54:02 +020074// TODO(bugs.webrtc.org/11839) Remove default implementations when clients
75// are updated.
76void RtpTransceiverInterface::SetDirection(
77 RtpTransceiverDirection new_direction) {
78 SetDirectionWithError(new_direction);
79}
80
81RTCError RtpTransceiverInterface::SetDirectionWithError(
82 RtpTransceiverDirection new_direction) {
Artem Titovd3251962021-11-15 16:57:07 +010083 RTC_DCHECK_NOTREACHED() << "Default implementation called";
Harald Alvestrand6060df52020-08-11 09:54:02 +020084 return RTCError::OK();
85}
86
Mirko Bonadei79eb4dd2018-07-19 10:39:30 +020087} // namespace webrtc