diff --git a/api/rtp_transceiver_interface.cc b/api/rtp_transceiver_interface.cc index 7267b286be..454e450c8d 100644 --- a/api/rtp_transceiver_interface.cc +++ b/api/rtp_transceiver_interface.cc @@ -44,6 +44,33 @@ void RtpTransceiverInterface::StopInternal() { << "DEBUG: RtpTransceiverInterface::StopInternal called"; } +RTCError RtpTransceiverInterface::SetCodecPreferences( + rtc::ArrayView) { + RTC_DCHECK_NOTREACHED() << "Not implemented"; + return {}; +} + +std::vector RtpTransceiverInterface::codec_preferences() + const { + return {}; +} + +std::vector +RtpTransceiverInterface::HeaderExtensionsToOffer() const { + return {}; +} + +webrtc::RTCError RtpTransceiverInterface::SetOfferedRtpHeaderExtensions( + rtc::ArrayView + header_extensions_to_offer) { + return webrtc::RTCError(webrtc::RTCErrorType::UNSUPPORTED_OPERATION); +} + +std::vector +RtpTransceiverInterface::HeaderExtensionsNegotiated() const { + return {}; +} + // TODO(bugs.webrtc.org/11839) Remove default implementations when clients // are updated. void RtpTransceiverInterface::SetDirection( diff --git a/api/rtp_transceiver_interface.h b/api/rtp_transceiver_interface.h index c9d911fac1..4799c4b153 100644 --- a/api/rtp_transceiver_interface.h +++ b/api/rtp_transceiver_interface.h @@ -97,7 +97,8 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface { // transceiver's stop() method has been called, but the negotiation with // the other end for shutting down the transceiver is not yet done. // https://w3c.github.io/webrtc-pc/#dfn-stopping-0 - virtual bool stopping() const = 0; + // TODO(hta): Remove default implementation. + virtual bool stopping() const; // The direction attribute indicates the preferred direction of this // transceiver, which will be used in calls to CreateOffer and CreateAnswer. @@ -146,28 +147,28 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface { // by WebRTC for this transceiver. // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences virtual RTCError SetCodecPreferences( - rtc::ArrayView codecs) = 0; - virtual std::vector codec_preferences() const = 0; + rtc::ArrayView codecs); + virtual std::vector codec_preferences() const; // Readonly attribute which contains the set of header extensions that was set // with SetOfferedRtpHeaderExtensions, or a default set if it has not been // called. // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface virtual std::vector HeaderExtensionsToOffer() - const = 0; + const; // Readonly attribute which is either empty if negotation has not yet // happened, or a vector of the negotiated header extensions. // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface virtual std::vector HeaderExtensionsNegotiated() - const = 0; + const; // The SetOfferedRtpHeaderExtensions method modifies the next SDP negotiation // so that it negotiates use of header extensions which are not kStopped. // https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface virtual webrtc::RTCError SetOfferedRtpHeaderExtensions( rtc::ArrayView - header_extensions_to_offer) = 0; + header_extensions_to_offer); protected: ~RtpTransceiverInterface() override = default; diff --git a/api/test/mock_rtp_transceiver.h b/api/test/mock_rtp_transceiver.h index 5ea9028b77..db587d0768 100644 --- a/api/test/mock_rtp_transceiver.h +++ b/api/test/mock_rtp_transceiver.h @@ -70,10 +70,6 @@ class MockRtpTransceiver final HeaderExtensionsToOffer, (), (const, override)); - MOCK_METHOD(std::vector, - HeaderExtensionsNegotiated, - (), - (const, override)); MOCK_METHOD(webrtc::RTCError, SetOfferedRtpHeaderExtensions, (rtc::ArrayView