Set ChannelReceive transport at construction time.
Followup to cl https://webrtc-review.googlesource.com/c/src/+/103640.
Set the rtcp_send_transport at construction time, delete
RegisterTransport, and the proxying of transport methods.
In addition, delete the unused RtcpRtpStats argument from the
constructor.
Bug: webrtc:9801
Change-Id: I80f25bc08dc2130386053568ddce4ef91654caeb
Reviewed-on: https://webrtc-review.googlesource.com/c/103803
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25010}
diff --git a/audio/audio_receive_stream_unittest.cc b/audio/audio_receive_stream_unittest.cc
index c5c53e5..97c42c4 100644
--- a/audio/audio_receive_stream_unittest.cc
+++ b/audio/audio_receive_stream_unittest.cc
@@ -25,6 +25,7 @@
#include "modules/rtp_rtcp/source/byte_io.h"
#include "test/gtest.h"
#include "test/mock_audio_decoder_factory.h"
+#include "test/mock_transport.h"
namespace webrtc {
namespace test {
@@ -89,7 +90,6 @@
.Times(1);
EXPECT_CALL(*channel_proxy_, ResetReceiverCongestionControlObjects())
.Times(1);
- EXPECT_CALL(*channel_proxy_, RegisterTransport(nullptr)).Times(2);
EXPECT_CALL(*channel_proxy_, DisassociateSendChannel()).Times(1);
EXPECT_CALL(*channel_proxy_, SetReceiveCodecs(_))
.WillRepeatedly(Invoke([](const std::map<int, SdpAudioFormat>& codecs) {
@@ -103,6 +103,7 @@
RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelId));
stream_config_.rtp.extensions.push_back(RtpExtension(
RtpExtension::kTransportSequenceNumberUri, kTransportSequenceNumberId));
+ stream_config_.rtcp_send_transport = &rtcp_send_transport_;
stream_config_.decoder_factory =
new rtc::RefCountedObject<MockAudioDecoderFactory>;
}
@@ -150,6 +151,7 @@
AudioReceiveStream::Config stream_config_;
testing::StrictMock<MockChannelReceiveProxy>* channel_proxy_ = nullptr;
RtpStreamReceiverController rtp_stream_receiver_controller_;
+ MockTransport rtcp_send_transport_;
};
void BuildOneByteExtension(std::vector<uint8_t>::iterator it,