blob: d4fea4951929f8e945c71f464da380469544cbcd [file] [log] [blame]
hbosd565b732016-08-30 14:04:35 -07001/*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
hbos74e1a4f2016-09-15 23:33:01 -070011#include "webrtc/api/stats/rtcstats_objects.h"
hbosd565b732016-08-30 14:04:35 -070012
13namespace webrtc {
14
hboscc555c52016-10-18 12:48:31 -070015const char* RTCDataChannelState::kConnecting = "connecting";
16const char* RTCDataChannelState::kOpen = "open";
17const char* RTCDataChannelState::kClosing = "closing";
18const char* RTCDataChannelState::kClosed = "closed";
19
hbosc47a0c32016-10-11 14:54:49 -070020const char* RTCStatsIceCandidatePairState::kFrozen = "frozen";
21const char* RTCStatsIceCandidatePairState::kWaiting = "waiting";
22const char* RTCStatsIceCandidatePairState::kInProgress = "inprogress";
23const char* RTCStatsIceCandidatePairState::kFailed = "failed";
24const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
25const char* RTCStatsIceCandidatePairState::kCancelled = "cancelled";
26
27// Strings defined in https://tools.ietf.org/html/rfc5245.
hbosab9f6e42016-10-07 02:18:47 -070028const char* RTCIceCandidateType::kHost = "host";
29const char* RTCIceCandidateType::kSrflx = "srflx";
30const char* RTCIceCandidateType::kPrflx = "prflx";
31const char* RTCIceCandidateType::kRelay = "relay";
32
hbos2fa7c672016-10-24 04:00:05 -070033WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
34 &fingerprint,
35 &fingerprint_algorithm,
36 &base64_certificate,
37 &issuer_certificate_id);
38
39RTCCertificateStats::RTCCertificateStats(
40 const std::string& id, int64_t timestamp_us)
41 : RTCCertificateStats(std::string(id), timestamp_us) {
42}
43
44RTCCertificateStats::RTCCertificateStats(
45 std::string&& id, int64_t timestamp_us)
46 : RTCStats(std::move(id), timestamp_us),
47 fingerprint("fingerprint"),
48 fingerprint_algorithm("fingerprintAlgorithm"),
49 base64_certificate("base64Certificate"),
50 issuer_certificate_id("issuerCertificateId") {
51}
52
53RTCCertificateStats::RTCCertificateStats(
54 const RTCCertificateStats& other)
55 : RTCStats(other.id(), other.timestamp_us()),
56 fingerprint(other.fingerprint),
57 fingerprint_algorithm(other.fingerprint_algorithm),
58 base64_certificate(other.base64_certificate),
59 issuer_certificate_id(other.issuer_certificate_id) {
60}
61
62RTCCertificateStats::~RTCCertificateStats() {
63}
64
hbos0adb8282016-11-23 02:32:06 -080065WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec",
66 &payload_type,
67 &codec,
68 &clock_rate,
69 &channels,
70 &parameters,
71 &implementation);
72
73RTCCodecStats::RTCCodecStats(
74 const std::string& id, int64_t timestamp_us)
75 : RTCCodecStats(std::string(id), timestamp_us) {
76}
77
78RTCCodecStats::RTCCodecStats(
79 std::string&& id, int64_t timestamp_us)
80 : RTCStats(std::move(id), timestamp_us),
81 payload_type("payloadType"),
82 codec("codec"),
83 clock_rate("clockRate"),
84 channels("channels"),
85 parameters("parameters"),
86 implementation("implementation") {
87}
88
89RTCCodecStats::RTCCodecStats(
90 const RTCCodecStats& other)
91 : RTCStats(other.id(), other.timestamp_us()),
92 payload_type(other.payload_type),
93 codec(other.codec),
94 clock_rate(other.clock_rate),
95 channels(other.channels),
96 parameters(other.parameters),
97 implementation(other.implementation) {
98}
99
100RTCCodecStats::~RTCCodecStats() {
101}
102
hbos2fa7c672016-10-24 04:00:05 -0700103WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
104 &label,
105 &protocol,
106 &datachannelid,
107 &state,
108 &messages_sent,
109 &bytes_sent,
110 &messages_received,
111 &bytes_received);
112
113RTCDataChannelStats::RTCDataChannelStats(
114 const std::string& id, int64_t timestamp_us)
115 : RTCDataChannelStats(std::string(id), timestamp_us) {
116}
117
118RTCDataChannelStats::RTCDataChannelStats(
119 std::string&& id, int64_t timestamp_us)
120 : RTCStats(std::move(id), timestamp_us),
121 label("label"),
122 protocol("protocol"),
123 datachannelid("datachannelid"),
124 state("state"),
125 messages_sent("messagesSent"),
126 bytes_sent("bytesSent"),
127 messages_received("messagesReceived"),
128 bytes_received("bytesReceived") {
129}
130
131RTCDataChannelStats::RTCDataChannelStats(
132 const RTCDataChannelStats& other)
133 : RTCStats(other.id(), other.timestamp_us()),
134 label(other.label),
135 protocol(other.protocol),
136 datachannelid(other.datachannelid),
137 state(other.state),
138 messages_sent(other.messages_sent),
139 bytes_sent(other.bytes_sent),
140 messages_received(other.messages_received),
141 bytes_received(other.bytes_received) {
142}
143
144RTCDataChannelStats::~RTCDataChannelStats() {
145}
146
hbosc47a0c32016-10-11 14:54:49 -0700147WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
148 &transport_id,
149 &local_candidate_id,
150 &remote_candidate_id,
151 &state,
152 &priority,
153 &nominated,
154 &writable,
155 &readable,
156 &bytes_sent,
157 &bytes_received,
hbos3168c7a2016-12-15 06:17:08 -0800158 &total_round_trip_time,
159 &current_round_trip_time,
hbosc47a0c32016-10-11 14:54:49 -0700160 &available_outgoing_bitrate,
161 &available_incoming_bitrate,
162 &requests_received,
163 &requests_sent,
164 &responses_received,
165 &responses_sent,
166 &retransmissions_received,
167 &retransmissions_sent,
168 &consent_requests_received,
169 &consent_requests_sent,
170 &consent_responses_received,
171 &consent_responses_sent);
172
173RTCIceCandidatePairStats::RTCIceCandidatePairStats(
174 const std::string& id, int64_t timestamp_us)
175 : RTCIceCandidatePairStats(std::string(id), timestamp_us) {
176}
177
178RTCIceCandidatePairStats::RTCIceCandidatePairStats(
179 std::string&& id, int64_t timestamp_us)
180 : RTCStats(std::move(id), timestamp_us),
181 transport_id("transportId"),
182 local_candidate_id("localCandidateId"),
183 remote_candidate_id("remoteCandidateId"),
184 state("state"),
185 priority("priority"),
186 nominated("nominated"),
187 writable("writable"),
188 readable("readable"),
189 bytes_sent("bytesSent"),
190 bytes_received("bytesReceived"),
hbos3168c7a2016-12-15 06:17:08 -0800191 total_round_trip_time("totalRoundTripTime"),
192 current_round_trip_time("currentRoundTripTime"),
hbosc47a0c32016-10-11 14:54:49 -0700193 available_outgoing_bitrate("availableOutgoingBitrate"),
194 available_incoming_bitrate("availableIncomingBitrate"),
195 requests_received("requestsReceived"),
196 requests_sent("requestsSent"),
197 responses_received("responsesReceived"),
198 responses_sent("responsesSent"),
199 retransmissions_received("retransmissionsReceived"),
200 retransmissions_sent("retransmissionsSent"),
201 consent_requests_received("consentRequestsReceived"),
202 consent_requests_sent("consentRequestsSent"),
203 consent_responses_received("consentResponsesReceived"),
204 consent_responses_sent("consentResponsesSent") {
205}
206
207RTCIceCandidatePairStats::RTCIceCandidatePairStats(
208 const RTCIceCandidatePairStats& other)
209 : RTCStats(other.id(), other.timestamp_us()),
210 transport_id(other.transport_id),
211 local_candidate_id(other.local_candidate_id),
212 remote_candidate_id(other.remote_candidate_id),
213 state(other.state),
214 priority(other.priority),
215 nominated(other.nominated),
216 writable(other.writable),
217 readable(other.readable),
218 bytes_sent(other.bytes_sent),
219 bytes_received(other.bytes_received),
hbos3168c7a2016-12-15 06:17:08 -0800220 total_round_trip_time(other.total_round_trip_time),
221 current_round_trip_time(other.current_round_trip_time),
hbosc47a0c32016-10-11 14:54:49 -0700222 available_outgoing_bitrate(other.available_outgoing_bitrate),
223 available_incoming_bitrate(other.available_incoming_bitrate),
224 requests_received(other.requests_received),
225 requests_sent(other.requests_sent),
226 responses_received(other.responses_received),
227 responses_sent(other.responses_sent),
228 retransmissions_received(other.retransmissions_received),
229 retransmissions_sent(other.retransmissions_sent),
230 consent_requests_received(other.consent_requests_received),
231 consent_requests_sent(other.consent_requests_sent),
232 consent_responses_received(other.consent_responses_received),
233 consent_responses_sent(other.consent_responses_sent) {
234}
235
236RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {
237}
238
hbosab9f6e42016-10-07 02:18:47 -0700239WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate",
hbosc3a2b7f2017-01-02 04:46:15 -0800240 &is_remote,
hbosab9f6e42016-10-07 02:18:47 -0700241 &ip,
242 &port,
243 &protocol,
244 &candidate_type,
245 &priority,
246 &url);
247
248RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800249 const std::string& id, int64_t timestamp_us, bool is_remote)
250 : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {
hbosab9f6e42016-10-07 02:18:47 -0700251}
252
253RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800254 std::string&& id, int64_t timestamp_us, bool is_remote)
hbosab9f6e42016-10-07 02:18:47 -0700255 : RTCStats(std::move(id), timestamp_us),
hbosc3a2b7f2017-01-02 04:46:15 -0800256 is_remote("isRemote", is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700257 ip("ip"),
258 port("port"),
259 protocol("protocol"),
260 candidate_type("candidateType"),
261 priority("priority"),
262 url("url") {
263}
264
265RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other)
266 : RTCStats(other.id(), other.timestamp_us()),
hbosc3a2b7f2017-01-02 04:46:15 -0800267 is_remote(other.is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700268 ip(other.ip),
269 port(other.port),
270 protocol(other.protocol),
271 candidate_type(other.candidate_type),
272 priority(other.priority),
273 url(other.url) {
274}
275
276RTCIceCandidateStats::~RTCIceCandidateStats() {
277}
278
279const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
280
281RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
282 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800283 : RTCIceCandidateStats(id, timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700284}
285
286RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
287 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800288 : RTCIceCandidateStats(std::move(id), timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700289}
290
291const char* RTCLocalIceCandidateStats::type() const {
292 return kType;
293}
294
295const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
296
297RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
298 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800299 : RTCIceCandidateStats(id, timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700300}
301
302RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
303 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800304 : RTCIceCandidateStats(std::move(id), timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700305}
306
307const char* RTCRemoteIceCandidateStats::type() const {
308 return kType;
309}
310
hbos09bc1282016-11-08 06:29:22 -0800311WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream",
312 &stream_identifier,
313 &track_ids);
314
315RTCMediaStreamStats::RTCMediaStreamStats(
316 const std::string& id, int64_t timestamp_us)
317 : RTCMediaStreamStats(std::string(id), timestamp_us) {
318}
319
320RTCMediaStreamStats::RTCMediaStreamStats(
321 std::string&& id, int64_t timestamp_us)
322 : RTCStats(std::move(id), timestamp_us),
323 stream_identifier("streamIdentifier"),
324 track_ids("trackIds") {
325}
326
327RTCMediaStreamStats::RTCMediaStreamStats(
328 const RTCMediaStreamStats& other)
329 : RTCStats(other.id(), other.timestamp_us()),
330 stream_identifier(other.stream_identifier),
331 track_ids(other.track_ids) {
332}
333
334RTCMediaStreamStats::~RTCMediaStreamStats() {
335}
336
337WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
338 &track_identifier,
339 &remote_source,
340 &ended,
341 &detached,
342 &ssrc_ids,
343 &frame_width,
344 &frame_height,
345 &frames_per_second,
346 &frames_sent,
347 &frames_received,
348 &frames_decoded,
349 &frames_dropped,
350 &frames_corrupted,
351 &partial_frames_lost,
352 &full_frames_lost,
353 &audio_level,
354 &echo_return_loss,
355 &echo_return_loss_enhancement);
356
357RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
358 const std::string& id, int64_t timestamp_us)
359 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
360}
361
362RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
363 std::string&& id, int64_t timestamp_us)
364 : RTCStats(std::move(id), timestamp_us),
365 track_identifier("trackIdentifier"),
366 remote_source("remoteSource"),
367 ended("ended"),
368 detached("detached"),
369 ssrc_ids("ssrcIds"),
370 frame_width("frameWidth"),
371 frame_height("frameHeight"),
372 frames_per_second("framesPerSecond"),
373 frames_sent("framesSent"),
374 frames_received("framesReceived"),
375 frames_decoded("framesDecoded"),
376 frames_dropped("framesDropped"),
377 frames_corrupted("framesCorrupted"),
378 partial_frames_lost("partialFramesLost"),
379 full_frames_lost("fullFramesLost"),
380 audio_level("audioLevel"),
381 echo_return_loss("echoReturnLoss"),
382 echo_return_loss_enhancement("echoReturnLossEnhancement") {
383}
384
385RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
386 const RTCMediaStreamTrackStats& other)
387 : RTCStats(other.id(), other.timestamp_us()),
388 track_identifier(other.track_identifier),
389 remote_source(other.remote_source),
390 ended(other.ended),
391 detached(other.detached),
392 ssrc_ids(other.ssrc_ids),
393 frame_width(other.frame_width),
394 frame_height(other.frame_height),
395 frames_per_second(other.frames_per_second),
396 frames_sent(other.frames_sent),
397 frames_received(other.frames_received),
398 frames_decoded(other.frames_decoded),
399 frames_dropped(other.frames_dropped),
400 frames_corrupted(other.frames_corrupted),
401 partial_frames_lost(other.partial_frames_lost),
402 full_frames_lost(other.full_frames_lost),
403 audio_level(other.audio_level),
404 echo_return_loss(other.echo_return_loss),
405 echo_return_loss_enhancement(other.echo_return_loss_enhancement) {
406}
407
408RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
409}
410
hbosfc5e0502016-10-06 02:06:10 -0700411WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
412 &data_channels_opened,
413 &data_channels_closed);
hbosd565b732016-08-30 14:04:35 -0700414
415RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700416 const std::string& id, int64_t timestamp_us)
417 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
hbosd565b732016-08-30 14:04:35 -0700418}
419
420RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700421 std::string&& id, int64_t timestamp_us)
422 : RTCStats(std::move(id), timestamp_us),
hbosd565b732016-08-30 14:04:35 -0700423 data_channels_opened("dataChannelsOpened"),
424 data_channels_closed("dataChannelsClosed") {
425}
426
hbosfc5e0502016-10-06 02:06:10 -0700427RTCPeerConnectionStats::RTCPeerConnectionStats(
428 const RTCPeerConnectionStats& other)
429 : RTCStats(other.id(), other.timestamp_us()),
430 data_channels_opened(other.data_channels_opened),
431 data_channels_closed(other.data_channels_closed) {
432}
433
434RTCPeerConnectionStats::~RTCPeerConnectionStats() {
435}
436
hbos6ded1902016-11-01 01:50:46 -0700437WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
438 &ssrc,
439 &associate_stats_id,
440 &is_remote,
441 &media_type,
442 &media_track_id,
443 &transport_id,
444 &codec_id,
445 &fir_count,
446 &pli_count,
447 &nack_count,
448 &sli_count);
449
450RTCRTPStreamStats::RTCRTPStreamStats(
451 const std::string& id, int64_t timestamp_us)
452 : RTCRTPStreamStats(std::string(id), timestamp_us) {
453}
454
455RTCRTPStreamStats::RTCRTPStreamStats(
456 std::string&& id, int64_t timestamp_us)
457 : RTCStats(std::move(id), timestamp_us),
458 ssrc("ssrc"),
459 associate_stats_id("associateStatsId"),
460 is_remote("isRemote", false),
461 media_type("mediaType"),
462 media_track_id("mediaTrackId"),
463 transport_id("transportId"),
464 codec_id("codecId"),
465 fir_count("firCount"),
466 pli_count("pliCount"),
467 nack_count("nackCount"),
468 sli_count("sliCount") {
469}
470
471RTCRTPStreamStats::RTCRTPStreamStats(
472 const RTCRTPStreamStats& other)
473 : RTCStats(other.id(), other.timestamp_us()),
474 ssrc(other.ssrc),
475 associate_stats_id(other.associate_stats_id),
476 is_remote(other.is_remote),
477 media_type(other.media_type),
478 media_track_id(other.media_track_id),
479 transport_id(other.transport_id),
480 codec_id(other.codec_id),
481 fir_count(other.fir_count),
482 pli_count(other.pli_count),
483 nack_count(other.nack_count),
484 sli_count(other.sli_count) {
485}
486
487RTCRTPStreamStats::~RTCRTPStreamStats() {
488}
489
490WEBRTC_RTCSTATS_IMPL(
hboseeafe942016-11-01 03:00:17 -0700491 RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp",
492 &packets_received,
493 &bytes_received,
494 &packets_lost,
495 &jitter,
496 &fraction_lost,
497 &packets_discarded,
498 &packets_repaired,
499 &burst_packets_lost,
500 &burst_packets_discarded,
501 &burst_loss_count,
502 &burst_discard_count,
503 &burst_loss_rate,
504 &burst_discard_rate,
505 &gap_loss_rate,
506 &gap_discard_rate);
507
508RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
509 const std::string& id, int64_t timestamp_us)
510 : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {
511}
512
513RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
514 std::string&& id, int64_t timestamp_us)
515 : RTCRTPStreamStats(std::move(id), timestamp_us),
516 packets_received("packetsReceived"),
517 bytes_received("bytesReceived"),
518 packets_lost("packetsLost"),
519 jitter("jitter"),
520 fraction_lost("fractionLost"),
521 packets_discarded("packetsDiscarded"),
522 packets_repaired("packetsRepaired"),
523 burst_packets_lost("burstPacketsLost"),
524 burst_packets_discarded("burstPacketsDiscarded"),
525 burst_loss_count("burstLossCount"),
526 burst_discard_count("burstDiscardCount"),
527 burst_loss_rate("burstLossRate"),
528 burst_discard_rate("burstDiscardRate"),
529 gap_loss_rate("gapLossRate"),
530 gap_discard_rate("gapDiscardRate") {
531}
532
533RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
534 const RTCInboundRTPStreamStats& other)
535 : RTCRTPStreamStats(other),
536 packets_received(other.packets_received),
537 bytes_received(other.bytes_received),
538 packets_lost(other.packets_lost),
539 jitter(other.jitter),
540 fraction_lost(other.fraction_lost),
541 packets_discarded(other.packets_discarded),
542 packets_repaired(other.packets_repaired),
543 burst_packets_lost(other.burst_packets_lost),
544 burst_packets_discarded(other.burst_packets_discarded),
545 burst_loss_count(other.burst_loss_count),
546 burst_discard_count(other.burst_discard_count),
547 burst_loss_rate(other.burst_loss_rate),
548 burst_discard_rate(other.burst_discard_rate),
549 gap_loss_rate(other.gap_loss_rate),
550 gap_discard_rate(other.gap_discard_rate) {
551}
552
553RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {
554}
555
556WEBRTC_RTCSTATS_IMPL(
hbos6ded1902016-11-01 01:50:46 -0700557 RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp",
558 &packets_sent,
559 &bytes_sent,
560 &target_bitrate,
561 &round_trip_time);
562
563RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
564 const std::string& id, int64_t timestamp_us)
565 : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {
566}
567
568RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
569 std::string&& id, int64_t timestamp_us)
570 : RTCRTPStreamStats(std::move(id), timestamp_us),
571 packets_sent("packetsSent"),
572 bytes_sent("bytesSent"),
573 target_bitrate("targetBitrate"),
574 round_trip_time("roundTripTime") {
575}
576
577RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
578 const RTCOutboundRTPStreamStats& other)
579 : RTCRTPStreamStats(other),
580 packets_sent(other.packets_sent),
581 bytes_sent(other.bytes_sent),
582 target_bitrate(other.target_bitrate),
583 round_trip_time(other.round_trip_time) {
584}
585
586RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {
587}
588
hbos2fa7c672016-10-24 04:00:05 -0700589WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
590 &bytes_sent,
591 &bytes_received,
592 &rtcp_transport_stats_id,
593 &active_connection,
594 &selected_candidate_pair_id,
595 &local_certificate_id,
596 &remote_certificate_id);
597
598RTCTransportStats::RTCTransportStats(
599 const std::string& id, int64_t timestamp_us)
600 : RTCTransportStats(std::string(id), timestamp_us) {
601}
602
603RTCTransportStats::RTCTransportStats(
604 std::string&& id, int64_t timestamp_us)
605 : RTCStats(std::move(id), timestamp_us),
606 bytes_sent("bytesSent"),
607 bytes_received("bytesReceived"),
608 rtcp_transport_stats_id("rtcpTransportStatsId"),
609 active_connection("activeConnection"),
610 selected_candidate_pair_id("selectedCandidatePairId"),
611 local_certificate_id("localCertificateId"),
612 remote_certificate_id("remoteCertificateId") {
613}
614
615RTCTransportStats::RTCTransportStats(
616 const RTCTransportStats& other)
617 : RTCStats(other.id(), other.timestamp_us()),
618 bytes_sent(other.bytes_sent),
619 bytes_received(other.bytes_received),
620 rtcp_transport_stats_id(other.rtcp_transport_stats_id),
621 active_connection(other.active_connection),
622 selected_candidate_pair_id(other.selected_candidate_pair_id),
623 local_certificate_id(other.local_certificate_id),
624 remote_certificate_id(other.remote_certificate_id) {
625}
626
627RTCTransportStats::~RTCTransportStats() {
628}
629
hbosd565b732016-08-30 14:04:35 -0700630} // namespace webrtc