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

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

Issue 1924443002: Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 <memory>
12
13 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
14 12
15 #include "webrtc/common_types.h" 13 #include "webrtc/common_types.h"
16 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" 14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
17 #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"
18 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl e_stream.h" 16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl e_stream.h"
19 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h" 17 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
20 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" 18 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
21 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" 19 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
22 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 20 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 remote_bitrate_observer_(), 67 remote_bitrate_observer_(),
70 remote_bitrate_estimator_( 68 remote_bitrate_estimator_(
71 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_, 69 new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_,
72 system_clock_)) {} 70 system_clock_)) {}
73 void SetUp() override; 71 void SetUp() override;
74 void TearDown() override; 72 void TearDown() override;
75 73
76 OverUseDetectorOptions over_use_detector_options_; 74 OverUseDetectorOptions over_use_detector_options_;
77 Clock* system_clock_; 75 Clock* system_clock_;
78 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_; 76 ModuleRtpRtcpImpl* dummy_rtp_rtcp_impl_;
79 std::unique_ptr<ReceiveStatistics> receive_statistics_; 77 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
80 RTCPSender* rtcp_sender_; 78 RTCPSender* rtcp_sender_;
81 RTCPReceiver* rtcp_receiver_; 79 RTCPReceiver* rtcp_receiver_;
82 TestTransport* test_transport_; 80 TestTransport* test_transport_;
83 test::NullTransport null_transport_; 81 test::NullTransport null_transport_;
84 MockRemoteBitrateObserver remote_bitrate_observer_; 82 MockRemoteBitrateObserver remote_bitrate_observer_;
85 std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 83 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
86 }; 84 };
87 85
88 void RtcpFormatRembTest::SetUp() { 86 void RtcpFormatRembTest::SetUp() {
89 RtpRtcp::Configuration configuration; 87 RtpRtcp::Configuration configuration;
90 configuration.audio = false; 88 configuration.audio = false;
91 configuration.clock = system_clock_; 89 configuration.clock = system_clock_;
92 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get(); 90 configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get();
93 configuration.outgoing_transport = &null_transport_; 91 configuration.outgoing_transport = &null_transport_;
94 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration); 92 dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration);
95 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, nullptr, nullptr, 93 rtcp_receiver_ = new RTCPReceiver(system_clock_, false, nullptr, nullptr,
(...skipping 30 matching lines...) Expand all
126 TEST_F(RtcpFormatRembTest, TestCompund) { 124 TEST_F(RtcpFormatRembTest, TestCompund) {
127 uint32_t SSRCs[2] = {456789, 98765}; 125 uint32_t SSRCs[2] = {456789, 98765};
128 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 126 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
129 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2)); 127 rtcp_sender_->SetREMBData(1234, std::vector<uint32_t>(SSRCs, SSRCs + 2));
130 RTCPSender::FeedbackState feedback_state = 128 RTCPSender::FeedbackState feedback_state =
131 dummy_rtp_rtcp_impl_->GetFeedbackState(); 129 dummy_rtp_rtcp_impl_->GetFeedbackState();
132 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb)); 130 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRemb));
133 } 131 }
134 } // namespace 132 } // namespace
135 } // namespace webrtc 133 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698