OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { | 169 for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { |
170 voe_codec_->GetCodec(i, codec_instance_); | 170 voe_codec_->GetCodec(i, codec_instance_); |
171 if (!_stricmp("opus", codec_instance_.plname)) { | 171 if (!_stricmp("opus", codec_instance_.plname)) { |
172 continue; | 172 continue; |
173 } | 173 } |
174 voe_codec_->SetSendCodec(channel_, codec_instance_); | 174 voe_codec_->SetSendCodec(channel_, codec_instance_); |
175 EXPECT_EQ(-1, voe_codec_->SetOpusDtx(channel_, true)); | 175 EXPECT_EQ(-1, voe_codec_->SetOpusDtx(channel_, true)); |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 #ifdef ENABLE_RTC_EVENT_LOG | |
180 TEST_F(CodecTest, RtcEventLogIntegrationTest) { | |
terelius
2016/03/21 20:47:46
Should there be an integration test for the new AP
ivoc
2016/03/22 13:44:55
I would like to add one, but there is currently no
| |
181 webrtc::RtcEventLog* event_log = voe_codec_->GetEventLog(); | |
182 ASSERT_TRUE(event_log); | |
183 | |
184 // Find the name of the current test, in order to use it as a temporary | |
185 // filename. | |
186 auto test_info = ::testing::UnitTest::GetInstance()->current_test_info(); | |
187 const std::string temp_filename = webrtc::test::OutputPath() + | |
188 test_info->test_case_name() + | |
189 test_info->name(); | |
190 // Create a log file. | |
191 event_log->StartLogging(temp_filename, 1000); | |
192 event_log->StopLogging(); | |
193 | |
194 // Check if the file has been created. | |
195 FILE* event_file = fopen(temp_filename.c_str(), "r"); | |
196 ASSERT_TRUE(event_file); | |
197 fclose(event_file); | |
198 // Remove the temporary file. | |
199 remove(temp_filename.c_str()); | |
200 } | |
201 #endif // ENABLE_RTC_EVENT_LOG | |
202 | |
203 // TODO(xians, phoglund): Re-enable when issue 372 is resolved. | 179 // TODO(xians, phoglund): Re-enable when issue 372 is resolved. |
204 TEST_F(CodecTest, DISABLED_ManualVerifySendCodecsForAllPacketSizes) { | 180 TEST_F(CodecTest, DISABLED_ManualVerifySendCodecsForAllPacketSizes) { |
205 for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { | 181 for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { |
206 voe_codec_->GetCodec(i, codec_instance_); | 182 voe_codec_->GetCodec(i, codec_instance_); |
207 if (IsNotViableSendCodec(codec_instance_.plname)) { | 183 if (IsNotViableSendCodec(codec_instance_.plname)) { |
208 TEST_LOG("Skipping %s.\n", codec_instance_.plname); | 184 TEST_LOG("Skipping %s.\n", codec_instance_.plname); |
209 continue; | 185 continue; |
210 } | 186 } |
211 EXPECT_NE(-1, codec_instance_.pltype) << | 187 EXPECT_NE(-1, codec_instance_.pltype) << |
212 "The codec database should suggest a payload type."; | 188 "The codec database should suggest a payload type."; |
(...skipping 17 matching lines...) Expand all Loading... | |
230 TEST_LOG("%d ", packet_size); | 206 TEST_LOG("%d ", packet_size); |
231 TEST_LOG_FLUSH; | 207 TEST_LOG_FLUSH; |
232 at_least_one_succeeded = true; | 208 at_least_one_succeeded = true; |
233 Sleep(CODEC_TEST_TIME); | 209 Sleep(CODEC_TEST_TIME); |
234 } | 210 } |
235 } | 211 } |
236 TEST_LOG("\n"); | 212 TEST_LOG("\n"); |
237 EXPECT_TRUE(at_least_one_succeeded); | 213 EXPECT_TRUE(at_least_one_succeeded); |
238 } | 214 } |
239 } | 215 } |
OLD | NEW |