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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 uint8_t* payload, size_t max_bytes); | 47 uint8_t* payload, size_t max_bytes); |
48 private: | 48 private: |
49 ISACFIX_MainStruct* isac_encoder_; | 49 ISACFIX_MainStruct* isac_encoder_; |
50 int bit_rate_kbps_; | 50 int bit_rate_kbps_; |
51 }; | 51 }; |
52 | 52 |
53 NetEqIsacQualityTest::NetEqIsacQualityTest() | 53 NetEqIsacQualityTest::NetEqIsacQualityTest() |
54 : NetEqQualityTest(kIsacBlockDurationMs, | 54 : NetEqQualityTest(kIsacBlockDurationMs, |
55 kIsacInputSamplingKhz, | 55 kIsacInputSamplingKhz, |
56 kIsacOutputSamplingKhz, | 56 kIsacOutputSamplingKhz, |
57 kDecoderISAC), | 57 NetEqDecoder::kDecoderISAC), |
58 isac_encoder_(NULL), | 58 isac_encoder_(NULL), |
59 bit_rate_kbps_(FLAGS_bit_rate_kbps) { | 59 bit_rate_kbps_(FLAGS_bit_rate_kbps) {} |
60 } | |
61 | 60 |
62 void NetEqIsacQualityTest::SetUp() { | 61 void NetEqIsacQualityTest::SetUp() { |
63 ASSERT_EQ(1, channels_) << "iSAC supports only mono audio."; | 62 ASSERT_EQ(1, channels_) << "iSAC supports only mono audio."; |
64 // Create encoder memory. | 63 // Create encoder memory. |
65 WebRtcIsacfix_Create(&isac_encoder_); | 64 WebRtcIsacfix_Create(&isac_encoder_); |
66 ASSERT_TRUE(isac_encoder_ != NULL); | 65 ASSERT_TRUE(isac_encoder_ != NULL); |
67 EXPECT_EQ(0, WebRtcIsacfix_EncoderInit(isac_encoder_, 1)); | 66 EXPECT_EQ(0, WebRtcIsacfix_EncoderInit(isac_encoder_, 1)); |
68 // Set bitrate and block length. | 67 // Set bitrate and block length. |
69 EXPECT_EQ(0, WebRtcIsacfix_Control(isac_encoder_, bit_rate_kbps_ * 1000, | 68 EXPECT_EQ(0, WebRtcIsacfix_Control(isac_encoder_, bit_rate_kbps_ * 1000, |
70 kIsacBlockDurationMs)); | 69 kIsacBlockDurationMs)); |
(...skipping 24 matching lines...) Expand all Loading... |
95 EXPECT_GT(value, 0); | 94 EXPECT_GT(value, 0); |
96 return value; | 95 return value; |
97 } | 96 } |
98 | 97 |
99 TEST_F(NetEqIsacQualityTest, Test) { | 98 TEST_F(NetEqIsacQualityTest, Test) { |
100 Simulate(); | 99 Simulate(); |
101 } | 100 } |
102 | 101 |
103 } // namespace test | 102 } // namespace test |
104 } // namespace webrtc | 103 } // namespace webrtc |
OLD | NEW |