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

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

Issue 1208083002: Remove MimdRateControl and factories for RemoteBitrateEstimor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated thresholds for TestTimestampGrouping Created 5 years, 5 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
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 #include "webrtc/common_types.h" 13 #include "webrtc/common_types.h"
14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" 14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
15 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra te_observer.h" 15 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitra te_observer.h"
16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl e_stream.h"
16 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h" 17 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" 18 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
18 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" 19 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
19 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 20 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
20 #include "webrtc/typedefs.h" 21 #include "webrtc/typedefs.h"
21 22
22 namespace { 23 namespace {
23 24
24 using namespace webrtc; 25 using namespace webrtc;
25 26
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 class RtcpFormatRembTest : public ::testing::Test { 62 class RtcpFormatRembTest : public ::testing::Test {
62 protected: 63 protected:
63 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000; 64 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000;
64 65
65 RtcpFormatRembTest() 66 RtcpFormatRembTest()
66 : over_use_detector_options_(), 67 : over_use_detector_options_(),
67 system_clock_(Clock::GetRealTimeClock()), 68 system_clock_(Clock::GetRealTimeClock()),
68 receive_statistics_(ReceiveStatistics::Create(system_clock_)), 69 receive_statistics_(ReceiveStatistics::Create(system_clock_)),
69 remote_bitrate_observer_(), 70 remote_bitrate_observer_(),
70 remote_bitrate_estimator_( 71 remote_bitrate_estimator_(new RemoteBitrateEstimatorSingleStream(
71 RemoteBitrateEstimatorFactory().Create( 72 &remote_bitrate_observer_,
72 &remote_bitrate_observer_, 73 system_clock_,
73 system_clock_, 74 kRemoteBitrateEstimatorMinBitrateBps)) {}
74 kMimdControl,
75 kRemoteBitrateEstimatorMinBitrateBps)) {}
76 void SetUp() override; 75 void SetUp() override;
77 void TearDown() override; 76 void TearDown() override;
78 77
79 OverUseDetectorOptions over_use_detector_options_; 78 OverUseDetectorOptions over_use_detector_options_;
80 Clock* system_clock_; 79 Clock* system_clock_;
81 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; 80 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_;
82 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_; 81 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
83 RTCPSender* rtcp_sender_; 82 RTCPSender* rtcp_sender_;
84 RTCPReceiver* rtcp_receiver_; 83 RTCPReceiver* rtcp_receiver_;
85 TestTransport* test_transport_; 84 TestTransport* test_transport_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 128
130 TEST_F(RtcpFormatRembTest, TestCompund) { 129 TEST_F(RtcpFormatRembTest, TestCompund) {
131 uint32_t SSRCs[2] = {456789, 98765}; 130 uint32_t SSRCs[2] = {456789, 98765};
132 rtcp_sender_->SetRTCPStatus(kRtcpCompound); 131 rtcp_sender_->SetRTCPStatus(kRtcpCompound);
133 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); 132 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2));
134 RTCPSender::FeedbackState feedback_state = 133 RTCPSender::FeedbackState feedback_state =
135 dummy_rtp_rtcp_impl_->GetFeedbackState(); 134 dummy_rtp_rtcp_impl_->GetFeedbackState();
136 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); 135 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
137 } 136 }
138 } // namespace 137 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698