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

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

Issue 1362923002: Revert of Wire up send-side bandwidth estimation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Manual merge of revert 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }; 53 };
54 54
55 55
56 class RtcpFormatRembTest : public ::testing::Test { 56 class RtcpFormatRembTest : public ::testing::Test {
57 protected: 57 protected:
58 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000; 58 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000;
59 59
60 RtcpFormatRembTest() 60 RtcpFormatRembTest()
61 : over_use_detector_options_(), 61 : over_use_detector_options_(),
62 system_clock_(Clock::GetRealTimeClock()), 62 system_clock_(Clock::GetRealTimeClock()),
63 dummy_rtp_rtcp_impl_(nullptr),
64 receive_statistics_(ReceiveStatistics::Create(system_clock_)), 63 receive_statistics_(ReceiveStatistics::Create(system_clock_)),
65 rtcp_sender_(nullptr),
66 rtcp_receiver_(nullptr),
67 test_transport_(nullptr),
68 remote_bitrate_observer_(), 64 remote_bitrate_observer_(),
69 remote_bitrate_estimator_(new RemoteBitrateEstimatorSingleStream( 65 remote_bitrate_estimator_(new RemoteBitrateEstimatorSingleStream(
70 &remote_bitrate_observer_, 66 &remote_bitrate_observer_,
71 system_clock_, 67 system_clock_,
72 kRemoteBitrateEstimatorMinBitrateBps)) {} 68 kRemoteBitrateEstimatorMinBitrateBps)) {}
73 void SetUp() override; 69 void SetUp() override;
74 void TearDown() override; 70 void TearDown() override;
75 71
76 OverUseDetectorOptions over_use_detector_options_; 72 OverUseDetectorOptions over_use_detector_options_;
77 Clock* system_clock_; 73 Clock* system_clock_;
78 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; 74 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_;
79 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; 75 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
80 RTCPSender* rtcp_sender_; 76 RTCPSender* rtcp_sender_;
81 RTCPReceiver* rtcp_receiver_; 77 RTCPReceiver* rtcp_receiver_;
82 TestTransport* test_transport_; 78 TestTransport* test_transport_;
83 MockRemoteBitrateObserver remote_bitrate_observer_; 79 MockRemoteBitrateObserver remote_bitrate_observer_;
84 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 80 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
85 }; 81 };
86 82
87 void RtcpFormatRembTest::SetUp() { 83 void RtcpFormatRembTest::SetUp() {
88 RtpRtcp::Configuration configuration; 84 RtpRtcp::Configuration configuration;
89 configuration.audio = false; 85 configuration.audio = false;
90 configuration.clock = system_clock_; 86 configuration.clock = system_clock_;
91 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get(); 87 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get();
92 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration); 88 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration);
93 rtcp_sender_ = 89 rtcp_sender_ =
94 new RTCPSender(false, system_clock_, receive_statistics_.get(), nullptr); 90 new RTCPSender(false, system_clock_, receive_statistics_.get(), NULL);
95 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, nullptr, nullptr, 91 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, NULL, NULL, NULL,
96 nullptr, nullptr, dummy_rtp_rtcp_impl_); 92 dummy_rtp_rtcp_impl_);
97 test_transport_ = new TestTransport(rtcp_receiver_); 93 test_transport_ = new TestTransport(rtcp_receiver_);
98 94
99 EXPECT_EQ(0, rtcp_sender_->RegisterSendTransport(test_transport_)); 95 EXPECT_EQ(0, rtcp_sender_->RegisterSendTransport(test_transport_));
100 } 96 }
101 97
102 void RtcpFormatRembTest::TearDown() { 98 void RtcpFormatRembTest::TearDown() {
103 delete rtcp_sender_; 99 delete rtcp_sender_;
104 delete rtcp_receiver_; 100 delete rtcp_receiver_;
105 delete dummy_rtp_rtcp_impl_; 101 delete dummy_rtp_rtcp_impl_;
106 delete test_transport_; 102 delete test_transport_;
(...skipping 18 matching lines...) Expand all
125 121
126 TEST_F(RtcpFormatRembTest, TestCompund) { 122 TEST_F(RtcpFormatRembTest, TestCompund) {
127 uint32_t SSRCs[2] = {456789, 98765}; 123 uint32_t SSRCs[2] = {456789, 98765};
128 rtcp_sender_->SetRTCPStatus(kRtcpCompound); 124 rtcp_sender_->SetRTCPStatus(kRtcpCompound);
129 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); 125 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2));
130 RTCPSender::FeedbackState feedback_state = 126 RTCPSender::FeedbackState feedback_state =
131 dummy_rtp_rtcp_impl_->GetFeedbackState(); 127 dummy_rtp_rtcp_impl_->GetFeedbackState();
132 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); 128 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
133 } 129 }
134 } // namespace 130 } // namespace
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698