| 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; |  | 
| 79   } | 77   } | 
| 80   RTC_NOTREACHED(); | 78   RTC_NOTREACHED(); | 
| 81   return ParsedRtcEventLog::EventType::UNKNOWN_EVENT; | 79   return ParsedRtcEventLog::EventType::UNKNOWN_EVENT; | 
| 82 } | 80 } | 
| 83 | 81 | 
| 84 BandwidthUsage GetRuntimeDetectorState( | 82 BandwidthUsage GetRuntimeDetectorState( | 
| 85     rtclog::DelayBasedBweUpdate::DetectorState detector_state) { | 83     rtclog::DelayBasedBweUpdate::DetectorState detector_state) { | 
| 86   switch (detector_state) { | 84   switch (detector_state) { | 
| 87     case rtclog::DelayBasedBweUpdate::BWE_NORMAL: | 85     case rtclog::DelayBasedBweUpdate::BWE_NORMAL: | 
| 88       return BandwidthUsage::kBwNormal; | 86       return BandwidthUsage::kBwNormal; | 
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 649 // registered types first. | 647 // registered types first. | 
| 650 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType( | 648 ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType( | 
| 651     uint32_t ssrc, | 649     uint32_t ssrc, | 
| 652     PacketDirection direction) const { | 650     PacketDirection direction) const { | 
| 653   for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) { | 651   for (auto rit = streams_.rbegin(); rit != streams_.rend(); ++rit) { | 
| 654     if (rit->ssrc == ssrc && rit->direction == direction) | 652     if (rit->ssrc == ssrc && rit->direction == direction) | 
| 655       return rit->media_type; | 653       return rit->media_type; | 
| 656   } | 654   } | 
| 657   return MediaType::ANY; | 655   return MediaType::ANY; | 
| 658 } | 656 } | 
| 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 } |  | 
| 676 }  // namespace webrtc | 657 }  // namespace webrtc | 
| OLD | NEW | 
|---|