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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/flexfec_sender_unittest.cc

Issue 2491293002: Make FlexFEC packets paceable through RTPSender. (Closed)
Patch Set: Feedback response 3. 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 (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::vector<std::unique_ptr<RtpPacketToSend>> fec_packets = 63 std::vector<std::unique_ptr<RtpPacketToSend>> fec_packets =
64 sender->GetFecPackets(); 64 sender->GetFecPackets();
65 EXPECT_FALSE(sender->FecAvailable()); 65 EXPECT_FALSE(sender->FecAvailable());
66 EXPECT_EQ(1U, fec_packets.size()); 66 EXPECT_EQ(1U, fec_packets.size());
67 67
68 return std::move(fec_packets.front()); 68 return std::move(fec_packets.front());
69 } 69 }
70 70
71 } // namespace 71 } // namespace
72 72
73 TEST(FlexfecSenderTest, Ssrc) {
74 SimulatedClock clock(kInitialSimulatedClockTime);
75 FlexfecSender sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc,
76 kNoRtpHeaderExtensions, &clock);
77
78 EXPECT_EQ(kFlexfecSsrc, sender.ssrc());
79 }
80
73 TEST(FlexfecSenderTest, NoFecAvailableBeforeMediaAdded) { 81 TEST(FlexfecSenderTest, NoFecAvailableBeforeMediaAdded) {
74 SimulatedClock clock(kInitialSimulatedClockTime); 82 SimulatedClock clock(kInitialSimulatedClockTime);
75 FlexfecSender sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc, 83 FlexfecSender sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc,
76 kNoRtpHeaderExtensions, &clock); 84 kNoRtpHeaderExtensions, &clock);
77 85
78 EXPECT_FALSE(sender.FecAvailable()); 86 EXPECT_FALSE(sender.FecAvailable());
79 auto fec_packets = sender.GetFecPackets(); 87 auto fec_packets = sender.GetFecPackets();
80 EXPECT_EQ(0U, fec_packets.size()); 88 EXPECT_EQ(0U, fec_packets.size());
81 } 89 }
82 90
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 251
244 TEST(FlexfecSenderTest, MaxPacketOverhead) { 252 TEST(FlexfecSenderTest, MaxPacketOverhead) {
245 SimulatedClock clock(kInitialSimulatedClockTime); 253 SimulatedClock clock(kInitialSimulatedClockTime);
246 FlexfecSender sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc, 254 FlexfecSender sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc,
247 kNoRtpHeaderExtensions, &clock); 255 kNoRtpHeaderExtensions, &clock);
248 256
249 EXPECT_EQ(kFlexfecMaxHeaderSize, sender.MaxPacketOverhead()); 257 EXPECT_EQ(kFlexfecMaxHeaderSize, sender.MaxPacketOverhead());
250 } 258 }
251 259
252 } // namespace webrtc 260 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698