Skip to content

Commit

Permalink
Delete unnecssary AudioReceiveStreamInterface::GetRtpExtensions
Browse files Browse the repository at this point in the history
Bug: webrtc:7135, webrtc:14795
Change-Id: I0242a3600d4a156eae2315966e5e59e03be8aeab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290998
Commit-Queue: Per Kjellander <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/main@{#39139}
  • Loading branch information
perkj authored and WebRTC LUCI CQ committed Jan 18, 2023
1 parent 444741e commit 9ece54f
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 28 deletions.
6 changes: 0 additions & 6 deletions audio/audio_receive_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ void AudioReceiveStreamImpl::SetRtpExtensions(
config_.rtp.extensions = std::move(extensions);
}

const std::vector<RtpExtension>& AudioReceiveStreamImpl::GetRtpExtensions()
const {
RTC_DCHECK_RUN_ON(&worker_thread_checker_);
return config_.rtp.extensions;
}

RtpHeaderExtensionMap AudioReceiveStreamImpl::GetRtpExtensionMap() const {
return RtpHeaderExtensionMap(config_.rtp.extensions);
}
Expand Down
1 change: 0 additions & 1 deletion audio/audio_receive_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class AudioReceiveStreamImpl final : public webrtc::AudioReceiveStreamInterface,
void SetFrameDecryptor(rtc::scoped_refptr<webrtc::FrameDecryptorInterface>
frame_decryptor) override;
void SetRtpExtensions(std::vector<RtpExtension> extensions) override;
const std::vector<RtpExtension>& GetRtpExtensions() const override;
RtpHeaderExtensionMap GetRtpExtensionMap() const override;

webrtc::AudioReceiveStreamInterface::Stats GetStats(
Expand Down
6 changes: 0 additions & 6 deletions call/audio_receive_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<RtpExtension>& GetRtpExtensions() const = 0;

protected:
virtual ~AudioReceiveStreamInterface() {}
};
Expand Down
5 changes: 0 additions & 5 deletions media/engine/fake_webrtc_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ void FakeAudioReceiveStream::SetRtpExtensions(
config_.rtp.extensions = std::move(extensions);
}

const std::vector<webrtc::RtpExtension>&
FakeAudioReceiveStream::GetRtpExtensions() const {
return config_.rtp.extensions;
}

webrtc::RtpHeaderExtensionMap FakeAudioReceiveStream::GetRtpExtensionMap()
const {
return webrtc::RtpHeaderExtensionMap(config_.rtp.extensions);
Expand Down
1 change: 0 additions & 1 deletion media/engine/fake_webrtc_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class FakeAudioReceiveStream final
void SetFrameDecryptor(rtc::scoped_refptr<webrtc::FrameDecryptorInterface>
frame_decryptor) override;
void SetRtpExtensions(std::vector<webrtc::RtpExtension> extensions) override;
const std::vector<webrtc::RtpExtension>& GetRtpExtensions() const override;
webrtc::RtpHeaderExtensionMap GetRtpExtensionMap() const override;

webrtc::AudioReceiveStreamInterface::Stats GetStats(
Expand Down
12 changes: 3 additions & 9 deletions media/engine/webrtc_voice_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<webrtc::FrameTransformerInterface> frame_transformer) {
RTC_DCHECK_RUN_ON(&worker_thread_checker_);
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 9ece54f

Please sign in to comment.