OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 int32_t parsed_bitrate; | 454 int32_t parsed_bitrate; |
455 uint8_t parsed_fraction_loss; | 455 uint8_t parsed_fraction_loss; |
456 int32_t parsed_total_packets; | 456 int32_t parsed_total_packets; |
457 parsed_log.GetBwePacketLossEvent( | 457 parsed_log.GetBwePacketLossEvent( |
458 index, &parsed_bitrate, &parsed_fraction_loss, &parsed_total_packets); | 458 index, &parsed_bitrate, &parsed_fraction_loss, &parsed_total_packets); |
459 EXPECT_EQ(bitrate, parsed_bitrate); | 459 EXPECT_EQ(bitrate, parsed_bitrate); |
460 EXPECT_EQ(fraction_loss, parsed_fraction_loss); | 460 EXPECT_EQ(fraction_loss, parsed_fraction_loss); |
461 EXPECT_EQ(total_packets, parsed_total_packets); | 461 EXPECT_EQ(total_packets, parsed_total_packets); |
462 } | 462 } |
463 | 463 |
| 464 void RtcEventLogTestHelper::VerifyAudioNetworkAdaptation( |
| 465 const ParsedRtcEventLog& parsed_log, |
| 466 size_t index, |
| 467 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) { |
| 468 AudioNetworkAdaptor::EncoderRuntimeConfig parsed_config; |
| 469 parsed_log.GetAudioNetworkAdaptation(index, &parsed_config); |
| 470 EXPECT_EQ(config.bitrate_bps, parsed_config.bitrate_bps); |
| 471 EXPECT_EQ(config.enable_dtx, parsed_config.enable_dtx); |
| 472 EXPECT_EQ(config.enable_fec, parsed_config.enable_fec); |
| 473 EXPECT_EQ(config.frame_length_ms, parsed_config.frame_length_ms); |
| 474 EXPECT_EQ(config.num_channels, parsed_config.num_channels); |
| 475 EXPECT_EQ(config.uplink_packet_loss_fraction, |
| 476 parsed_config.uplink_packet_loss_fraction); |
| 477 } |
| 478 |
464 void RtcEventLogTestHelper::VerifyLogStartEvent( | 479 void RtcEventLogTestHelper::VerifyLogStartEvent( |
465 const ParsedRtcEventLog& parsed_log, | 480 const ParsedRtcEventLog& parsed_log, |
466 size_t index) { | 481 size_t index) { |
467 const rtclog::Event& event = parsed_log.events_[index]; | 482 const rtclog::Event& event = parsed_log.events_[index]; |
468 ASSERT_TRUE(IsValidBasicEvent(event)); | 483 ASSERT_TRUE(IsValidBasicEvent(event)); |
469 EXPECT_EQ(rtclog::Event::LOG_START, event.type()); | 484 EXPECT_EQ(rtclog::Event::LOG_START, event.type()); |
470 } | 485 } |
471 | 486 |
472 void RtcEventLogTestHelper::VerifyLogEndEvent( | 487 void RtcEventLogTestHelper::VerifyLogEndEvent( |
473 const ParsedRtcEventLog& parsed_log, | 488 const ParsedRtcEventLog& parsed_log, |
474 size_t index) { | 489 size_t index) { |
475 const rtclog::Event& event = parsed_log.events_[index]; | 490 const rtclog::Event& event = parsed_log.events_[index]; |
476 ASSERT_TRUE(IsValidBasicEvent(event)); | 491 ASSERT_TRUE(IsValidBasicEvent(event)); |
477 EXPECT_EQ(rtclog::Event::LOG_END, event.type()); | 492 EXPECT_EQ(rtclog::Event::LOG_END, event.type()); |
478 } | 493 } |
479 | 494 |
480 } // namespace webrtc | 495 } // namespace webrtc |
OLD | NEW |