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

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

Issue 2669033003: Revert of Enable audio streams to send padding. (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 sizeof(kPayloadData) + kGenericHeaderLength + 1484 sizeof(kPayloadData) + kGenericHeaderLength +
1485 kRtpOverheadBytesPerPacket, 1485 kRtpOverheadBytesPerPacket,
1486 PacketInfo::kNotAProbe)) 1486 PacketInfo::kNotAProbe))
1487 .Times(1); 1487 .Times(1);
1488 EXPECT_CALL(mock_overhead_observer, 1488 EXPECT_CALL(mock_overhead_observer,
1489 OnOverheadChanged(kRtpOverheadBytesPerPacket)) 1489 OnOverheadChanged(kRtpOverheadBytesPerPacket))
1490 .Times(1); 1490 .Times(1);
1491 SendGenericPayload(); 1491 SendGenericPayload();
1492 } 1492 }
1493 1493
1494 TEST_F(RtpSenderTest, SendAudioPadding) {
1495 MockTransport transport;
1496 const bool kEnableAudio = true;
1497 rtp_sender_.reset(new RTPSender(
1498 kEnableAudio, &fake_clock_, &transport, &mock_paced_sender_, nullptr,
1499 nullptr, nullptr, nullptr, nullptr, nullptr, &mock_rtc_event_log_,
1500 nullptr, &retransmission_rate_limiter_, nullptr));
1501 rtp_sender_->SetSendPayloadType(kPayload);
1502 rtp_sender_->SetSequenceNumber(kSeqNum);
1503 rtp_sender_->SetTimestampOffset(0);
1504 rtp_sender_->SetSSRC(kSsrc);
1505
1506 const size_t kPaddingSize = 59;
1507 EXPECT_CALL(transport, SendRtp(_, kPaddingSize + kRtpHeaderSize, _))
1508 .WillOnce(testing::Return(true));
1509 EXPECT_EQ(kPaddingSize, rtp_sender_->TimeToSendPadding(
1510 kPaddingSize, PacketInfo::kNotAProbe));
1511
1512 // Requested padding size is too small, will send a larger one.
1513 const size_t kMinPaddingSize = 50;
1514 EXPECT_CALL(transport, SendRtp(_, kMinPaddingSize + kRtpHeaderSize, _))
1515 .WillOnce(testing::Return(true));
1516 EXPECT_EQ(kMinPaddingSize, rtp_sender_->TimeToSendPadding(
1517 kMinPaddingSize - 5, PacketInfo::kNotAProbe));
1518 }
1519 } // namespace webrtc 1494 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698