OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 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 14 matching lines...) Expand all Loading... |
25 #include "webrtc/pc/webrtcsession.h" | 25 #include "webrtc/pc/webrtcsession.h" |
26 #include "webrtc/rtc_base/checks.h" | 26 #include "webrtc/rtc_base/checks.h" |
27 #include "webrtc/rtc_base/stringutils.h" | 27 #include "webrtc/rtc_base/stringutils.h" |
28 #include "webrtc/rtc_base/timeutils.h" | 28 #include "webrtc/rtc_base/timeutils.h" |
29 #include "webrtc/rtc_base/trace_event.h" | 29 #include "webrtc/rtc_base/trace_event.h" |
30 | 30 |
31 namespace webrtc { | 31 namespace webrtc { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 const int kStatTypeMemberNameAndIdMaxLen = 512; | 35 const int kStatTypeMemberNameAndIdMaxLen = 1024; |
36 | 36 |
37 std::string GetStatTypeMemberNameAndId(const RTCStats& stats, | 37 std::string GetStatTypeMemberNameAndId(const RTCStats& stats, |
38 const RTCStatsMemberInterface* member) { | 38 const RTCStatsMemberInterface* member) { |
39 RTC_DCHECK(strlen(stats.type()) + strlen(member->name()) | 39 RTC_DCHECK(strlen(stats.type()) + strlen(member->name()) |
40 + stats.id().size() + 3 < kStatTypeMemberNameAndIdMaxLen); | 40 + stats.id().size() + 3 < kStatTypeMemberNameAndIdMaxLen); |
41 char buffer[kStatTypeMemberNameAndIdMaxLen]; | 41 char buffer[kStatTypeMemberNameAndIdMaxLen]; |
42 rtc::sprintfn(&buffer[0], sizeof(buffer), "%s.%s.%s", stats.type(), | 42 rtc::sprintfn(&buffer[0], sizeof(buffer), "%s.%s.%s", stats.type(), |
43 member->name(), stats.id().c_str()); | 43 member->name(), stats.id().c_str()); |
44 return buffer; | 44 return buffer; |
45 } | 45 } |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 const std::string& type) { | 1275 const std::string& type) { |
1276 return CandidateTypeToRTCIceCandidateType(type); | 1276 return CandidateTypeToRTCIceCandidateType(type); |
1277 } | 1277 } |
1278 | 1278 |
1279 const char* DataStateToRTCDataChannelStateForTesting( | 1279 const char* DataStateToRTCDataChannelStateForTesting( |
1280 DataChannelInterface::DataState state) { | 1280 DataChannelInterface::DataState state) { |
1281 return DataStateToRTCDataChannelState(state); | 1281 return DataStateToRTCDataChannelState(state); |
1282 } | 1282 } |
1283 | 1283 |
1284 } // namespace webrtc | 1284 } // namespace webrtc |
OLD | NEW |