diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc index 7a2037e83f..0bb1168384 100644 --- a/audio/audio_receive_stream.cc +++ b/audio/audio_receive_stream.cc @@ -262,12 +262,6 @@ void AudioReceiveStreamImpl::SetRtpExtensions( config_.rtp.extensions = std::move(extensions); } -const std::vector& AudioReceiveStreamImpl::GetRtpExtensions() - const { - RTC_DCHECK_RUN_ON(&worker_thread_checker_); - return config_.rtp.extensions; -} - RtpHeaderExtensionMap AudioReceiveStreamImpl::GetRtpExtensionMap() const { return RtpHeaderExtensionMap(config_.rtp.extensions); } diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h index d9283ec141..51514fb6ce 100644 --- a/audio/audio_receive_stream.h +++ b/audio/audio_receive_stream.h @@ -95,7 +95,6 @@ class AudioReceiveStreamImpl final : public webrtc::AudioReceiveStreamInterface, void SetFrameDecryptor(rtc::scoped_refptr frame_decryptor) override; void SetRtpExtensions(std::vector extensions) override; - const std::vector& GetRtpExtensions() const override; RtpHeaderExtensionMap GetRtpExtensionMap() const override; webrtc::AudioReceiveStreamInterface::Stats GetStats( diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h index f383277323..1228861c42 100644 --- a/call/audio_receive_stream.h +++ b/call/audio_receive_stream.h @@ -198,12 +198,6 @@ class AudioReceiveStreamInterface : public MediaReceiveStreamInterface { // post initialization. virtual uint32_t remote_ssrc() const = 0; - // Access the currently set rtp extensions. Must be called on the packet - // delivery thread. - // TODO(tommi): This is currently only called from - // `WebRtcAudioReceiveStream::GetRtpParameters()`. See if we can remove it. - virtual const std::vector& GetRtpExtensions() const = 0; - protected: virtual ~AudioReceiveStreamInterface() {} }; diff --git a/media/engine/fake_webrtc_call.cc b/media/engine/fake_webrtc_call.cc index ef9224efc9..a20b826b41 100644 --- a/media/engine/fake_webrtc_call.cc +++ b/media/engine/fake_webrtc_call.cc @@ -135,11 +135,6 @@ void FakeAudioReceiveStream::SetRtpExtensions( config_.rtp.extensions = std::move(extensions); } -const std::vector& -FakeAudioReceiveStream::GetRtpExtensions() const { - return config_.rtp.extensions; -} - webrtc::RtpHeaderExtensionMap FakeAudioReceiveStream::GetRtpExtensionMap() const { return webrtc::RtpHeaderExtensionMap(config_.rtp.extensions); diff --git a/media/engine/fake_webrtc_call.h b/media/engine/fake_webrtc_call.h index 0301952693..f7e3de5efb 100644 --- a/media/engine/fake_webrtc_call.h +++ b/media/engine/fake_webrtc_call.h @@ -127,7 +127,6 @@ class FakeAudioReceiveStream final void SetFrameDecryptor(rtc::scoped_refptr frame_decryptor) override; void SetRtpExtensions(std::vector extensions) override; - const std::vector& GetRtpExtensions() const override; webrtc::RtpHeaderExtensionMap GetRtpExtensionMap() const override; webrtc::AudioReceiveStreamInterface::Stats GetStats( diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 78861b21d6..65aa0dcaca 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -1240,14 +1240,6 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream { return stream_->GetSources(); } - webrtc::RtpParameters GetRtpParameters() const { - webrtc::RtpParameters rtp_parameters; - rtp_parameters.encodings.emplace_back(); - rtp_parameters.encodings[0].ssrc = stream_->remote_ssrc(); - rtp_parameters.header_extensions = stream_->GetRtpExtensions(); - return rtp_parameters; - } - void SetDepacketizerToDecoderFrameTransformer( rtc::scoped_refptr frame_transformer) { RTC_DCHECK_RUN_ON(&worker_thread_checker_); @@ -1461,7 +1453,9 @@ webrtc::RtpParameters WebRtcVoiceMediaChannel::GetRtpReceiveParameters( << ssrc << " which doesn't exist."; return webrtc::RtpParameters(); } - rtp_params = it->second->GetRtpParameters(); + rtp_params.encodings.emplace_back(); + rtp_params.encodings.back().ssrc = it->second->stream().remote_ssrc(); + rtp_params.header_extensions = recv_rtp_extensions_; for (const AudioCodec& codec : recv_codecs_) { rtp_params.codecs.push_back(codec.ToCodecParameters());