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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 res.failure_reason = | 637 res.failure_reason = |
636 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); | 638 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); |
637 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { | 639 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { |
638 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); | 640 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); |
639 } else { | 641 } else { |
640 RTC_NOTREACHED(); | 642 RTC_NOTREACHED(); |
641 } | 643 } |
642 | 644 |
643 return res; | 645 return res; |
644 } | 646 } |
645 | 647 |
terelius
2017/08/18 11:41:33
You might want to add a method to parse the data e
| |
646 // Returns the MediaType for registered SSRCs. Search from the end to use last | 648 // Returns the MediaType for registered SSRCs. Search from the end to use last |
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 } |
657 } // namespace webrtc | 659 } // namespace webrtc |
OLD | NEW |