Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: webrtc/pc/channel_unittest.cc

Issue 2437503004: Set actual transport overhead in rtp_rtcp (Closed)
Patch Set: Responde to comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 transport_channel1->SignalSelectedCandidatePairChanged( 956 transport_channel1->SignalSelectedCandidatePairChanged(
957 transport_channel1, candidate_pair.get(), kLastPacketId, true); 957 transport_channel1, candidate_pair.get(), kLastPacketId, true);
958 }); 958 });
959 WaitForThreads(); 959 WaitForThreads();
960 EXPECT_EQ(1, media_channel1->num_network_route_changes()); 960 EXPECT_EQ(1, media_channel1->num_network_route_changes());
961 rtc::NetworkRoute expected_network_route(true, kLocalNetId, kRemoteNetId, 961 rtc::NetworkRoute expected_network_route(true, kLocalNetId, kRemoteNetId,
962 kLastPacketId); 962 kLastPacketId);
963 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); 963 EXPECT_EQ(expected_network_route, media_channel1->last_network_route());
964 EXPECT_EQ(kLastPacketId, 964 EXPECT_EQ(kLastPacketId,
965 media_channel1->last_network_route().last_sent_packet_id); 965 media_channel1->last_network_route().last_sent_packet_id);
966 constexpr int kTransportOverheadPerPacket = 28; // Ipv4(20) + UDP(8).
967 EXPECT_EQ(kTransportOverheadPerPacket,
968 media_channel1->transport_overhead_per_packet());
966 } 969 }
967 970
968 // Test setting up a call. 971 // Test setting up a call.
969 void TestCallSetup() { 972 void TestCallSetup() {
970 CreateChannels(0, 0); 973 CreateChannels(0, 0);
971 EXPECT_FALSE(channel1_->secure()); 974 EXPECT_FALSE(channel1_->secure());
972 EXPECT_TRUE(SendInitiate()); 975 EXPECT_TRUE(SendInitiate());
973 if (verify_playout_) { 976 if (verify_playout_) {
974 EXPECT_TRUE(media_channel1_->playout()); 977 EXPECT_TRUE(media_channel1_->playout());
975 } 978 }
(...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3677 }; 3680 };
3678 rtc::CopyOnWriteBuffer payload(data, 3); 3681 rtc::CopyOnWriteBuffer payload(data, 3);
3679 cricket::SendDataResult result; 3682 cricket::SendDataResult result;
3680 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 3683 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
3681 EXPECT_EQ(params.ssrc, 3684 EXPECT_EQ(params.ssrc,
3682 media_channel1_->last_sent_data_params().ssrc); 3685 media_channel1_->last_sent_data_params().ssrc);
3683 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 3686 EXPECT_EQ("foo", media_channel1_->last_sent_data());
3684 } 3687 }
3685 3688
3686 // TODO(pthatcher): TestSetReceiver? 3689 // TODO(pthatcher): TestSetReceiver?
OLDNEW
« webrtc/pc/channel.cc ('K') | « webrtc/pc/channel.cc ('k') | webrtc/pc/srtpfilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698