Remove some default implementations in api/rtp_transcever_interface

Bug: webrtc:11839
Change-Id: I6ddc0468e75bc346e12fc3dc64236ca2ab52e708
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244504
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35701}
This commit is contained in:
Harald Alvestrand 2022-01-05 10:34:19 +00:00 committed by WebRTC LUCI CQ
parent 277a3b4f85
commit 40941ee72d
3 changed files with 10 additions and 34 deletions

View file

@ -44,33 +44,6 @@ void RtpTransceiverInterface::StopInternal() {
<< "DEBUG: RtpTransceiverInterface::StopInternal called"; << "DEBUG: RtpTransceiverInterface::StopInternal called";
} }
RTCError RtpTransceiverInterface::SetCodecPreferences(
rtc::ArrayView<RtpCodecCapability>) {
RTC_DCHECK_NOTREACHED() << "Not implemented";
return {};
}
std::vector<RtpCodecCapability> RtpTransceiverInterface::codec_preferences()
const {
return {};
}
std::vector<RtpHeaderExtensionCapability>
RtpTransceiverInterface::HeaderExtensionsToOffer() const {
return {};
}
webrtc::RTCError RtpTransceiverInterface::SetOfferedRtpHeaderExtensions(
rtc::ArrayView<const RtpHeaderExtensionCapability>
header_extensions_to_offer) {
return webrtc::RTCError(webrtc::RTCErrorType::UNSUPPORTED_OPERATION);
}
std::vector<RtpHeaderExtensionCapability>
RtpTransceiverInterface::HeaderExtensionsNegotiated() const {
return {};
}
// TODO(bugs.webrtc.org/11839) Remove default implementations when clients // TODO(bugs.webrtc.org/11839) Remove default implementations when clients
// are updated. // are updated.
void RtpTransceiverInterface::SetDirection( void RtpTransceiverInterface::SetDirection(

View file

@ -97,8 +97,7 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface {
// transceiver's stop() method has been called, but the negotiation with // transceiver's stop() method has been called, but the negotiation with
// the other end for shutting down the transceiver is not yet done. // the other end for shutting down the transceiver is not yet done.
// https://w3c.github.io/webrtc-pc/#dfn-stopping-0 // https://w3c.github.io/webrtc-pc/#dfn-stopping-0
// TODO(hta): Remove default implementation. virtual bool stopping() const = 0;
virtual bool stopping() const;
// The direction attribute indicates the preferred direction of this // The direction attribute indicates the preferred direction of this
// transceiver, which will be used in calls to CreateOffer and CreateAnswer. // transceiver, which will be used in calls to CreateOffer and CreateAnswer.
@ -147,28 +146,28 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface {
// by WebRTC for this transceiver. // by WebRTC for this transceiver.
// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences
virtual RTCError SetCodecPreferences( virtual RTCError SetCodecPreferences(
rtc::ArrayView<RtpCodecCapability> codecs); rtc::ArrayView<RtpCodecCapability> codecs) = 0;
virtual std::vector<RtpCodecCapability> codec_preferences() const; virtual std::vector<RtpCodecCapability> codec_preferences() const = 0;
// Readonly attribute which contains the set of header extensions that was set // Readonly attribute which contains the set of header extensions that was set
// with SetOfferedRtpHeaderExtensions, or a default set if it has not been // with SetOfferedRtpHeaderExtensions, or a default set if it has not been
// called. // called.
// https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface
virtual std::vector<RtpHeaderExtensionCapability> HeaderExtensionsToOffer() virtual std::vector<RtpHeaderExtensionCapability> HeaderExtensionsToOffer()
const; const = 0;
// Readonly attribute which is either empty if negotation has not yet // Readonly attribute which is either empty if negotation has not yet
// happened, or a vector of the negotiated header extensions. // happened, or a vector of the negotiated header extensions.
// https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface
virtual std::vector<RtpHeaderExtensionCapability> HeaderExtensionsNegotiated() virtual std::vector<RtpHeaderExtensionCapability> HeaderExtensionsNegotiated()
const; const = 0;
// The SetOfferedRtpHeaderExtensions method modifies the next SDP negotiation // The SetOfferedRtpHeaderExtensions method modifies the next SDP negotiation
// so that it negotiates use of header extensions which are not kStopped. // so that it negotiates use of header extensions which are not kStopped.
// https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface
virtual webrtc::RTCError SetOfferedRtpHeaderExtensions( virtual webrtc::RTCError SetOfferedRtpHeaderExtensions(
rtc::ArrayView<const RtpHeaderExtensionCapability> rtc::ArrayView<const RtpHeaderExtensionCapability>
header_extensions_to_offer); header_extensions_to_offer) = 0;
protected: protected:
~RtpTransceiverInterface() override = default; ~RtpTransceiverInterface() override = default;

View file

@ -70,6 +70,10 @@ class MockRtpTransceiver final
HeaderExtensionsToOffer, HeaderExtensionsToOffer,
(), (),
(const, override)); (const, override));
MOCK_METHOD(std::vector<RtpHeaderExtensionCapability>,
HeaderExtensionsNegotiated,
(),
(const, override));
MOCK_METHOD(webrtc::RTCError, MOCK_METHOD(webrtc::RTCError,
SetOfferedRtpHeaderExtensions, SetOfferedRtpHeaderExtensions,
(rtc::ArrayView<const RtpHeaderExtensionCapability> (rtc::ArrayView<const RtpHeaderExtensionCapability>