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

Side by Side Diff: webrtc/modules/audio_coding/test/opus_test.h

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) 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 #ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
13 13
14 #include <math.h> 14 #include <math.h>
15 15
16 #include "webrtc/base/scoped_ptr.h" 16 #include <memory>
17
17 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" 18 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
18 #include "webrtc/modules/audio_coding/acm2/acm_resampler.h" 19 #include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
19 #include "webrtc/modules/audio_coding/test/ACMTest.h" 20 #include "webrtc/modules/audio_coding/test/ACMTest.h"
20 #include "webrtc/modules/audio_coding/test/Channel.h" 21 #include "webrtc/modules/audio_coding/test/Channel.h"
21 #include "webrtc/modules/audio_coding/test/PCMFile.h" 22 #include "webrtc/modules/audio_coding/test/PCMFile.h"
22 #include "webrtc/modules/audio_coding/test/TestStereo.h" 23 #include "webrtc/modules/audio_coding/test/TestStereo.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 26
26 class OpusTest : public ACMTest { 27 class OpusTest : public ACMTest {
27 public: 28 public:
28 OpusTest(); 29 OpusTest();
29 ~OpusTest(); 30 ~OpusTest();
30 31
31 void Perform(); 32 void Perform();
32 33
33 private: 34 private:
34 void Run(TestPackStereo* channel, 35 void Run(TestPackStereo* channel,
35 size_t channels, 36 size_t channels,
36 int bitrate, 37 int bitrate,
37 size_t frame_length, 38 size_t frame_length,
38 int percent_loss = 0); 39 int percent_loss = 0);
39 40
40 void OpenOutFile(int test_number); 41 void OpenOutFile(int test_number);
41 42
42 rtc::scoped_ptr<AudioCodingModule> acm_receiver_; 43 std::unique_ptr<AudioCodingModule> acm_receiver_;
43 TestPackStereo* channel_a2b_; 44 TestPackStereo* channel_a2b_;
44 PCMFile in_file_stereo_; 45 PCMFile in_file_stereo_;
45 PCMFile in_file_mono_; 46 PCMFile in_file_mono_;
46 PCMFile out_file_; 47 PCMFile out_file_;
47 PCMFile out_file_standalone_; 48 PCMFile out_file_standalone_;
48 int counter_; 49 int counter_;
49 uint8_t payload_type_; 50 uint8_t payload_type_;
50 uint32_t rtp_timestamp_; 51 uint32_t rtp_timestamp_;
51 acm2::ACMResampler resampler_; 52 acm2::ACMResampler resampler_;
52 WebRtcOpusEncInst* opus_mono_encoder_; 53 WebRtcOpusEncInst* opus_mono_encoder_;
53 WebRtcOpusEncInst* opus_stereo_encoder_; 54 WebRtcOpusEncInst* opus_stereo_encoder_;
54 WebRtcOpusDecInst* opus_mono_decoder_; 55 WebRtcOpusDecInst* opus_mono_decoder_;
55 WebRtcOpusDecInst* opus_stereo_decoder_; 56 WebRtcOpusDecInst* opus_stereo_decoder_;
56 }; 57 };
57 58
58 } // namespace webrtc 59 } // namespace webrtc
59 60
60 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_ 61 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698