blob: 947cc32fad9dfa090e22e0f46beb0bbb68e227c3 [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",
hbosb4e426e2017-01-02 09:59:31 -0800239 &transport_id,
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,
hbosd17a5a72017-01-02 08:09:59 -0800246 &url,
247 &deleted);
hbosab9f6e42016-10-07 02:18:47 -0700248
249RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800250 const std::string& id, int64_t timestamp_us, bool is_remote)
251 : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {
hbosab9f6e42016-10-07 02:18:47 -0700252}
253
254RTCIceCandidateStats::RTCIceCandidateStats(
hbosc3a2b7f2017-01-02 04:46:15 -0800255 std::string&& id, int64_t timestamp_us, bool is_remote)
hbosab9f6e42016-10-07 02:18:47 -0700256 : RTCStats(std::move(id), timestamp_us),
hbosb4e426e2017-01-02 09:59:31 -0800257 transport_id("transportId"),
hbosc3a2b7f2017-01-02 04:46:15 -0800258 is_remote("isRemote", is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700259 ip("ip"),
260 port("port"),
261 protocol("protocol"),
262 candidate_type("candidateType"),
263 priority("priority"),
hbosd17a5a72017-01-02 08:09:59 -0800264 url("url"),
265 deleted("deleted", false) {
hbosab9f6e42016-10-07 02:18:47 -0700266}
267
268RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other)
269 : RTCStats(other.id(), other.timestamp_us()),
hbosb4e426e2017-01-02 09:59:31 -0800270 transport_id(other.transport_id),
hbosc3a2b7f2017-01-02 04:46:15 -0800271 is_remote(other.is_remote),
hbosab9f6e42016-10-07 02:18:47 -0700272 ip(other.ip),
273 port(other.port),
274 protocol(other.protocol),
275 candidate_type(other.candidate_type),
276 priority(other.priority),
hbosd17a5a72017-01-02 08:09:59 -0800277 url(other.url),
278 deleted(other.deleted) {
hbosab9f6e42016-10-07 02:18:47 -0700279}
280
281RTCIceCandidateStats::~RTCIceCandidateStats() {
282}
283
284const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
285
286RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
287 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800288 : RTCIceCandidateStats(id, timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700289}
290
291RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(
292 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800293 : RTCIceCandidateStats(std::move(id), timestamp_us, false) {
hbosab9f6e42016-10-07 02:18:47 -0700294}
295
296const char* RTCLocalIceCandidateStats::type() const {
297 return kType;
298}
299
300const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
301
302RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
303 const std::string& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800304 : RTCIceCandidateStats(id, timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700305}
306
307RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
308 std::string&& id, int64_t timestamp_us)
hbosc3a2b7f2017-01-02 04:46:15 -0800309 : RTCIceCandidateStats(std::move(id), timestamp_us, true) {
hbosab9f6e42016-10-07 02:18:47 -0700310}
311
312const char* RTCRemoteIceCandidateStats::type() const {
313 return kType;
314}
315
hbos09bc1282016-11-08 06:29:22 -0800316WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream",
317 &stream_identifier,
318 &track_ids);
319
320RTCMediaStreamStats::RTCMediaStreamStats(
321 const std::string& id, int64_t timestamp_us)
322 : RTCMediaStreamStats(std::string(id), timestamp_us) {
323}
324
325RTCMediaStreamStats::RTCMediaStreamStats(
326 std::string&& id, int64_t timestamp_us)
327 : RTCStats(std::move(id), timestamp_us),
328 stream_identifier("streamIdentifier"),
329 track_ids("trackIds") {
330}
331
332RTCMediaStreamStats::RTCMediaStreamStats(
333 const RTCMediaStreamStats& other)
334 : RTCStats(other.id(), other.timestamp_us()),
335 stream_identifier(other.stream_identifier),
336 track_ids(other.track_ids) {
337}
338
339RTCMediaStreamStats::~RTCMediaStreamStats() {
340}
341
342WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
343 &track_identifier,
344 &remote_source,
345 &ended,
346 &detached,
347 &ssrc_ids,
348 &frame_width,
349 &frame_height,
350 &frames_per_second,
351 &frames_sent,
352 &frames_received,
353 &frames_decoded,
354 &frames_dropped,
355 &frames_corrupted,
356 &partial_frames_lost,
357 &full_frames_lost,
358 &audio_level,
359 &echo_return_loss,
360 &echo_return_loss_enhancement);
361
362RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
363 const std::string& id, int64_t timestamp_us)
364 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) {
365}
366
367RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
368 std::string&& id, int64_t timestamp_us)
369 : RTCStats(std::move(id), timestamp_us),
370 track_identifier("trackIdentifier"),
371 remote_source("remoteSource"),
372 ended("ended"),
373 detached("detached"),
374 ssrc_ids("ssrcIds"),
375 frame_width("frameWidth"),
376 frame_height("frameHeight"),
377 frames_per_second("framesPerSecond"),
378 frames_sent("framesSent"),
379 frames_received("framesReceived"),
380 frames_decoded("framesDecoded"),
381 frames_dropped("framesDropped"),
382 frames_corrupted("framesCorrupted"),
383 partial_frames_lost("partialFramesLost"),
384 full_frames_lost("fullFramesLost"),
385 audio_level("audioLevel"),
386 echo_return_loss("echoReturnLoss"),
387 echo_return_loss_enhancement("echoReturnLossEnhancement") {
388}
389
390RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
391 const RTCMediaStreamTrackStats& other)
392 : RTCStats(other.id(), other.timestamp_us()),
393 track_identifier(other.track_identifier),
394 remote_source(other.remote_source),
395 ended(other.ended),
396 detached(other.detached),
397 ssrc_ids(other.ssrc_ids),
398 frame_width(other.frame_width),
399 frame_height(other.frame_height),
400 frames_per_second(other.frames_per_second),
401 frames_sent(other.frames_sent),
402 frames_received(other.frames_received),
403 frames_decoded(other.frames_decoded),
404 frames_dropped(other.frames_dropped),
405 frames_corrupted(other.frames_corrupted),
406 partial_frames_lost(other.partial_frames_lost),
407 full_frames_lost(other.full_frames_lost),
408 audio_level(other.audio_level),
409 echo_return_loss(other.echo_return_loss),
410 echo_return_loss_enhancement(other.echo_return_loss_enhancement) {
411}
412
413RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
414}
415
hbosfc5e0502016-10-06 02:06:10 -0700416WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
417 &data_channels_opened,
418 &data_channels_closed);
hbosd565b732016-08-30 14:04:35 -0700419
420RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700421 const std::string& id, int64_t timestamp_us)
422 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
hbosd565b732016-08-30 14:04:35 -0700423}
424
425RTCPeerConnectionStats::RTCPeerConnectionStats(
hbos0e6758d2016-08-31 07:57:36 -0700426 std::string&& id, int64_t timestamp_us)
427 : RTCStats(std::move(id), timestamp_us),
hbosd565b732016-08-30 14:04:35 -0700428 data_channels_opened("dataChannelsOpened"),
429 data_channels_closed("dataChannelsClosed") {
430}
431
hbosfc5e0502016-10-06 02:06:10 -0700432RTCPeerConnectionStats::RTCPeerConnectionStats(
433 const RTCPeerConnectionStats& other)
434 : RTCStats(other.id(), other.timestamp_us()),
435 data_channels_opened(other.data_channels_opened),
436 data_channels_closed(other.data_channels_closed) {
437}
438
439RTCPeerConnectionStats::~RTCPeerConnectionStats() {
440}
441
hbos6ded1902016-11-01 01:50:46 -0700442WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
443 &ssrc,
444 &associate_stats_id,
445 &is_remote,
446 &media_type,
447 &media_track_id,
448 &transport_id,
449 &codec_id,
450 &fir_count,
451 &pli_count,
452 &nack_count,
hbos6769c492017-01-02 08:35:13 -0800453 &sli_count,
454 &qp_sum);
hbos6ded1902016-11-01 01:50:46 -0700455
456RTCRTPStreamStats::RTCRTPStreamStats(
457 const std::string& id, int64_t timestamp_us)
458 : RTCRTPStreamStats(std::string(id), timestamp_us) {
459}
460
461RTCRTPStreamStats::RTCRTPStreamStats(
462 std::string&& id, int64_t timestamp_us)
463 : RTCStats(std::move(id), timestamp_us),
464 ssrc("ssrc"),
465 associate_stats_id("associateStatsId"),
466 is_remote("isRemote", false),
467 media_type("mediaType"),
468 media_track_id("mediaTrackId"),
469 transport_id("transportId"),
470 codec_id("codecId"),
471 fir_count("firCount"),
472 pli_count("pliCount"),
473 nack_count("nackCount"),
hbos6769c492017-01-02 08:35:13 -0800474 sli_count("sliCount"),
475 qp_sum("qpSum") {
hbos6ded1902016-11-01 01:50:46 -0700476}
477
478RTCRTPStreamStats::RTCRTPStreamStats(
479 const RTCRTPStreamStats& other)
480 : RTCStats(other.id(), other.timestamp_us()),
481 ssrc(other.ssrc),
482 associate_stats_id(other.associate_stats_id),
483 is_remote(other.is_remote),
484 media_type(other.media_type),
485 media_track_id(other.media_track_id),
486 transport_id(other.transport_id),
487 codec_id(other.codec_id),
488 fir_count(other.fir_count),
489 pli_count(other.pli_count),
490 nack_count(other.nack_count),
hbos6769c492017-01-02 08:35:13 -0800491 sli_count(other.sli_count),
492 qp_sum(other.qp_sum) {
hbos6ded1902016-11-01 01:50:46 -0700493}
494
495RTCRTPStreamStats::~RTCRTPStreamStats() {
496}
497
498WEBRTC_RTCSTATS_IMPL(
hboseeafe942016-11-01 03:00:17 -0700499 RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp",
500 &packets_received,
501 &bytes_received,
502 &packets_lost,
503 &jitter,
504 &fraction_lost,
505 &packets_discarded,
506 &packets_repaired,
507 &burst_packets_lost,
508 &burst_packets_discarded,
509 &burst_loss_count,
510 &burst_discard_count,
511 &burst_loss_rate,
512 &burst_discard_rate,
513 &gap_loss_rate,
hbos6769c492017-01-02 08:35:13 -0800514 &gap_discard_rate,
515 &frames_decoded);
hboseeafe942016-11-01 03:00:17 -0700516
517RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
518 const std::string& id, int64_t timestamp_us)
519 : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {
520}
521
522RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
523 std::string&& id, int64_t timestamp_us)
524 : RTCRTPStreamStats(std::move(id), timestamp_us),
525 packets_received("packetsReceived"),
526 bytes_received("bytesReceived"),
527 packets_lost("packetsLost"),
528 jitter("jitter"),
529 fraction_lost("fractionLost"),
530 packets_discarded("packetsDiscarded"),
531 packets_repaired("packetsRepaired"),
532 burst_packets_lost("burstPacketsLost"),
533 burst_packets_discarded("burstPacketsDiscarded"),
534 burst_loss_count("burstLossCount"),
535 burst_discard_count("burstDiscardCount"),
536 burst_loss_rate("burstLossRate"),
537 burst_discard_rate("burstDiscardRate"),
538 gap_loss_rate("gapLossRate"),
hbos6769c492017-01-02 08:35:13 -0800539 gap_discard_rate("gapDiscardRate"),
540 frames_decoded("framesDecoded") {
hboseeafe942016-11-01 03:00:17 -0700541}
542
543RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(
544 const RTCInboundRTPStreamStats& other)
545 : RTCRTPStreamStats(other),
546 packets_received(other.packets_received),
547 bytes_received(other.bytes_received),
548 packets_lost(other.packets_lost),
549 jitter(other.jitter),
550 fraction_lost(other.fraction_lost),
551 packets_discarded(other.packets_discarded),
552 packets_repaired(other.packets_repaired),
553 burst_packets_lost(other.burst_packets_lost),
554 burst_packets_discarded(other.burst_packets_discarded),
555 burst_loss_count(other.burst_loss_count),
556 burst_discard_count(other.burst_discard_count),
557 burst_loss_rate(other.burst_loss_rate),
558 burst_discard_rate(other.burst_discard_rate),
559 gap_loss_rate(other.gap_loss_rate),
hbos6769c492017-01-02 08:35:13 -0800560 gap_discard_rate(other.gap_discard_rate),
561 frames_decoded(other.frames_decoded) {
hboseeafe942016-11-01 03:00:17 -0700562}
563
564RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {
565}
566
567WEBRTC_RTCSTATS_IMPL(
hbos6ded1902016-11-01 01:50:46 -0700568 RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp",
569 &packets_sent,
570 &bytes_sent,
571 &target_bitrate,
hbos6769c492017-01-02 08:35:13 -0800572 &round_trip_time,
573 &frames_encoded);
hbos6ded1902016-11-01 01:50:46 -0700574
575RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
576 const std::string& id, int64_t timestamp_us)
577 : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {
578}
579
580RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
581 std::string&& id, int64_t timestamp_us)
582 : RTCRTPStreamStats(std::move(id), timestamp_us),
583 packets_sent("packetsSent"),
584 bytes_sent("bytesSent"),
585 target_bitrate("targetBitrate"),
hbos6769c492017-01-02 08:35:13 -0800586 round_trip_time("roundTripTime"),
587 frames_encoded("framesEncoded") {
hbos6ded1902016-11-01 01:50:46 -0700588}
589
590RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(
591 const RTCOutboundRTPStreamStats& other)
592 : RTCRTPStreamStats(other),
593 packets_sent(other.packets_sent),
594 bytes_sent(other.bytes_sent),
595 target_bitrate(other.target_bitrate),
hbos6769c492017-01-02 08:35:13 -0800596 round_trip_time(other.round_trip_time),
597 frames_encoded(other.frames_encoded) {
hbos6ded1902016-11-01 01:50:46 -0700598}
599
600RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {
601}
602
hbos2fa7c672016-10-24 04:00:05 -0700603WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
604 &bytes_sent,
605 &bytes_received,
606 &rtcp_transport_stats_id,
607 &active_connection,
608 &selected_candidate_pair_id,
609 &local_certificate_id,
610 &remote_certificate_id);
611
612RTCTransportStats::RTCTransportStats(
613 const std::string& id, int64_t timestamp_us)
614 : RTCTransportStats(std::string(id), timestamp_us) {
615}
616
617RTCTransportStats::RTCTransportStats(
618 std::string&& id, int64_t timestamp_us)
619 : RTCStats(std::move(id), timestamp_us),
620 bytes_sent("bytesSent"),
621 bytes_received("bytesReceived"),
622 rtcp_transport_stats_id("rtcpTransportStatsId"),
623 active_connection("activeConnection"),
624 selected_candidate_pair_id("selectedCandidatePairId"),
625 local_certificate_id("localCertificateId"),
626 remote_certificate_id("remoteCertificateId") {
627}
628
629RTCTransportStats::RTCTransportStats(
630 const RTCTransportStats& other)
631 : RTCStats(other.id(), other.timestamp_us()),
632 bytes_sent(other.bytes_sent),
633 bytes_received(other.bytes_received),
634 rtcp_transport_stats_id(other.rtcp_transport_stats_id),
635 active_connection(other.active_connection),
636 selected_candidate_pair_id(other.selected_candidate_pair_id),
637 local_certificate_id(other.local_certificate_id),
638 remote_certificate_id(other.remote_certificate_id) {
639}
640
641RTCTransportStats::~RTCTransportStats() {
642}
643
hbosd565b732016-08-30 14:04:35 -0700644} // namespace webrtc