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

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

Issue 1368943002: Fix suspend below min bitrate in new API by making it possible to set min bitrate at the receive-si… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge. Created 5 years, 2 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const size_t payloadSize, 51 const size_t payloadSize,
52 const WebRtcRTPHeader* rtpHeader) override { 52 const WebRtcRTPHeader* rtpHeader) override {
53 ADD_FAILURE(); 53 ADD_FAILURE();
54 return 0; 54 return 0;
55 } 55 }
56 RTCPReceiver* rtcp_receiver_; 56 RTCPReceiver* rtcp_receiver_;
57 }; 57 };
58 58
59 class RtcpReceiverTest : public ::testing::Test { 59 class RtcpReceiverTest : public ::testing::Test {
60 protected: 60 protected:
61 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000;
62
63 RtcpReceiverTest() 61 RtcpReceiverTest()
64 : over_use_detector_options_(), 62 : over_use_detector_options_(),
65 system_clock_(1335900000), 63 system_clock_(1335900000),
66 remote_bitrate_observer_(), 64 remote_bitrate_observer_(),
67 remote_bitrate_estimator_(new RemoteBitrateEstimatorSingleStream( 65 remote_bitrate_estimator_(
68 &remote_bitrate_observer_, 66 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_,
69 &system_clock_, 67 &system_clock_)) {
70 kRemoteBitrateEstimatorMinBitrateBps)) {
71 test_transport_ = new TestTransport(); 68 test_transport_ = new TestTransport();
72 69
73 RtpRtcp::Configuration configuration; 70 RtpRtcp::Configuration configuration;
74 configuration.audio = false; 71 configuration.audio = false;
75 configuration.clock = &system_clock_; 72 configuration.clock = &system_clock_;
76 configuration.outgoing_transport = test_transport_; 73 configuration.outgoing_transport = test_transport_;
77 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get(); 74 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get();
78 rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration); 75 rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration);
79 rtcp_receiver_ = new RTCPReceiver(&system_clock_, false, nullptr, nullptr, 76 rtcp_receiver_ = new RTCPReceiver(&system_clock_, false, nullptr, nullptr,
80 nullptr, nullptr, rtp_rtcp_impl_); 77 nullptr, nullptr, rtp_rtcp_impl_);
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 rr2.WithReportBlock(rb2); 1021 rr2.WithReportBlock(rb2);
1025 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build()); 1022 rtc::scoped_ptr<rtcp::RawPacket> p2(rr2.Build());
1026 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length())); 1023 EXPECT_EQ(0, InjectRtcpPacket(p2->Buffer(), p2->Length()));
1027 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss, 1024 EXPECT_TRUE(callback.Matches(kSourceSsrc, kSequenceNumber, kFractionLoss,
1028 kCumulativeLoss, kJitter)); 1025 kCumulativeLoss, kJitter));
1029 } 1026 }
1030 1027
1031 } // Anonymous namespace 1028 } // Anonymous namespace
1032 1029
1033 } // namespace webrtc 1030 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc ('k') | webrtc/test/rtp_rtcp_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698