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

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

Issue 2559953002: Log audio network adapter decisions in event log. (Closed)
Patch Set: Response to comments Created 3 years, 12 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 case rtclog::Event::BWE_PACKET_DELAY_EVENT: 72 case rtclog::Event::BWE_PACKET_DELAY_EVENT:
73 return ParsedRtcEventLog::EventType::BWE_PACKET_DELAY_EVENT; 73 return ParsedRtcEventLog::EventType::BWE_PACKET_DELAY_EVENT;
74 case rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT: 74 case rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT:
75 return ParsedRtcEventLog::EventType::VIDEO_RECEIVER_CONFIG_EVENT; 75 return ParsedRtcEventLog::EventType::VIDEO_RECEIVER_CONFIG_EVENT;
76 case rtclog::Event::VIDEO_SENDER_CONFIG_EVENT: 76 case rtclog::Event::VIDEO_SENDER_CONFIG_EVENT:
77 return ParsedRtcEventLog::EventType::VIDEO_SENDER_CONFIG_EVENT; 77 return ParsedRtcEventLog::EventType::VIDEO_SENDER_CONFIG_EVENT;
78 case rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT: 78 case rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT:
79 return ParsedRtcEventLog::EventType::AUDIO_RECEIVER_CONFIG_EVENT; 79 return ParsedRtcEventLog::EventType::AUDIO_RECEIVER_CONFIG_EVENT;
80 case rtclog::Event::AUDIO_SENDER_CONFIG_EVENT: 80 case rtclog::Event::AUDIO_SENDER_CONFIG_EVENT:
81 return ParsedRtcEventLog::EventType::AUDIO_SENDER_CONFIG_EVENT; 81 return ParsedRtcEventLog::EventType::AUDIO_SENDER_CONFIG_EVENT;
82 case rtclog::Event::AUDIO_ENCODER_CONFIG_EVENT:
83 return ParsedRtcEventLog::EventType::AUDIO_ENCODER_CONFIG_EVENT;
82 } 84 }
83 RTC_NOTREACHED(); 85 RTC_NOTREACHED();
84 return ParsedRtcEventLog::EventType::UNKNOWN_EVENT; 86 return ParsedRtcEventLog::EventType::UNKNOWN_EVENT;
85 } 87 }
86 88
87 std::pair<uint64_t, bool> ParseVarInt(std::istream& stream) { 89 std::pair<uint64_t, bool> ParseVarInt(std::istream& stream) {
88 uint64_t varint = 0; 90 uint64_t varint = 0;
89 for (size_t bytes_read = 0; bytes_read < 10; ++bytes_read) { 91 for (size_t bytes_read = 0; bytes_read < 10; ++bytes_read) {
90 // The most significant bit of each byte is 0 if it is the last byte in 92 // The most significant bit of each byte is 0 if it is the last byte in
91 // the varint and 1 otherwise. Thus, we take the 7 least significant bits 93 // the varint and 1 otherwise. Thus, we take the 7 least significant bits
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 if (fraction_loss != nullptr) { 450 if (fraction_loss != nullptr) {
449 *fraction_loss = loss_event.fraction_loss(); 451 *fraction_loss = loss_event.fraction_loss();
450 } 452 }
451 RTC_CHECK(loss_event.has_total_packets()); 453 RTC_CHECK(loss_event.has_total_packets());
452 if (total_packets != nullptr) { 454 if (total_packets != nullptr) {
453 *total_packets = loss_event.total_packets(); 455 *total_packets = loss_event.total_packets();
454 } 456 }
455 } 457 }
456 458
457 } // namespace webrtc 459 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698