Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_parser.cc

Issue 2791963003: Reland of Loosening the coupling between WebRTC and //third_party/protobuf (Closed)
Patch Set: Fixing webrtc/modules/audio_coding:builtin_audio_encoder_factory Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/audio_coding/audio_network_adaptor/include/audio_networ k_adaptor.h" 26 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ k_adaptor.h"
26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 27 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
27 28
28 namespace webrtc { 29 namespace webrtc {
29 30
30 namespace { 31 namespace {
31 MediaType GetRuntimeMediaType(rtclog::MediaType media_type) { 32 MediaType GetRuntimeMediaType(rtclog::MediaType media_type) {
32 switch (media_type) { 33 switch (media_type) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 varint |= static_cast<uint64_t>(byte & 0x7F) << (7 * bytes_read); 122 varint |= static_cast<uint64_t>(byte & 0x7F) << (7 * bytes_read);
122 if ((byte & 0x80) == 0) { 123 if ((byte & 0x80) == 0) {
123 return std::make_pair(varint, true); 124 return std::make_pair(varint, true);
124 } 125 }
125 } 126 }
126 return std::make_pair(varint, false); 127 return std::make_pair(varint, false);
127 } 128 }
128 129
129 void GetHeaderExtensions( 130 void GetHeaderExtensions(
130 std::vector<RtpExtension>* header_extensions, 131 std::vector<RtpExtension>* header_extensions,
131 const google::protobuf::RepeatedPtrField<rtclog::RtpHeaderExtension>& 132 const RepeatedPtrField<rtclog::RtpHeaderExtension>&
132 proto_header_extensions) { 133 proto_header_extensions) {
133 header_extensions->clear(); 134 header_extensions->clear();
134 for (auto& p : proto_header_extensions) { 135 for (auto& p : proto_header_extensions) {
135 RTC_CHECK(p.has_name()); 136 RTC_CHECK(p.has_name());
136 RTC_CHECK(p.has_id()); 137 RTC_CHECK(p.has_id());
137 const std::string& name = p.name(); 138 const std::string& name = p.name();
138 int id = p.id(); 139 int id = p.id();
139 header_extensions->push_back(RtpExtension(name, id)); 140 header_extensions->push_back(RtpExtension(name, id));
140 } 141 }
141 } 142 }
142 143
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio); 584 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio);
584 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { 585 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) {
585 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout); 586 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout);
586 } else { 587 } else {
587 RTC_NOTREACHED(); 588 RTC_NOTREACHED();
588 } 589 }
589 590
590 return res; 591 return res;
591 } 592 }
592 } // namespace webrtc 593 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h ('k') | webrtc/modules/audio_coding/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698