Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc

Issue 2631703002: Revert of Log audio network adapter decisions in event log. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
479 void RtcEventLogTestHelper::VerifyLogStartEvent( 464 void RtcEventLogTestHelper::VerifyLogStartEvent(
480 const ParsedRtcEventLog& parsed_log, 465 const ParsedRtcEventLog& parsed_log,
481 size_t index) { 466 size_t index) {
482 const rtclog::Event& event = parsed_log.events_[index]; 467 const rtclog::Event& event = parsed_log.events_[index];
483 ASSERT_TRUE(IsValidBasicEvent(event)); 468 ASSERT_TRUE(IsValidBasicEvent(event));
484 EXPECT_EQ(rtclog::Event::LOG_START, event.type()); 469 EXPECT_EQ(rtclog::Event::LOG_START, event.type());
485 } 470 }
486 471
487 void RtcEventLogTestHelper::VerifyLogEndEvent( 472 void RtcEventLogTestHelper::VerifyLogEndEvent(
488 const ParsedRtcEventLog& parsed_log, 473 const ParsedRtcEventLog& parsed_log,
489 size_t index) { 474 size_t index) {
490 const rtclog::Event& event = parsed_log.events_[index]; 475 const rtclog::Event& event = parsed_log.events_[index];
491 ASSERT_TRUE(IsValidBasicEvent(event)); 476 ASSERT_TRUE(IsValidBasicEvent(event));
492 EXPECT_EQ(rtclog::Event::LOG_END, event.type()); 477 EXPECT_EQ(rtclog::Event::LOG_END, event.type());
493 } 478 }
494 479
495 } // namespace webrtc 480 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698