blob: 487df930d6ca5aea140844f6a2168cd5c1ebe7ba [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";
hbos06495bc2017-01-02 08:08:18 -080022const char* RTCStatsIceCandidatePairState::kInProgress = "in-progress";
hbosc47a0c32016-10-11 14:54:49 -070023const char* RTCStatsIceCandidatePairState::kFailed = "failed";
24const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
hbosc47a0c32016-10-11 14:54:49 -070025
26// Strings defined in https://tools.ietf.org/html/rfc5245.
hbosab9f6e42016-10-07 02:18:47 -070027const char* RTCIceCandidateType::kHost = "host";
28const char* RTCIceCandidateType::kSrflx = "srflx";
29const char* RTCIceCandidateType::kPrflx = "prflx";
30const char* RTCIceCandidateType::kRelay = "relay";
31
hbos2fa7c672016-10-24 04:00:05 -070032WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
33 &fingerprint,
34 &fingerprint_algorithm,
35 &base64_certificate,
36 &issuer_certificate_id);
37
38RTCCertificateStats::RTCCertificateStats(
39 const std::string& id, int64_t timestamp_us)
40 : RTCCertificateStats(std::string(id), timestamp_us) {
41}
42
43RTCCertificateStats::RTCCertificateStats(
44 std::string&& id, int64_t timestamp_us)
45 : RTCStats(std::move(id), timestamp_us),
46 fingerprint("fingerprint"),
47 fingerprint_algorithm("fingerprintAlgorithm"),
48 base64_certificate("base64Certificate"),
49 issuer_certificate_id("issuerCertificateId") {
50}
51
52RTCCertificateStats::RTCCertificateStats(
53 const RTCCertificateStats& other)
54 : RTCStats(other.id(), other.timestamp_us()),
55 fingerprint(other.fingerprint),
56 fingerprint_algorithm(other.fingerprint_algorithm),
57 base64_certificate(other.base64_certificate),
58 issuer_certificate_id(other.issuer_certificate_id) {
59}
60
61RTCCertificateStats::~RTCCertificateStats() {
62}
63
hbos0adb8282016-11-23 02:32:06 -080064WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec",
65 &payload_type,
66 &codec,
67 &clock_rate,
68 &channels,
69 &parameters,
70 &implementation);
71
72RTCCodecStats::RTCCodecStats(
73 const std::string& id, int64_t timestamp_us)
74 : RTCCodecStats(std::string(id), timestamp_us) {
75}
76
77RTCCodecStats::RTCCodecStats(
78 std::string&& id, int64_t timestamp_us)
79 : RTCStats(std::move(id), timestamp_us),
80 payload_type("payloadType"),
81 codec("codec"),
82 clock_rate("clockRate"),
83 channels("channels"),
84 parameters("parameters"),
85 implementation("implementation") {
86}
87
88RTCCodecStats::RTCCodecStats(
89 const RTCCodecStats& other)
90 : RTCStats(other.id(), other.timestamp_us()),
91 payload_type(other.payload_type),
92 codec(other.codec),
93 clock_rate(other.clock_rate),
94 channels(other.channels),
95 parameters(other.parameters),
96 implementation(other.implementation) {
97}
98
99RTCCodecStats::~RTCCodecStats() {
100}
101
hbos2fa7c672016-10-24 04:00:05 -0700102WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
103 &label,
104 &protocol,
105 &datachannelid,
106 &state,
107 &messages_sent,
108 &bytes_sent,
109 &messages_received,
110 &bytes_received);
111
112RTCDataChannelStats::RTCDataChannelStats(
113 const std::string& id, int64_t timestamp_us)
114 : RTCDataChannelStats(std::string(id), timestamp_us) {
115}
116
117RTCDataChannelStats::RTCDataChannelStats(
118 std::string&& id, int64_t timestamp_us)
119 : RTCStats(std::move(id), timestamp_us),
120 label("label"),
121 protocol("protocol"),
122 datachannelid("datachannelid"),
123 state("state"),
124 messages_sent("messagesSent"),
125 bytes_sent("bytesSent"),
126 messages_received("messagesReceived"),
127 bytes_received("bytesReceived") {
128}
129
130RTCDataChannelStats::RTCDataChannelStats(
131 const RTCDataChannelStats& other)
132 : RTCStats(other.id(), other.timestamp_us()),
133 label(other.label),
134 protocol(other.protocol),
135 datachannelid(other.datachannelid),
136 state(other.state),
137 messages_sent(other.messages_sent),
138 bytes_sent(other.bytes_sent),
139 messages_received(other.messages_received),
140 bytes_received(other.bytes_received) {
141}
142
143RTCDataChannelStats::~RTCDataChannelStats() {
144}
145
hbosc47a0c32016-10-11 14:54:49 -0700146WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
147 &transport_id,
148 &local_candidate_id,
149 &remote_candidate_id,
150 &state,
151 &priority,
152 &nominated,
153 &writable,
154 &readable,
155 &bytes_sent,
156 &bytes_received,
hbos3168c7a2016-12-15 06:17:08 -0800157 &total_round_trip_time,
158 &current_round_trip_time,
hbosc47a0c32016-10-11 14:54:49 -0700159 &available_outgoing_bitrate,
160 &available_incoming_bitrate,
161 &requests_received,
162 &requests_sent,
163 &responses_received,
164 &responses_sent,
165 &retransmissions_received,
166 &retransmissions_sent,
167 &consent_requests_received,
168 &consent_requests_sent,
169 &consent_responses_received,
170 &consent_responses_sent);
171
172RTCIceCandidatePairStats::RTCIceCandidatePairStats(
173 const std::string& id, int64_t timestamp_us)
174 : RTCIceCandidatePairStats(std::string(id), timestamp_us) {
175}
176
177RTCIceCandidatePairStats::RTCIceCandidatePairStats(
178 std::string&& id, int64_t timestamp_us)
179 : RTCStats(std::move(id), timestamp_us),
180 transport_id("transportId"),
181 local_candidate_id("localCandidateId"),
182 remote_candidate_id("remoteCandidateId"),
183 state("state"),
184 priority("priority"),
185 nominated("nominated"),
186 writable("writable"),
187 readable("readable"),
188 bytes_sent("bytesSent"),
189 bytes_received("bytesReceived"),
hbos3168c7a2016-12-15 06:17:08 -0800190 total_round_trip_time("totalRoundTripTime"),
191 current_round_trip_time("currentRoundTripTime"),
hbosc47a0c32016-10-11 14:54:49 -0700192 available_outgoing_bitrate("availableOutgoingBitrate"),
193 available_incoming_bitrate("availableIncomingBitrate"),
194 requests_received("requestsReceived"),
195 requests_sent("requestsSent"),
196 responses_received("responsesReceived"),
197 responses_sent("responsesSent"),
198 retransmissions_received("retransmissionsReceived"),
199 retransmissions_sent("retransmissionsSent"),
200 consent_requests_received("consentRequestsReceived"),
201 consent_requests_sent("consentRequestsSent"),
202 consent_responses_received("consentResponsesReceived"),
203 consent_responses_sent("consentResponsesSent") {
204}
205
206RTCIceCandidatePairStats::RTCIceCandidatePairStats(
207 const RTCIceCandidatePairStats& other)
208 : RTCStats(other.id(), other.timestamp_us()),
209 transport_id(other.transport_id),
210 local_candidate_id(other.local_candidate_id),
211 remote_candidate_id(other.remote_candidate_id),
212 state(other.state),
213 priority(other.priority),
214 nominated(other.nominated),
215 writable(other.writable),
216 readable(other.readable),
217 bytes_sent(other.bytes_sent),
218 bytes_received(other.bytes_received),
hbos3168c7a2016-12-15 06:17:08 -0800219 total_round_trip_time(other.total_round_trip_time),
220 current_round_trip_time(other.current_round_trip_time),
hbosc47a0c32016-10-11 14:54:49 -0700221 available_outgoing_bitrate(other.available_outgoing_bitrate),
222 available_incoming_bitrate(other.available_incoming_bitrate),
223 requests_received(other.requests_received),
224 requests_sent(other.requests_sent),
225 responses_received(other.responses_received),
226 responses_sent(other.responses_sent),
227 retransmissions_received(other.retransmissions_received),
228 retransmissions_sent(other.retransmissions_sent),
229 consent_requests_received(other.consent_requests_received),
230 consent_requests_sent(other.consent_requests_sent),
231 consent_responses_received(other.consent_responses_received),
232 consent_responses_sent(other.consent_responses_sent) {
233}
234
235RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {
236}
237
hbosab9f6e42016-10-07 02:18:47 -0700238WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate",
hbosc3a2b7f2017-01-02 04:46:15 -0800239 &is_remote,
hbosab9f6e42016-10-07 02:18:47 -0700240 &ip,
241 &port,
242 &protocol,
243 &candidate_type,
244 &priority,
245 &url);
246
247RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800248 const std::string& id, int64_t timestamp_us, bool is_remote)
249 : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {
hbosab9f6e42016-10-07 02:18:47 -0700250}
251
252RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800253 std::string&& id, int64_t timestamp_us, bool is_remote)
hbosab9f6e42016-10-07 02:18:47 -0700254 : RTCStats(std::move(id), timestamp_us),
hbosc3a2b7f2017-01-02 04:46:15 -0800255 is_remote("isRemote", is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700256 ip("ip"),
257 port("port"),
258 protocol("protocol"),
259 candidate_type("candidateType"),
260 priority("priority"),
261 url("url") {
262}
263
264RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other)
265 : RTCStats(other.id(), other.timestamp_us()),
hbosc3a2b7f2017-01-02 04:46:15 -0800266 is_remote(other.is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700267 ip(other.ip),
268 port(other.port),
269 protocol(other.protocol),
270 candidate_type(other.candidate_type),
271 priority(other.priority),
272 url(other.url) {
273}
274
275RTCIceCandidateStats::~RTCIceCandidateStats() {
276}
277
278const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
279
280RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
281 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800282 : RTCIceCandidateStats(id, timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700283}
284
285RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
286 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800287 : RTCIceCandidateStats(std::move(id), timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700288}
289
290const char* RTCLocalIceCandidateStats::type() const {
291 return kType;
292}
293
294const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
295
296RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
297 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800298 : RTCIceCandidateStats(id, timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700299}
300
301RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
302 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800303 : RTCIceCandidateStats(std::move(id), timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700304}
305
306const char* RTCRemoteIceCandidateStats::type() const {
307 return kType;
308}
309
hbos09bc1282016-11-08 06:29:22 -0800310WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream",
311 &stream_identifier,
312 &track_ids);
313
314RTCMediaStreamStats::RTCMediaStreamStats(
315 const std::string& id, int64_t timestamp_us)
316 : RTCMediaStreamStats(std::string(id), timestamp_us) {
317}
318
319RTCMediaStreamStats::RTCMediaStreamStats(
320 std::string&& id, int64_t timestamp_us)
321 : RTCStats(std::move(id), timestamp_us),
322 stream_identifier("streamIdentifier"),
323 track_ids("trackIds") {
324}
325
326RTCMediaStreamStats::RTCMediaStreamStats(
327 const RTCMediaStreamStats& other)
328 : RTCStats(other.id(), other.timestamp_us()),
329 stream_identifier(other.stream_identifier),
330 track_ids(other.track_ids) {
331}
332
333RTCMediaStreamStats::~RTCMediaStreamStats() {
334}
335
336WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
337 &track_identifier,
338 &remote_source,
339 &ended,
340 &detached,
341 &ssrc_ids,
342 &frame_width,
343 &frame_height,
344 &frames_per_second,
345 &frames_sent,
346 &frames_received,
347 &frames_decoded,
348 &frames_dropped,
349 &frames_corrupted,
350 &partial_frames_lost,
351 &full_frames_lost,
352 &audio_level,
353 &echo_return_loss,
354 &echo_return_loss_enhancement);
355
356RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
357 const std::string& id, int64_t timestamp_us)
358 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
359}
360
361RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
362 std::string&& id, int64_t timestamp_us)
363 : RTCStats(std::move(id), timestamp_us),
364 track_identifier("trackIdentifier"),
365 remote_source("remoteSource"),
366 ended("ended"),
367 detached("detached"),
368 ssrc_ids("ssrcIds"),
369 frame_width("frameWidth"),
370 frame_height("frameHeight"),
371 frames_per_second("framesPerSecond"),
372 frames_sent("framesSent"),
373 frames_received("framesReceived"),
374 frames_decoded("framesDecoded"),
375 frames_dropped("framesDropped"),
376 frames_corrupted("framesCorrupted"),
377 partial_frames_lost("partialFramesLost"),
378 full_frames_lost("fullFramesLost"),
379 audio_level("audioLevel"),
380 echo_return_loss("echoReturnLoss"),
381 echo_return_loss_enhancement("echoReturnLossEnhancement") {
382}
383
384RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
385 const RTCMediaStreamTrackStats& other)
386 : RTCStats(other.id(), other.timestamp_us()),
387 track_identifier(other.track_identifier),
388 remote_source(other.remote_source),
389 ended(other.ended),
390 detached(other.detached),
391 ssrc_ids(other.ssrc_ids),
392 frame_width(other.frame_width),
393 frame_height(other.frame_height),
394 frames_per_second(other.frames_per_second),
395 frames_sent(other.frames_sent),
396 frames_received(other.frames_received),
397 frames_decoded(other.frames_decoded),
398 frames_dropped(other.frames_dropped),
399 frames_corrupted(other.frames_corrupted),
400 partial_frames_lost(other.partial_frames_lost),
401 full_frames_lost(other.full_frames_lost),
402 audio_level(other.audio_level),
403 echo_return_loss(other.echo_return_loss),
404 echo_return_loss_enhancement(other.echo_return_loss_enhancement) {
405}
406
407RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
408}
409
hbosfc5e0502016-10-06 02:06:10 -0700410WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
411 &data_channels_opened,
412 &data_channels_closed);
hbosd565b732016-08-30 14:04:35 -0700413
414RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700415 const std::string& id, int64_t timestamp_us)
416 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
hbosd565b732016-08-30 14:04:35 -0700417}
418
419RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700420 std::string&& id, int64_t timestamp_us)
421 : RTCStats(std::move(id), timestamp_us),
hbosd565b732016-08-30 14:04:35 -0700422 data_channels_opened("dataChannelsOpened"),
423 data_channels_closed("dataChannelsClosed") {
424}
425
hbosfc5e0502016-10-06 02:06:10 -0700426RTCPeerConnectionStats::RTCPeerConnectionStats(
427 const RTCPeerConnectionStats& other)
428 : RTCStats(other.id(), other.timestamp_us()),
429 data_channels_opened(other.data_channels_opened),
430 data_channels_closed(other.data_channels_closed) {
431}
432
433RTCPeerConnectionStats::~RTCPeerConnectionStats() {
434}
435
hbos6ded1902016-11-01 01:50:46 -0700436WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
437 &ssrc,
438 &associate_stats_id,
439 &is_remote,
440 &media_type,
441 &media_track_id,
442 &transport_id,
443 &codec_id,
444 &fir_count,
445 &pli_count,
446 &nack_count,
447 &sli_count);
448
449RTCRTPStreamStats::RTCRTPStreamStats(
450 const std::string& id, int64_t timestamp_us)
451 : RTCRTPStreamStats(std::string(id), timestamp_us) {
452}
453
454RTCRTPStreamStats::RTCRTPStreamStats(
455 std::string&& id, int64_t timestamp_us)
456 : RTCStats(std::move(id), timestamp_us),
457 ssrc("ssrc"),
458 associate_stats_id("associateStatsId"),
459 is_remote("isRemote", false),
460 media_type("mediaType"),
461 media_track_id("mediaTrackId"),
462 transport_id("transportId"),
463 codec_id("codecId"),
464 fir_count("firCount"),
465 pli_count("pliCount"),
466 nack_count("nackCount"),
467 sli_count("sliCount") {
468}
469
470RTCRTPStreamStats::RTCRTPStreamStats(
471 const RTCRTPStreamStats& other)
472 : RTCStats(other.id(), other.timestamp_us()),
473 ssrc(other.ssrc),
474 associate_stats_id(other.associate_stats_id),
475 is_remote(other.is_remote),
476 media_type(other.media_type),
477 media_track_id(other.media_track_id),
478 transport_id(other.transport_id),
479 codec_id(other.codec_id),
480 fir_count(other.fir_count),
481 pli_count(other.pli_count),
482 nack_count(other.nack_count),
483 sli_count(other.sli_count) {
484}
485
486RTCRTPStreamStats::~RTCRTPStreamStats() {
487}
488
489WEBRTC_RTCSTATS_IMPL(
hboseeafe942016-11-01 03:00:17 -0700490 RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp",
491 &packets_received,
492 &bytes_received,
493 &packets_lost,
494 &jitter,
495 &fraction_lost,
496 &packets_discarded,
497 &packets_repaired,
498 &burst_packets_lost,
499 &burst_packets_discarded,
500 &burst_loss_count,
501 &burst_discard_count,
502 &burst_loss_rate,
503 &burst_discard_rate,
504 &gap_loss_rate,
505 &gap_discard_rate);
506
507RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
508 const std::string& id, int64_t timestamp_us)
509 : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {
510}
511
512RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
513 std::string&& id, int64_t timestamp_us)
514 : RTCRTPStreamStats(std::move(id), timestamp_us),
515 packets_received("packetsReceived"),
516 bytes_received("bytesReceived"),
517 packets_lost("packetsLost"),
518 jitter("jitter"),
519 fraction_lost("fractionLost"),
520 packets_discarded("packetsDiscarded"),
521 packets_repaired("packetsRepaired"),
522 burst_packets_lost("burstPacketsLost"),
523 burst_packets_discarded("burstPacketsDiscarded"),
524 burst_loss_count("burstLossCount"),
525 burst_discard_count("burstDiscardCount"),
526 burst_loss_rate("burstLossRate"),
527 burst_discard_rate("burstDiscardRate"),
528 gap_loss_rate("gapLossRate"),
529 gap_discard_rate("gapDiscardRate") {
530}
531
532RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
533 const RTCInboundRTPStreamStats& other)
534 : RTCRTPStreamStats(other),
535 packets_received(other.packets_received),
536 bytes_received(other.bytes_received),
537 packets_lost(other.packets_lost),
538 jitter(other.jitter),
539 fraction_lost(other.fraction_lost),
540 packets_discarded(other.packets_discarded),
541 packets_repaired(other.packets_repaired),
542 burst_packets_lost(other.burst_packets_lost),
543 burst_packets_discarded(other.burst_packets_discarded),
544 burst_loss_count(other.burst_loss_count),
545 burst_discard_count(other.burst_discard_count),
546 burst_loss_rate(other.burst_loss_rate),
547 burst_discard_rate(other.burst_discard_rate),
548 gap_loss_rate(other.gap_loss_rate),
549 gap_discard_rate(other.gap_discard_rate) {
550}
551
552RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {
553}
554
555WEBRTC_RTCSTATS_IMPL(
hbos6ded1902016-11-01 01:50:46 -0700556 RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp",
557 &packets_sent,
558 &bytes_sent,
559 &target_bitrate,
560 &round_trip_time);
561
562RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
563 const std::string& id, int64_t timestamp_us)
564 : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {
565}
566
567RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
568 std::string&& id, int64_t timestamp_us)
569 : RTCRTPStreamStats(std::move(id), timestamp_us),
570 packets_sent("packetsSent"),
571 bytes_sent("bytesSent"),
572 target_bitrate("targetBitrate"),
573 round_trip_time("roundTripTime") {
574}
575
576RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
577 const RTCOutboundRTPStreamStats& other)
578 : RTCRTPStreamStats(other),
579 packets_sent(other.packets_sent),
580 bytes_sent(other.bytes_sent),
581 target_bitrate(other.target_bitrate),
582 round_trip_time(other.round_trip_time) {
583}
584
585RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {
586}
587
hbos2fa7c672016-10-24 04:00:05 -0700588WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
589 &bytes_sent,
590 &bytes_received,
591 &rtcp_transport_stats_id,
592 &active_connection,
593 &selected_candidate_pair_id,
594 &local_certificate_id,
595 &remote_certificate_id);
596
597RTCTransportStats::RTCTransportStats(
598 const std::string& id, int64_t timestamp_us)
599 : RTCTransportStats(std::string(id), timestamp_us) {
600}
601
602RTCTransportStats::RTCTransportStats(
603 std::string&& id, int64_t timestamp_us)
604 : RTCStats(std::move(id), timestamp_us),
605 bytes_sent("bytesSent"),
606 bytes_received("bytesReceived"),
607 rtcp_transport_stats_id("rtcpTransportStatsId"),
608 active_connection("activeConnection"),
609 selected_candidate_pair_id("selectedCandidatePairId"),
610 local_certificate_id("localCertificateId"),
611 remote_certificate_id("remoteCertificateId") {
612}
613
614RTCTransportStats::RTCTransportStats(
615 const RTCTransportStats& other)
616 : RTCStats(other.id(), other.timestamp_us()),
617 bytes_sent(other.bytes_sent),
618 bytes_received(other.bytes_received),
619 rtcp_transport_stats_id(other.rtcp_transport_stats_id),
620 active_connection(other.active_connection),
621 selected_candidate_pair_id(other.selected_candidate_pair_id),
622 local_certificate_id(other.local_certificate_id),
623 remote_certificate_id(other.remote_certificate_id) {
624}
625
626RTCTransportStats::~RTCTransportStats() {
627}
628
hbosd565b732016-08-30 14:04:35 -0700629} // namespace webrtc