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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 case rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT: | 67 case rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT: |
68 return ParsedRtcEventLog::EventType::AUDIO_RECEIVER_CONFIG_EVENT; | 68 return ParsedRtcEventLog::EventType::AUDIO_RECEIVER_CONFIG_EVENT; |
69 case rtclog::Event::AUDIO_SENDER_CONFIG_EVENT: | 69 case rtclog::Event::AUDIO_SENDER_CONFIG_EVENT: |
70 return ParsedRtcEventLog::EventType::AUDIO_SENDER_CONFIG_EVENT; | 70 return ParsedRtcEventLog::EventType::AUDIO_SENDER_CONFIG_EVENT; |
71 case rtclog::Event::AUDIO_NETWORK_ADAPTATION_EVENT: | 71 case rtclog::Event::AUDIO_NETWORK_ADAPTATION_EVENT: |
72 return ParsedRtcEventLog::EventType::AUDIO_NETWORK_ADAPTATION_EVENT; | 72 return ParsedRtcEventLog::EventType::AUDIO_NETWORK_ADAPTATION_EVENT; |
73 case rtclog::Event::BWE_PROBE_CLUSTER_CREATED_EVENT: | 73 case rtclog::Event::BWE_PROBE_CLUSTER_CREATED_EVENT: |
74 return ParsedRtcEventLog::EventType::BWE_PROBE_CLUSTER_CREATED_EVENT; | 74 return ParsedRtcEventLog::EventType::BWE_PROBE_CLUSTER_CREATED_EVENT; |
75 case rtclog::Event::BWE_PROBE_RESULT_EVENT: | 75 case rtclog::Event::BWE_PROBE_RESULT_EVENT: |
76 return ParsedRtcEventLog::EventType::BWE_PROBE_RESULT_EVENT; | 76 return ParsedRtcEventLog::EventType::BWE_PROBE_RESULT_EVENT; |
| 77 case rtclog::Event::HOST_LOOKUP_EVENT: |
| 78 return ParsedRtcEventLog::EventType::HOST_LOOKUP_EVENT; |
77 } | 79 } |
78 RTC_NOTREACHED(); | 80 RTC_NOTREACHED(); |
79 return ParsedRtcEventLog::EventType::UNKNOWN_EVENT; | 81 return ParsedRtcEventLog::EventType::UNKNOWN_EVENT; |
80 } | 82 } |
81 | 83 |
82 BandwidthUsage GetRuntimeDetectorState( | 84 BandwidthUsage GetRuntimeDetectorState( |
83 rtclog::DelayBasedBweUpdate::DetectorState detector_state) { | 85 rtclog::DelayBasedBweUpdate::DetectorState detector_state) { |
84 switch (detector_state) { | 86 switch (detector_state) { |
85 case rtclog::DelayBasedBweUpdate::BWE_NORMAL: | 87 case rtclog::DelayBasedBweUpdate::BWE_NORMAL: |
86 return BandwidthUsage::kBwNormal; | 88 return BandwidthUsage::kBwNormal; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 // registered types first. | 649 // registered types first. |
648 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType( | 650 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType( |
649 uint32_t ssrc, | 651 uint32_t ssrc, |
650 PacketDirection direction) const { | 652 PacketDirection direction) const { |
651 for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) { | 653 for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) { |
652 if (rit->ssrc == ssrc && rit->direction == direction) | 654 if (rit->ssrc == ssrc && rit->direction == direction) |
653 return rit->media_type; | 655 return rit->media_type; |
654 } | 656 } |
655 return MediaType::ANY; | 657 return MediaType::ANY; |
656 } | 658 } |
| 659 |
| 660 void ParsedRtcEventLog::GetHostLookup( |
| 661 size_t index, |
| 662 int* error, int64_t* host_lookup_time_ms) const { |
| 663 RTC_CHECK_LT(index, GetNumberOfEvents()); |
| 664 const rtclog::Event& event = events_[index]; |
| 665 RTC_CHECK(event.has_type()); |
| 666 RTC_CHECK_EQ(event.type(), rtclog::Event::HOST_LOOKUP_EVENT); |
| 667 RTC_CHECK(event.has_host_lookup_result()); |
| 668 const rtclog::HostLookupResult& lookup_event = event.host_lookup_result(); |
| 669 RTC_CHECK(lookup_event.has_error()); |
| 670 if (error) |
| 671 *error = lookup_event.error(); |
| 672 RTC_CHECK(lookup_event.has_host_lookup_time_ms()); |
| 673 if (host_lookup_time_ms) |
| 674 *host_lookup_time_ms = lookup_event.host_lookup_time_ms(); |
| 675 } |
657 } // namespace webrtc | 676 } // namespace webrtc |
OLD | NEW |