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

Side by Side Diff: webrtc/tools/agc/agc_harness.cc

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
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 // Refer to kUsage below for a description. 11 // Refer to kUsage below for a description.
12 12
13 #include <memory>
14
13 #include "gflags/gflags.h" 15 #include "gflags/gflags.h"
14 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
15 #include "webrtc/base/format_macros.h" 17 #include "webrtc/base/format_macros.h"
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/system_wrappers/include/sleep.h" 18 #include "webrtc/system_wrappers/include/sleep.h"
18 #include "webrtc/system_wrappers/include/trace.h" 19 #include "webrtc/system_wrappers/include/trace.h"
19 #include "webrtc/test/channel_transport/channel_transport.h" 20 #include "webrtc/test/channel_transport/channel_transport.h"
20 #include "webrtc/test/testsupport/trace_to_stderr.h" 21 #include "webrtc/test/testsupport/trace_to_stderr.h"
21 #include "webrtc/modules/audio_processing/include/audio_processing.h" 22 #include "webrtc/modules/audio_processing/include/audio_processing.h"
22 #include "webrtc/voice_engine/include/voe_audio_processing.h" 23 #include "webrtc/voice_engine/include/voe_audio_processing.h"
23 #include "webrtc/voice_engine/include/voe_base.h" 24 #include "webrtc/voice_engine/include/voe_base.h"
24 #include "webrtc/voice_engine/include/voe_codec.h" 25 #include "webrtc/voice_engine/include/voe_codec.h"
25 #include "webrtc/voice_engine/include/voe_external_media.h" 26 #include "webrtc/voice_engine/include/voe_external_media.h"
26 #include "webrtc/voice_engine/include/voe_file.h" 27 #include "webrtc/voice_engine/include/voe_file.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 211 }
211 212
212 private: 213 private:
213 VoiceEngine* voe_; 214 VoiceEngine* voe_;
214 VoEBase* base_; 215 VoEBase* base_;
215 VoEHardware* hardware_; 216 VoEHardware* hardware_;
216 VoECodec* codec_; 217 VoECodec* codec_;
217 int channel_; 218 int channel_;
218 int capture_idx_; 219 int capture_idx_;
219 int render_idx_; 220 int render_idx_;
220 rtc::scoped_ptr<test::VoiceChannelTransport> channel_transport_; 221 std::unique_ptr<test::VoiceChannelTransport> channel_transport_;
221 }; 222 };
222 223
223 void RunHarness() { 224 void RunHarness() {
224 rtc::scoped_ptr<AgcVoiceEngine> voe1(new AgcVoiceEngine( 225 std::unique_ptr<AgcVoiceEngine> voe1(new AgcVoiceEngine(
225 FLAGS_legacy_agc, 2000, 2000, FLAGS_capture1, FLAGS_render1)); 226 FLAGS_legacy_agc, 2000, 2000, FLAGS_capture1, FLAGS_render1));
226 rtc::scoped_ptr<AgcVoiceEngine> voe2; 227 std::unique_ptr<AgcVoiceEngine> voe2;
227 if (FLAGS_parallel) { 228 if (FLAGS_parallel) {
228 voe2.reset(new AgcVoiceEngine(!FLAGS_legacy_agc, 3000, 3000, FLAGS_capture2, 229 voe2.reset(new AgcVoiceEngine(!FLAGS_legacy_agc, 3000, 3000, FLAGS_capture2,
229 FLAGS_render2)); 230 FLAGS_render2));
230 voe1->StartPlaying(AgcVoiceEngine::PanLeft, ""); 231 voe1->StartPlaying(AgcVoiceEngine::PanLeft, "");
231 voe1->StartSending(); 232 voe1->StartSending();
232 voe2->StartPlaying(AgcVoiceEngine::PanRight, ""); 233 voe2->StartPlaying(AgcVoiceEngine::PanRight, "");
233 voe2->StartSending(); 234 voe2->StartSending();
234 } else if (FLAGS_aec) { 235 } else if (FLAGS_aec) {
235 voe1.reset(new AgcVoiceEngine(FLAGS_legacy_agc, 2000, 4242, FLAGS_capture1, 236 voe1.reset(new AgcVoiceEngine(FLAGS_legacy_agc, 2000, 4242, FLAGS_capture1,
236 FLAGS_render1)); 237 FLAGS_render1));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 webrtc::PrintDevices(); 275 webrtc::PrintDevices();
275 } 276 }
276 if (FLAGS_codecs) { 277 if (FLAGS_codecs) {
277 webrtc::PrintCodecs(); 278 webrtc::PrintCodecs();
278 } 279 }
279 if (!FLAGS_devices && !FLAGS_codecs) { 280 if (!FLAGS_devices && !FLAGS_codecs) {
280 webrtc::RunHarness(); 281 webrtc::RunHarness();
281 } 282 }
282 return 0; 283 return 0;
283 } 284 }
OLDNEW
« no previous file with comments | « webrtc/tools/agc/activity_metric.cc ('k') | webrtc/tools/e2e_quality/audio/audio_e2e_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698