| 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 |
| 11 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" | 11 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 #include <fstream> | 17 #include <fstream> |
| 18 #include <istream> | 18 #include <istream> |
| 19 #include <utility> | 19 #include <utility> |
| 20 | 20 |
| 21 #include "webrtc/base/checks.h" | 21 #include "webrtc/base/checks.h" |
| 22 #include "webrtc/base/logging.h" | 22 #include "webrtc/base/logging.h" |
| 23 #include "webrtc/base/protobuf_utils.h" |
| 23 #include "webrtc/call/call.h" | 24 #include "webrtc/call/call.h" |
| 24 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 25 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 26 | 27 |
| 27 namespace webrtc { | 28 namespace webrtc { |
| 28 | 29 |
| 29 namespace { | 30 namespace { |
| 30 MediaType GetRuntimeMediaType(rtclog::MediaType media_type) { | 31 MediaType GetRuntimeMediaType(rtclog::MediaType media_type) { |
| 31 switch (media_type) { | 32 switch (media_type) { |
| 32 case rtclog::MediaType::ANY: | 33 case rtclog::MediaType::ANY: |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 varint |= static_cast<uint64_t>(byte & 0x7F) << (7 * bytes_read); | 121 varint |= static_cast<uint64_t>(byte & 0x7F) << (7 * bytes_read); |
| 121 if ((byte & 0x80) == 0) { | 122 if ((byte & 0x80) == 0) { |
| 122 return std::make_pair(varint, true); | 123 return std::make_pair(varint, true); |
| 123 } | 124 } |
| 124 } | 125 } |
| 125 return std::make_pair(varint, false); | 126 return std::make_pair(varint, false); |
| 126 } | 127 } |
| 127 | 128 |
| 128 void GetHeaderExtensions( | 129 void GetHeaderExtensions( |
| 129 std::vector<RtpExtension>* header_extensions, | 130 std::vector<RtpExtension>* header_extensions, |
| 130 const google::protobuf::RepeatedPtrField<rtclog::RtpHeaderExtension>& | 131 const RepeatedPtrField<rtclog::RtpHeaderExtension>& |
| 131 proto_header_extensions) { | 132 proto_header_extensions) { |
| 132 header_extensions->clear(); | 133 header_extensions->clear(); |
| 133 for (auto& p : proto_header_extensions) { | 134 for (auto& p : proto_header_extensions) { |
| 134 RTC_CHECK(p.has_name()); | 135 RTC_CHECK(p.has_name()); |
| 135 RTC_CHECK(p.has_id()); | 136 RTC_CHECK(p.has_id()); |
| 136 const std::string& name = p.name(); | 137 const std::string& name = p.name(); |
| 137 int id = p.id(); | 138 int id = p.id(); |
| 138 header_extensions->push_back(RtpExtension(name, id)); | 139 header_extensions->push_back(RtpExtension(name, id)); |
| 139 } | 140 } |
| 140 } | 141 } |
| 141 | 142 |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); | 583 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); |
| 583 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { | 584 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { |
| 584 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); | 585 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); |
| 585 } else { | 586 } else { |
| 586 RTC_NOTREACHED(); | 587 RTC_NOTREACHED(); |
| 587 } | 588 } |
| 588 | 589 |
| 589 return res; | 590 return res; |
| 590 } | 591 } |
| 591 } // namespace webrtc | 592 } // namespace webrtc |
| OLD | NEW |