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

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

Issue 1376423002: Make overuse estimator one dimensional. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 5 years 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return true; 54 return true;
55 } 55 }
56 private: 56 private:
57 RTCPReceiver* rtcp_receiver_; 57 RTCPReceiver* rtcp_receiver_;
58 }; 58 };
59 59
60 60
61 class RtcpFormatRembTest : public ::testing::Test { 61 class RtcpFormatRembTest : public ::testing::Test {
62 protected: 62 protected:
63 RtcpFormatRembTest() 63 RtcpFormatRembTest()
64 : over_use_detector_options_(), 64 : system_clock_(Clock::GetRealTimeClock()),
65 system_clock_(Clock::GetRealTimeClock()),
66 dummy_rtp_rtcp_impl_(nullptr), 65 dummy_rtp_rtcp_impl_(nullptr),
67 receive_statistics_(ReceiveStatistics::Create(system_clock_)), 66 receive_statistics_(ReceiveStatistics::Create(system_clock_)),
68 rtcp_sender_(nullptr), 67 rtcp_sender_(nullptr),
69 rtcp_receiver_(nullptr), 68 rtcp_receiver_(nullptr),
70 test_transport_(nullptr), 69 test_transport_(nullptr),
71 remote_bitrate_observer_(), 70 remote_bitrate_observer_(),
72 remote_bitrate_estimator_( 71 remote_bitrate_estimator_(
73 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, 72 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_,
74 system_clock_)) {} 73 system_clock_)) {}
75 void SetUp() override; 74 void SetUp() override;
76 void TearDown() override; 75 void TearDown() override;
77 76
78 OverUseDetectorOptions over_use_detector_options_;
79 Clock* system_clock_; 77 Clock* system_clock_;
80 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; 78 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_;
81 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; 79 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
82 RTCPSender* rtcp_sender_; 80 RTCPSender* rtcp_sender_;
83 RTCPReceiver* rtcp_receiver_; 81 RTCPReceiver* rtcp_receiver_;
84 TestTransport* test_transport_; 82 TestTransport* test_transport_;
85 test::NullTransport null_transport_; 83 test::NullTransport null_transport_;
86 MockRemoteBitrateObserver remote_bitrate_observer_; 84 MockRemoteBitrateObserver remote_bitrate_observer_;
87 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 85 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
88 }; 86 };
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 125
128 TEST_F(RtcpFormatRembTest, TestCompund) { 126 TEST_F(RtcpFormatRembTest, TestCompund) {
129 uint32_t SSRCs[2] = {456789, 98765}; 127 uint32_t SSRCs[2] = {456789, 98765};
130 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 128 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
131 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); 129 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2));
132 RTCPSender::FeedbackState feedback_state = 130 RTCPSender::FeedbackState feedback_state =
133 dummy_rtp_rtcp_impl_->GetFeedbackState(); 131 dummy_rtp_rtcp_impl_->GetFeedbackState();
134 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); 132 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
135 } 133 }
136 } // namespace 134 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698