blob: 966c8451428b3e808308b929b4f4b7036e027cd5 [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,
hbosd17a5a72017-01-02 08:09:59 -0800245 &url,
246 &deleted);
hbosab9f6e42016-10-07 02:18:47 -0700247
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"),
hbosd17a5a72017-01-02 08:09:59 -0800262 url("url"),
263 deleted("deleted", false) {
hbosab9f6e42016-10-07 02:18:47 -0700264}
265
266RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other)
267 : RTCStats(other.id(), other.timestamp_us()),
hbosc3a2b7f2017-01-02 04:46:15 -0800268 is_remote(other.is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700269 ip(other.ip),
270 port(other.port),
271 protocol(other.protocol),
272 candidate_type(other.candidate_type),
273 priority(other.priority),
hbosd17a5a72017-01-02 08:09:59 -0800274 url(other.url),
275 deleted(other.deleted) {
hbosab9f6e42016-10-07 02:18:47 -0700276}
277
278RTCIceCandidateStats::~RTCIceCandidateStats() {
279}
280
281const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
282
283RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
284 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800285 : RTCIceCandidateStats(id, timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700286}
287
288RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
289 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800290 : RTCIceCandidateStats(std::move(id), timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700291}
292
293const char* RTCLocalIceCandidateStats::type() const {
294 return kType;
295}
296
297const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
298
299RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
300 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800301 : RTCIceCandidateStats(id, timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700302}
303
304RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
305 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800306 : RTCIceCandidateStats(std::move(id), timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700307}
308
309const char* RTCRemoteIceCandidateStats::type() const {
310 return kType;
311}
312
hbos09bc1282016-11-08 06:29:22 -0800313WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream",
314 &stream_identifier,
315 &track_ids);
316
317RTCMediaStreamStats::RTCMediaStreamStats(
318 const std::string& id, int64_t timestamp_us)
319 : RTCMediaStreamStats(std::string(id), timestamp_us) {
320}
321
322RTCMediaStreamStats::RTCMediaStreamStats(
323 std::string&& id, int64_t timestamp_us)
324 : RTCStats(std::move(id), timestamp_us),
325 stream_identifier("streamIdentifier"),
326 track_ids("trackIds") {
327}
328
329RTCMediaStreamStats::RTCMediaStreamStats(
330 const RTCMediaStreamStats& other)
331 : RTCStats(other.id(), other.timestamp_us()),
332 stream_identifier(other.stream_identifier),
333 track_ids(other.track_ids) {
334}
335
336RTCMediaStreamStats::~RTCMediaStreamStats() {
337}
338
339WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
340 &track_identifier,
341 &remote_source,
342 &ended,
343 &detached,
344 &ssrc_ids,
345 &frame_width,
346 &frame_height,
347 &frames_per_second,
348 &frames_sent,
349 &frames_received,
350 &frames_decoded,
351 &frames_dropped,
352 &frames_corrupted,
353 &partial_frames_lost,
354 &full_frames_lost,
355 &audio_level,
356 &echo_return_loss,
357 &echo_return_loss_enhancement);
358
359RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
360 const std::string& id, int64_t timestamp_us)
361 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
362}
363
364RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
365 std::string&& id, int64_t timestamp_us)
366 : RTCStats(std::move(id), timestamp_us),
367 track_identifier("trackIdentifier"),
368 remote_source("remoteSource"),
369 ended("ended"),
370 detached("detached"),
371 ssrc_ids("ssrcIds"),
372 frame_width("frameWidth"),
373 frame_height("frameHeight"),
374 frames_per_second("framesPerSecond"),
375 frames_sent("framesSent"),
376 frames_received("framesReceived"),
377 frames_decoded("framesDecoded"),
378 frames_dropped("framesDropped"),
379 frames_corrupted("framesCorrupted"),
380 partial_frames_lost("partialFramesLost"),
381 full_frames_lost("fullFramesLost"),
382 audio_level("audioLevel"),
383 echo_return_loss("echoReturnLoss"),
384 echo_return_loss_enhancement("echoReturnLossEnhancement") {
385}
386
387RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
388 const RTCMediaStreamTrackStats& other)
389 : RTCStats(other.id(), other.timestamp_us()),
390 track_identifier(other.track_identifier),
391 remote_source(other.remote_source),
392 ended(other.ended),
393 detached(other.detached),
394 ssrc_ids(other.ssrc_ids),
395 frame_width(other.frame_width),
396 frame_height(other.frame_height),
397 frames_per_second(other.frames_per_second),
398 frames_sent(other.frames_sent),
399 frames_received(other.frames_received),
400 frames_decoded(other.frames_decoded),
401 frames_dropped(other.frames_dropped),
402 frames_corrupted(other.frames_corrupted),
403 partial_frames_lost(other.partial_frames_lost),
404 full_frames_lost(other.full_frames_lost),
405 audio_level(other.audio_level),
406 echo_return_loss(other.echo_return_loss),
407 echo_return_loss_enhancement(other.echo_return_loss_enhancement) {
408}
409
410RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
411}
412
hbosfc5e0502016-10-06 02:06:10 -0700413WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
414 &data_channels_opened,
415 &data_channels_closed);
hbosd565b732016-08-30 14:04:35 -0700416
417RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700418 const std::string& id, int64_t timestamp_us)
419 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
hbosd565b732016-08-30 14:04:35 -0700420}
421
422RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700423 std::string&& id, int64_t timestamp_us)
424 : RTCStats(std::move(id), timestamp_us),
hbosd565b732016-08-30 14:04:35 -0700425 data_channels_opened("dataChannelsOpened"),
426 data_channels_closed("dataChannelsClosed") {
427}
428
hbosfc5e0502016-10-06 02:06:10 -0700429RTCPeerConnectionStats::RTCPeerConnectionStats(
430 const RTCPeerConnectionStats& other)
431 : RTCStats(other.id(), other.timestamp_us()),
432 data_channels_opened(other.data_channels_opened),
433 data_channels_closed(other.data_channels_closed) {
434}
435
436RTCPeerConnectionStats::~RTCPeerConnectionStats() {
437}
438
hbos6ded1902016-11-01 01:50:46 -0700439WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
440 &ssrc,
441 &associate_stats_id,
442 &is_remote,
443 &media_type,
444 &media_track_id,
445 &transport_id,
446 &codec_id,
447 &fir_count,
448 &pli_count,
449 &nack_count,
450 &sli_count);
451
452RTCRTPStreamStats::RTCRTPStreamStats(
453 const std::string& id, int64_t timestamp_us)
454 : RTCRTPStreamStats(std::string(id), timestamp_us) {
455}
456
457RTCRTPStreamStats::RTCRTPStreamStats(
458 std::string&& id, int64_t timestamp_us)
459 : RTCStats(std::move(id), timestamp_us),
460 ssrc("ssrc"),
461 associate_stats_id("associateStatsId"),
462 is_remote("isRemote", false),
463 media_type("mediaType"),
464 media_track_id("mediaTrackId"),
465 transport_id("transportId"),
466 codec_id("codecId"),
467 fir_count("firCount"),
468 pli_count("pliCount"),
469 nack_count("nackCount"),
470 sli_count("sliCount") {
471}
472
473RTCRTPStreamStats::RTCRTPStreamStats(
474 const RTCRTPStreamStats& other)
475 : RTCStats(other.id(), other.timestamp_us()),
476 ssrc(other.ssrc),
477 associate_stats_id(other.associate_stats_id),
478 is_remote(other.is_remote),
479 media_type(other.media_type),
480 media_track_id(other.media_track_id),
481 transport_id(other.transport_id),
482 codec_id(other.codec_id),
483 fir_count(other.fir_count),
484 pli_count(other.pli_count),
485 nack_count(other.nack_count),
486 sli_count(other.sli_count) {
487}
488
489RTCRTPStreamStats::~RTCRTPStreamStats() {
490}
491
492WEBRTC_RTCSTATS_IMPL(
hboseeafe942016-11-01 03:00:17 -0700493 RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp",
494 &packets_received,
495 &bytes_received,
496 &packets_lost,
497 &jitter,
498 &fraction_lost,
499 &packets_discarded,
500 &packets_repaired,
501 &burst_packets_lost,
502 &burst_packets_discarded,
503 &burst_loss_count,
504 &burst_discard_count,
505 &burst_loss_rate,
506 &burst_discard_rate,
507 &gap_loss_rate,
508 &gap_discard_rate);
509
510RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
511 const std::string& id, int64_t timestamp_us)
512 : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {
513}
514
515RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
516 std::string&& id, int64_t timestamp_us)
517 : RTCRTPStreamStats(std::move(id), timestamp_us),
518 packets_received("packetsReceived"),
519 bytes_received("bytesReceived"),
520 packets_lost("packetsLost"),
521 jitter("jitter"),
522 fraction_lost("fractionLost"),
523 packets_discarded("packetsDiscarded"),
524 packets_repaired("packetsRepaired"),
525 burst_packets_lost("burstPacketsLost"),
526 burst_packets_discarded("burstPacketsDiscarded"),
527 burst_loss_count("burstLossCount"),
528 burst_discard_count("burstDiscardCount"),
529 burst_loss_rate("burstLossRate"),
530 burst_discard_rate("burstDiscardRate"),
531 gap_loss_rate("gapLossRate"),
532 gap_discard_rate("gapDiscardRate") {
533}
534
535RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
536 const RTCInboundRTPStreamStats& other)
537 : RTCRTPStreamStats(other),
538 packets_received(other.packets_received),
539 bytes_received(other.bytes_received),
540 packets_lost(other.packets_lost),
541 jitter(other.jitter),
542 fraction_lost(other.fraction_lost),
543 packets_discarded(other.packets_discarded),
544 packets_repaired(other.packets_repaired),
545 burst_packets_lost(other.burst_packets_lost),
546 burst_packets_discarded(other.burst_packets_discarded),
547 burst_loss_count(other.burst_loss_count),
548 burst_discard_count(other.burst_discard_count),
549 burst_loss_rate(other.burst_loss_rate),
550 burst_discard_rate(other.burst_discard_rate),
551 gap_loss_rate(other.gap_loss_rate),
552 gap_discard_rate(other.gap_discard_rate) {
553}
554
555RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {
556}
557
558WEBRTC_RTCSTATS_IMPL(
hbos6ded1902016-11-01 01:50:46 -0700559 RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp",
560 &packets_sent,
561 &bytes_sent,
562 &target_bitrate,
563 &round_trip_time);
564
565RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
566 const std::string& id, int64_t timestamp_us)
567 : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {
568}
569
570RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
571 std::string&& id, int64_t timestamp_us)
572 : RTCRTPStreamStats(std::move(id), timestamp_us),
573 packets_sent("packetsSent"),
574 bytes_sent("bytesSent"),
575 target_bitrate("targetBitrate"),
576 round_trip_time("roundTripTime") {
577}
578
579RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
580 const RTCOutboundRTPStreamStats& other)
581 : RTCRTPStreamStats(other),
582 packets_sent(other.packets_sent),
583 bytes_sent(other.bytes_sent),
584 target_bitrate(other.target_bitrate),
585 round_trip_time(other.round_trip_time) {
586}
587
588RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {
589}
590
hbos2fa7c672016-10-24 04:00:05 -0700591WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
592 &bytes_sent,
593 &bytes_received,
594 &rtcp_transport_stats_id,
595 &active_connection,
596 &selected_candidate_pair_id,
597 &local_certificate_id,
598 &remote_certificate_id);
599
600RTCTransportStats::RTCTransportStats(
601 const std::string& id, int64_t timestamp_us)
602 : RTCTransportStats(std::string(id), timestamp_us) {
603}
604
605RTCTransportStats::RTCTransportStats(
606 std::string&& id, int64_t timestamp_us)
607 : RTCStats(std::move(id), timestamp_us),
608 bytes_sent("bytesSent"),
609 bytes_received("bytesReceived"),
610 rtcp_transport_stats_id("rtcpTransportStatsId"),
611 active_connection("activeConnection"),
612 selected_candidate_pair_id("selectedCandidatePairId"),
613 local_certificate_id("localCertificateId"),
614 remote_certificate_id("remoteCertificateId") {
615}
616
617RTCTransportStats::RTCTransportStats(
618 const RTCTransportStats& other)
619 : RTCStats(other.id(), other.timestamp_us()),
620 bytes_sent(other.bytes_sent),
621 bytes_received(other.bytes_received),
622 rtcp_transport_stats_id(other.rtcp_transport_stats_id),
623 active_connection(other.active_connection),
624 selected_candidate_pair_id(other.selected_candidate_pair_id),
625 local_certificate_id(other.local_certificate_id),
626 remote_certificate_id(other.remote_certificate_id) {
627}
628
629RTCTransportStats::~RTCTransportStats() {
630}
631
hbosd565b732016-08-30 14:04:35 -0700632} // namespace webrtc