Add dummy implementation for SetCodecPReferences.
The proper signature of the function should return an RTCError,
but due to all the classes in external projects implementing it with
this signature, we need a many steps process to update this.
- Add an implementation for the pure virtual method
- Update projects not to override it
- Update the function signature
- Update projects to override it with the right signature
- Remove the dummy implementation from the interface
Bug: webrtc:9777
Change-Id: Idf99216792b4ad13339e4e8be6f7b735bb6b64e7
Reviewed-on: https://webrtc-review.googlesource.com/101564
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24807}
diff --git a/api/rtptransceiverinterface.cc b/api/rtptransceiverinterface.cc
index 065ac04..d833339 100644
--- a/api/rtptransceiverinterface.cc
+++ b/api/rtptransceiverinterface.cc
@@ -23,4 +23,9 @@
return absl::nullopt;
}
+void RtpTransceiverInterface::SetCodecPreferences(
+ rtc::ArrayView<RtpCodecCapability>) {
+ RTC_NOTREACHED() << "Not implemented";
+}
+
} // namespace webrtc
diff --git a/api/rtptransceiverinterface.h b/api/rtptransceiverinterface.h
index 4c22957..301a380 100644
--- a/api/rtptransceiverinterface.h
+++ b/api/rtptransceiverinterface.h
@@ -126,8 +126,7 @@
// by WebRTC for this transceiver.
// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences
// TODO(steveanton): Not implemented.
- virtual void SetCodecPreferences(
- rtc::ArrayView<RtpCodecCapability> codecs) = 0;
+ virtual void SetCodecPreferences(rtc::ArrayView<RtpCodecCapability> codecs);
protected:
~RtpTransceiverInterface() override = default;