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

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_network_stats_unittest.cc

Issue 1697823002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/neteq/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up-codecs
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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 <memory>
12
11 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
12 #include "webrtc/base/scoped_ptr.h"
13 #include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h" 14 #include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h"
14 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h" 15 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
15 16
16 namespace webrtc { 17 namespace webrtc {
17 namespace test { 18 namespace test {
18 19
19 using ::testing::_; 20 using ::testing::_;
20 using ::testing::SetArgPointee; 21 using ::testing::SetArgPointee;
21 using ::testing::Return; 22 using ::testing::Return;
22 23
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 SetPacketLossRate(1); 257 SetPacketLossRate(1);
257 expects.stats_ref.expand_rate = 16384; 258 expects.stats_ref.expand_rate = 16384;
258 expects.stats_ref.speech_expand_rate = 5324; 259 expects.stats_ref.speech_expand_rate = 5324;
259 RunTest(10, expects); // Lost 10 * 20ms in a row. 260 RunTest(10, expects); // Lost 10 * 20ms in a row.
260 } 261 }
261 262
262 private: 263 private:
263 MockAudioDecoder* external_decoder_; 264 MockAudioDecoder* external_decoder_;
264 const int samples_per_ms_; 265 const int samples_per_ms_;
265 const size_t frame_size_samples_; 266 const size_t frame_size_samples_;
266 rtc::scoped_ptr<test::RtpGenerator> rtp_generator_; 267 std::unique_ptr<test::RtpGenerator> rtp_generator_;
267 WebRtcRTPHeader rtp_header_; 268 WebRtcRTPHeader rtp_header_;
268 uint32_t last_lost_time_; 269 uint32_t last_lost_time_;
269 uint32_t packet_loss_interval_; 270 uint32_t packet_loss_interval_;
270 uint8_t payload_[kPayloadSizeByte]; 271 uint8_t payload_[kPayloadSizeByte];
271 int16_t output_[kMaxOutputSize]; 272 int16_t output_[kMaxOutputSize];
272 }; 273 };
273 274
274 TEST(NetEqNetworkStatsTest, DecodeFec) { 275 TEST(NetEqNetworkStatsTest, DecodeFec) {
275 MockAudioDecoder decoder(1); 276 MockAudioDecoder decoder(1);
276 NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, &decoder); 277 NetEqNetworkStatsTest test(NetEqDecoder::kDecoderOpus, &decoder);
(...skipping 14 matching lines...) Expand all
291 test.NoiseExpansionTest(); 292 test.NoiseExpansionTest();
292 EXPECT_CALL(decoder, Die()).Times(1); 293 EXPECT_CALL(decoder, Die()).Times(1);
293 } 294 }
294 295
295 } // namespace test 296 } // namespace test
296 } // namespace webrtc 297 } // namespace webrtc
297 298
298 299
299 300
300 301
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.h ('k') | webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698