Forward the SignalNetworkRouteChanged from DtlsSrtpTransport to BaseChannel.
In current implementation, the DtlsSrtpTransport listens to the SignalNetworkRouteChanged but doesn't forward it to the BaseChannel which makes it impossible for the media engine to update the network route and the transport overhead. The BaseChannel unit tests failed to catch this issue because it used a plain unencrypted RTP transport for testing. This CL fix that issue and update the BaseChannel tests. Bug: webrtc:7013, b/73645191 Change-Id: I417b58ff9af4e3c4fac442ff10b5a85bc2093530 Reviewed-on: https://webrtc-review.googlesource.com/55940 Commit-Queue: Zhi Huang <zhihuang@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22140}
This commit is contained in:
@ -1030,8 +1030,10 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
||||
static constexpr int kLastPacketId = 100;
|
||||
// Ipv4(20) + UDP(8).
|
||||
static constexpr int kTransportOverheadPerPacket = 28;
|
||||
static constexpr int kSrtpOverheadPerPacket = 10;
|
||||
|
||||
CreateChannels(0, 0);
|
||||
CreateChannels(DTLS, DTLS);
|
||||
SendInitiate();
|
||||
|
||||
typename T::MediaChannel* media_channel1 =
|
||||
static_cast<typename T::MediaChannel*>(channel1_->media_channel());
|
||||
@ -1073,7 +1075,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
|
||||
EXPECT_EQ(expected_network_route, media_channel1->last_network_route());
|
||||
EXPECT_EQ(kLastPacketId,
|
||||
media_channel1->last_network_route().last_sent_packet_id);
|
||||
EXPECT_EQ(kTransportOverheadPerPacket,
|
||||
EXPECT_EQ(kTransportOverheadPerPacket + kSrtpOverheadPerPacket,
|
||||
media_channel1->transport_overhead_per_packet());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user