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

Side by Side Diff: webrtc/modules/audio_coding/test/insert_packet_with_timing.cc

Issue 1695763004: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/test/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up-neteq
Patch Set: Created 4 years, 10 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 <stdio.h> 11 #include <stdio.h>
12 12
13 #include <memory>
14
13 #include "gflags/gflags.h" 15 #include "gflags/gflags.h"
14 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/common_types.h" 17 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 18 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
18 #include "webrtc/modules/audio_coding/test/Channel.h" 19 #include "webrtc/modules/audio_coding/test/Channel.h"
19 #include "webrtc/modules/audio_coding/test/PCMFile.h" 20 #include "webrtc/modules/audio_coding/test/PCMFile.h"
20 #include "webrtc/modules/include/module_common_types.h" 21 #include "webrtc/modules/include/module_common_types.h"
21 #include "webrtc/system_wrappers/include/clock.h" 22 #include "webrtc/system_wrappers/include/clock.h"
22 #include "webrtc/test/testsupport/fileutils.h" 23 #include "webrtc/test/testsupport/fileutils.h"
23 24
24 // Codec. 25 // Codec.
25 DEFINE_string(codec, "opus", "Codec Name"); 26 DEFINE_string(codec, "opus", "Codec Name");
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 int n; 235 int n;
235 EXPECT_EQ(1, fscanf(seq_num_fid_, "%d\n", &n)); 236 EXPECT_EQ(1, fscanf(seq_num_fid_, "%d\n", &n));
236 return n; 237 return n;
237 } 238 }
238 239
239 // This class just creates these pointers, not deleting them. They are deleted 240 // This class just creates these pointers, not deleting them. They are deleted
240 // by the associated ACM. 241 // by the associated ACM.
241 SimulatedClock* sender_clock_; 242 SimulatedClock* sender_clock_;
242 SimulatedClock* receiver_clock_; 243 SimulatedClock* receiver_clock_;
243 244
244 rtc::scoped_ptr<AudioCodingModule> send_acm_; 245 std::unique_ptr<AudioCodingModule> send_acm_;
245 rtc::scoped_ptr<AudioCodingModule> receive_acm_; 246 std::unique_ptr<AudioCodingModule> receive_acm_;
246 Channel* channel_; 247 Channel* channel_;
247 248
248 FILE* seq_num_fid_; // Input (text), one sequence number per line. 249 FILE* seq_num_fid_; // Input (text), one sequence number per line.
249 FILE* send_ts_fid_; // Input (text), one send timestamp per line. 250 FILE* send_ts_fid_; // Input (text), one send timestamp per line.
250 FILE* receive_ts_fid_; // Input (text), one receive timestamp per line. 251 FILE* receive_ts_fid_; // Input (text), one receive timestamp per line.
251 FILE* pcm_out_fid_; // Output PCM16. 252 FILE* pcm_out_fid_; // Output PCM16.
252 253
253 PCMFile pcm_in_fid_; // Input PCM16. 254 PCMFile pcm_in_fid_; // Input PCM16.
254 255
255 int samples_in_1ms_; 256 int samples_in_1ms_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (delay_log != NULL) { 299 if (delay_log != NULL) {
299 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms); 300 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms);
300 } 301 }
301 } 302 }
302 } 303 }
303 std::cout << std::endl; 304 std::cout << std::endl;
304 test.TearDown(); 305 test.TearDown();
305 if (delay_log != NULL) 306 if (delay_log != NULL)
306 fclose(delay_log); 307 fclose(delay_log);
307 } 308 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/test/iSACTest.h ('k') | webrtc/modules/audio_coding/test/opus_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698