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

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc

Issue 1921233002: 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, 7 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 <algorithm> 11 #include <algorithm>
12 #include <memory>
12 #include <vector> 13 #include <vector>
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h" 16 #include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h"
16 17
17 #include "webrtc/common_types.h" 18 #include "webrtc/common_types.h"
18 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
19 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
20 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h" 21 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h"
21 22
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 delete module2; 129 delete module2;
129 delete transport1; 130 delete transport1;
130 delete transport2; 131 delete transport2;
131 delete data_receiver1; 132 delete data_receiver1;
132 delete data_receiver2; 133 delete data_receiver2;
133 delete rtp_callback; 134 delete rtp_callback;
134 } 135 }
135 136
136 RtpRtcp* module1; 137 RtpRtcp* module1;
137 RtpRtcp* module2; 138 RtpRtcp* module2;
138 rtc::scoped_ptr<ReceiveStatistics> receive_statistics1_; 139 std::unique_ptr<ReceiveStatistics> receive_statistics1_;
139 rtc::scoped_ptr<ReceiveStatistics> receive_statistics2_; 140 std::unique_ptr<ReceiveStatistics> receive_statistics2_;
140 rtc::scoped_ptr<RtpReceiver> rtp_receiver1_; 141 std::unique_ptr<RtpReceiver> rtp_receiver1_;
141 rtc::scoped_ptr<RtpReceiver> rtp_receiver2_; 142 std::unique_ptr<RtpReceiver> rtp_receiver2_;
142 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry1_; 143 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry1_;
143 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry2_; 144 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry2_;
144 VerifyingAudioReceiver* data_receiver1; 145 VerifyingAudioReceiver* data_receiver1;
145 VerifyingAudioReceiver* data_receiver2; 146 VerifyingAudioReceiver* data_receiver2;
146 LoopBackTransport* transport1; 147 LoopBackTransport* transport1;
147 LoopBackTransport* transport2; 148 LoopBackTransport* transport2;
148 RTPCallback* rtp_callback; 149 RTPCallback* rtp_callback;
149 uint32_t test_ssrc; 150 uint32_t test_ssrc;
150 uint32_t test_timestamp; 151 uint32_t test_timestamp;
151 uint16_t test_sequence_number; 152 uint16_t test_sequence_number;
152 uint32_t test_CSRC[webrtc::kRtpCsrcSize]; 153 uint32_t test_CSRC[webrtc::kRtpCsrcSize];
153 SimulatedClock fake_clock; 154 SimulatedClock fake_clock;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 for (; timeStamp <= 740 * 160; timeStamp += 160) { 339 for (; timeStamp <= 740 * 160; timeStamp += 160) {
339 EXPECT_EQ(0, module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, 340 EXPECT_EQ(0, module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96,
340 timeStamp, -1, test, 4)); 341 timeStamp, -1, test, 4));
341 fake_clock.AdvanceTimeMilliseconds(20); 342 fake_clock.AdvanceTimeMilliseconds(20);
342 module1->Process(); 343 module1->Process();
343 } 344 }
344 } 345 }
345 346
346 } // namespace 347 } // namespace
347 } // namespace webrtc 348 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698