| OLD | NEW |
| 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 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 double prob_trans_01_; | 59 double prob_trans_01_; |
| 60 bool lost_last_; | 60 bool lost_last_; |
| 61 rtc::scoped_ptr<UniformLoss> uniform_loss_model_; | 61 rtc::scoped_ptr<UniformLoss> uniform_loss_model_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 class NetEqQualityTest : public ::testing::Test { | 64 class NetEqQualityTest : public ::testing::Test { |
| 65 protected: | 65 protected: |
| 66 NetEqQualityTest(int block_duration_ms, | 66 NetEqQualityTest(int block_duration_ms, |
| 67 int in_sampling_khz, | 67 int in_sampling_khz, |
| 68 int out_sampling_khz, | 68 int out_sampling_khz, |
| 69 enum NetEqDecoder decoder_type); | 69 NetEqDecoder decoder_type); |
| 70 virtual ~NetEqQualityTest(); | 70 virtual ~NetEqQualityTest(); |
| 71 | 71 |
| 72 void SetUp() override; | 72 void SetUp() override; |
| 73 | 73 |
| 74 // EncodeBlock(...) does the following: | 74 // EncodeBlock(...) does the following: |
| 75 // 1. encodes a block of audio, saved in |in_data| and has a length of | 75 // 1. encodes a block of audio, saved in |in_data| and has a length of |
| 76 // |block_size_samples| (samples per channel), | 76 // |block_size_samples| (samples per channel), |
| 77 // 2. save the bit stream to |payload| of |max_bytes| bytes in size, | 77 // 2. save the bit stream to |payload| of |max_bytes| bytes in size, |
| 78 // 3. returns the length of the payload (in bytes), | 78 // 3. returns the length of the payload (in bytes), |
| 79 virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples, | 79 virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 91 // Transmit() uses |rtp_generator_| to generate a packet and passes it to | 91 // Transmit() uses |rtp_generator_| to generate a packet and passes it to |
| 92 // |neteq_|. | 92 // |neteq_|. |
| 93 int Transmit(); | 93 int Transmit(); |
| 94 | 94 |
| 95 // Runs encoding / transmitting / decoding. | 95 // Runs encoding / transmitting / decoding. |
| 96 void Simulate(); | 96 void Simulate(); |
| 97 | 97 |
| 98 // Write to log file. Usage Log() << ... | 98 // Write to log file. Usage Log() << ... |
| 99 std::ofstream& Log(); | 99 std::ofstream& Log(); |
| 100 | 100 |
| 101 enum NetEqDecoder decoder_type_; | 101 NetEqDecoder decoder_type_; |
| 102 const int channels_; | 102 const int channels_; |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 int decoded_time_ms_; | 105 int decoded_time_ms_; |
| 106 int decodable_time_ms_; | 106 int decodable_time_ms_; |
| 107 double drift_factor_; | 107 double drift_factor_; |
| 108 int packet_loss_rate_; | 108 int packet_loss_rate_; |
| 109 const int block_duration_ms_; | 109 const int block_duration_ms_; |
| 110 const int in_sampling_khz_; | 110 const int in_sampling_khz_; |
| 111 const int out_sampling_khz_; | 111 const int out_sampling_khz_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 132 rtc::scoped_ptr<int16_t[]> out_data_; | 132 rtc::scoped_ptr<int16_t[]> out_data_; |
| 133 WebRtcRTPHeader rtp_header_; | 133 WebRtcRTPHeader rtp_header_; |
| 134 | 134 |
| 135 size_t total_payload_size_bytes_; | 135 size_t total_payload_size_bytes_; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace test | 138 } // namespace test |
| 139 } // namespace webrtc | 139 } // namespace webrtc |
| 140 | 140 |
| 141 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ | 141 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ |
| OLD | NEW |