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

Side by Side Diff: webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h

Issue 1694073002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up-actest
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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
13 13
14 #include <memory>
14 #include <string> 15 #include <string>
15 16
16 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/system_wrappers/include/clock.h" 18 #include "webrtc/system_wrappers/include/clock.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 class AudioCodingModule; 21 class AudioCodingModule;
22 class AudioDecoder; 22 class AudioDecoder;
23 struct CodecInst; 23 struct CodecInst;
24 24
25 namespace test { 25 namespace test {
26 class AudioSink; 26 class AudioSink;
27 class PacketSource; 27 class PacketSource;
(...skipping 26 matching lines...) Expand all
54 const std::string& name); 54 const std::string& name);
55 55
56 // Runs the test and returns true if successful. 56 // Runs the test and returns true if successful.
57 void Run(); 57 void Run();
58 58
59 protected: 59 protected:
60 // Method is called after each block of output audio is received from ACM. 60 // Method is called after each block of output audio is received from ACM.
61 virtual void AfterGetAudio() {} 61 virtual void AfterGetAudio() {}
62 62
63 SimulatedClock clock_; 63 SimulatedClock clock_;
64 rtc::scoped_ptr<AudioCodingModule> acm_; 64 std::unique_ptr<AudioCodingModule> acm_;
65 PacketSource* packet_source_; 65 PacketSource* packet_source_;
66 AudioSink* audio_sink_; 66 AudioSink* audio_sink_;
67 int output_freq_hz_; 67 int output_freq_hz_;
68 NumOutputChannels exptected_output_channels_; 68 NumOutputChannels exptected_output_channels_;
69 69
70 RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi); 70 RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
71 }; 71 };
72 72
73 // This test toggles the output frequency every |toggle_period_ms|. The test 73 // This test toggles the output frequency every |toggle_period_ms|. The test
74 // starts with |output_freq_hz_1|. Except for the toggling, it does the same 74 // starts with |output_freq_hz_1|. Except for the toggling, it does the same
(...skipping 13 matching lines...) Expand all
88 88
89 const int output_freq_hz_1_; 89 const int output_freq_hz_1_;
90 const int output_freq_hz_2_; 90 const int output_freq_hz_2_;
91 const int toggle_period_ms_; 91 const int toggle_period_ms_;
92 int64_t last_toggle_time_ms_; 92 int64_t last_toggle_time_ms_;
93 }; 93 };
94 94
95 } // namespace test 95 } // namespace test
96 } // namespace webrtc 96 } // namespace webrtc
97 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_ 97 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698