| OLD | NEW |
| 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 <assert.h> | 11 #include <assert.h> |
| 12 #include <math.h> | 12 #include <math.h> |
| 13 | 13 |
| 14 #include <iostream> | 14 #include <iostream> |
| 15 #include <memory> |
| 15 | 16 |
| 16 #include "gflags/gflags.h" | 17 #include "gflags/gflags.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "webrtc/base/scoped_ptr.h" | |
| 19 #include "webrtc/common.h" | 19 #include "webrtc/common.h" |
| 20 #include "webrtc/common_types.h" | 20 #include "webrtc/common_types.h" |
| 21 #include "webrtc/engine_configurations.h" | 21 #include "webrtc/engine_configurations.h" |
| 22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 23 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" | 23 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
| 24 #include "webrtc/modules/audio_coding/acm2/acm_common_defs.h" | 24 #include "webrtc/modules/audio_coding/acm2/acm_common_defs.h" |
| 25 #include "webrtc/modules/audio_coding/test/Channel.h" | 25 #include "webrtc/modules/audio_coding/test/Channel.h" |
| 26 #include "webrtc/modules/audio_coding/test/PCMFile.h" | 26 #include "webrtc/modules/audio_coding/test/PCMFile.h" |
| 27 #include "webrtc/modules/audio_coding/test/utility.h" | 27 #include "webrtc/modules/audio_coding/test/utility.h" |
| 28 #include "webrtc/system_wrappers/include/event_wrapper.h" | 28 #include "webrtc/system_wrappers/include/event_wrapper.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 if (num_frames > 10) | 217 if (num_frames > 10) |
| 218 average_delay = 0.95 * average_delay + 0.05 * inst_delay_sec; | 218 average_delay = 0.95 * average_delay + 0.05 * inst_delay_sec; |
| 219 | 219 |
| 220 ++num_frames; | 220 ++num_frames; |
| 221 ++in_file_frames; | 221 ++in_file_frames; |
| 222 } | 222 } |
| 223 out_file_b_.Close(); | 223 out_file_b_.Close(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 rtc::scoped_ptr<AudioCodingModule> acm_a_; | 226 std::unique_ptr<AudioCodingModule> acm_a_; |
| 227 rtc::scoped_ptr<AudioCodingModule> acm_b_; | 227 std::unique_ptr<AudioCodingModule> acm_b_; |
| 228 | 228 |
| 229 Channel* channel_a2b_; | 229 Channel* channel_a2b_; |
| 230 | 230 |
| 231 PCMFile in_file_a_; | 231 PCMFile in_file_a_; |
| 232 PCMFile out_file_b_; | 232 PCMFile out_file_b_; |
| 233 int test_cntr_; | 233 int test_cntr_; |
| 234 int encoding_sample_rate_hz_; | 234 int encoding_sample_rate_hz_; |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace webrtc | 237 } // namespace webrtc |
| (...skipping 18 matching lines...) Expand all Loading... |
| 256 test_setting.codec.num_channels = FLAGS_num_channels; | 256 test_setting.codec.num_channels = FLAGS_num_channels; |
| 257 test_setting.acm.dtx = FLAGS_dtx; | 257 test_setting.acm.dtx = FLAGS_dtx; |
| 258 test_setting.acm.fec = FLAGS_fec; | 258 test_setting.acm.fec = FLAGS_fec; |
| 259 test_setting.packet_loss = FLAGS_packet_loss; | 259 test_setting.packet_loss = FLAGS_packet_loss; |
| 260 | 260 |
| 261 webrtc::DelayTest delay_test; | 261 webrtc::DelayTest delay_test; |
| 262 delay_test.Initialize(); | 262 delay_test.Initialize(); |
| 263 delay_test.Perform(&test_setting, 1, 240, "delay_test"); | 263 delay_test.Perform(&test_setting, 1, 240, "delay_test"); |
| 264 return 0; | 264 return 0; |
| 265 } | 265 } |
| OLD | NEW |