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

Side by Side Diff: webrtc/api/stats/rtcstats_objects.h

Issue 2595003003: RTCIceCandidateStats.isRemote added and collected. (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // TODO(hbos): |RTCStatsCollector| only collects candidates that are part of 163 // TODO(hbos): |RTCStatsCollector| only collects candidates that are part of
164 // ice candidate pairs, but there could be candidates not paired with anything. 164 // ice candidate pairs, but there could be candidates not paired with anything.
165 // crbug.com/632723 165 // crbug.com/632723
166 class RTCIceCandidateStats : public RTCStats { 166 class RTCIceCandidateStats : public RTCStats {
167 public: 167 public:
168 WEBRTC_RTCSTATS_DECL(); 168 WEBRTC_RTCSTATS_DECL();
169 169
170 RTCIceCandidateStats(const RTCIceCandidateStats& other); 170 RTCIceCandidateStats(const RTCIceCandidateStats& other);
171 ~RTCIceCandidateStats() override; 171 ~RTCIceCandidateStats() override;
172 172
173 RTCStatsMember<bool> is_remote;
173 RTCStatsMember<std::string> ip; 174 RTCStatsMember<std::string> ip;
174 RTCStatsMember<int32_t> port; 175 RTCStatsMember<int32_t> port;
175 RTCStatsMember<std::string> protocol; 176 RTCStatsMember<std::string> protocol;
176 // TODO(hbos): Support enum types? "RTCStatsMember<RTCIceCandidateType>"? 177 // TODO(hbos): Support enum types? "RTCStatsMember<RTCIceCandidateType>"?
177 RTCStatsMember<std::string> candidate_type; 178 RTCStatsMember<std::string> candidate_type;
178 RTCStatsMember<int32_t> priority; 179 RTCStatsMember<int32_t> priority;
179 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723 180 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723
180 RTCStatsMember<std::string> url; 181 RTCStatsMember<std::string> url;
181 182
182 protected: 183 protected:
183 RTCIceCandidateStats(const std::string& id, int64_t timestamp_us); 184 RTCIceCandidateStats(
184 RTCIceCandidateStats(std::string&& id, int64_t timestamp_us); 185 const std::string& id, int64_t timestamp_us, bool is_remote);
186 RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote);
185 }; 187 };
186 188
187 // In the spec both local and remote varieties are of type RTCIceCandidateStats. 189 // In the spec both local and remote varieties are of type RTCIceCandidateStats.
188 // But here we define them as subclasses of |RTCIceCandidateStats| because the 190 // But here we define them as subclasses of |RTCIceCandidateStats| because the
189 // |kType| need to be different ("RTCStatsType type") in the local/remote case. 191 // |kType| need to be different ("RTCStatsType type") in the local/remote case.
190 // https://w3c.github.io/webrtc-stats/#rtcstatstype-str* 192 // https://w3c.github.io/webrtc-stats/#rtcstatstype-str*
191 class RTCLocalIceCandidateStats final : public RTCIceCandidateStats { 193 class RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
192 public: 194 public:
193 static const char kType[]; 195 static const char kType[];
194 RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us); 196 RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 RTCStatsMember<std::string> rtcp_transport_stats_id; 390 RTCStatsMember<std::string> rtcp_transport_stats_id;
389 RTCStatsMember<bool> active_connection; 391 RTCStatsMember<bool> active_connection;
390 RTCStatsMember<std::string> selected_candidate_pair_id; 392 RTCStatsMember<std::string> selected_candidate_pair_id;
391 RTCStatsMember<std::string> local_certificate_id; 393 RTCStatsMember<std::string> local_certificate_id;
392 RTCStatsMember<std::string> remote_certificate_id; 394 RTCStatsMember<std::string> remote_certificate_id;
393 }; 395 };
394 396
395 } // namespace webrtc 397 } // namespace webrtc
396 398
397 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ 399 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
OLDNEW
« no previous file with comments | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698