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