| 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 |
| 11 | #include "api/stats/rtcstats_objects.h" |
| 12 |
| 13 | #include <utility> |
| 14 |
| 15 | #include "api/stats/attribute.h" |
| 16 | #include "api/stats/rtc_stats.h" |
| 17 | #include "rtc_base/checks.h" |
| 18 |
| 19 | namespace webrtc { |
| 20 |
| 21 | // clang-format off |
| 22 | WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
| 23 | AttributeInit("fingerprint", &fingerprint), |
| 24 | AttributeInit("fingerprintAlgorithm", &fingerprint_algorithm), |
| 25 | AttributeInit("base64Certificate", &base64_certificate), |
| 26 | AttributeInit("issuerCertificateId", &issuer_certificate_id)) |
| 27 | // clang-format on |
| 28 |
| 29 | RTCCertificateStats::RTCCertificateStats(std::string id, Timestamp timestamp) |
| 30 | : RTCStats(std::move(id), timestamp) {} |
| 31 |
| 32 | RTCCertificateStats::~RTCCertificateStats() {} |
| 33 |
| 34 | // clang-format off |
| 35 | WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec", |
| 36 | AttributeInit("transportId", &transport_id), |
| 37 | AttributeInit("payloadType", &payload_type), |
| 38 | AttributeInit("mimeType", &mime_type), |
| 39 | AttributeInit("clockRate", &clock_rate), |
| 40 | AttributeInit("channels", &channels), |
| 41 | AttributeInit("sdpFmtpLine", &sdp_fmtp_line)) |
| 42 | // clang-format on |
| 43 |
| 44 | RTCCodecStats::RTCCodecStats(std::string id, Timestamp timestamp) |
| 45 | : RTCStats(std::move(id), timestamp) {} |
| 46 |
| 47 | RTCCodecStats::~RTCCodecStats() {} |
| 48 |
| 49 | // clang-format off |
| 50 | WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel", |
| 51 | AttributeInit("label", &label), |
| 52 | AttributeInit("protocol", &protocol), |
| 53 | AttributeInit("dataChannelIdentifier", &data_channel_identifier), |
| 54 | AttributeInit("state", &state), |
| 55 | AttributeInit("messagesSent", &messages_sent), |
| 56 | AttributeInit("bytesSent", &bytes_sent), |
| 57 | AttributeInit("messagesReceived", &messages_received), |
| 58 | AttributeInit("bytesReceived", &bytes_received)) |
| 59 | // clang-format on |
| 60 |
| 61 | RTCDataChannelStats::RTCDataChannelStats(std::string id, Timestamp timestamp) |
| 62 | : RTCStats(std::move(id), timestamp) {} |
| 63 |
| 64 | RTCDataChannelStats::~RTCDataChannelStats() {} |
| 65 |
| 66 | // clang-format off |
| 67 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", |
| 68 | AttributeInit("transportId", &transport_id), |
| 69 | AttributeInit("localCandidateId", &local_candidate_id), |
| 70 | AttributeInit("remoteCandidateId", &remote_candidate_id), |
| 71 | AttributeInit("state", &state), |
| 72 | AttributeInit("priority", &priority), |
| 73 | AttributeInit("nominated", &nominated), |
| 74 | AttributeInit("writable", &writable), |
| 75 | AttributeInit("packetsSent", &packets_sent), |
| 76 | AttributeInit("packetsReceived", &packets_received), |
| 77 | AttributeInit("bytesSent", &bytes_sent), |
| 78 | AttributeInit("bytesReceived", &bytes_received), |
| 79 | AttributeInit("totalRoundTripTime", &total_round_trip_time), |
| 80 | AttributeInit("currentRoundTripTime", ¤t_round_trip_time), |
| 81 | AttributeInit("availableOutgoingBitrate", &available_outgoing_bitrate), |
| 82 | AttributeInit("availableIncomingBitrate", &available_incoming_bitrate), |
| 83 | AttributeInit("requestsReceived", &requests_received), |
| 84 | AttributeInit("requestsSent", &requests_sent), |
| 85 | AttributeInit("responsesReceived", &responses_received), |
| 86 | AttributeInit("responsesSent", &responses_sent), |
| 87 | AttributeInit("consentRequestsSent", &consent_requests_sent), |
| 88 | AttributeInit("packetsDiscardedOnSend", &packets_discarded_on_send), |
| 89 | AttributeInit("bytesDiscardedOnSend", &bytes_discarded_on_send), |
| 90 | AttributeInit("lastPacketReceivedTimestamp", |
| 91 | &last_packet_received_timestamp), |
| 92 | AttributeInit("lastPacketSentTimestamp", &last_packet_sent_timestamp)) |
| 93 | // clang-format on |
| 94 |
| 95 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string id, |
| 96 | Timestamp timestamp) |
| 97 | : RTCStats(std::move(id), timestamp) {} |
| 98 |
| 99 | RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {} |
| 100 |
| 101 | // clang-format off |
| 102 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate", |
| 103 | AttributeInit("transportId", &transport_id), |
| 104 | AttributeInit("isRemote", &is_remote), |
| 105 | AttributeInit("networkType", &network_type), |
| 106 | AttributeInit("ip", &ip), |
| 107 | AttributeInit("address", &address), |
| 108 | AttributeInit("port", &port), |
| 109 | AttributeInit("protocol", &protocol), |
| 110 | AttributeInit("relayProtocol", &relay_protocol), |
| 111 | AttributeInit("candidateType", &candidate_type), |
| 112 | AttributeInit("priority", &priority), |
| 113 | AttributeInit("url", &url), |
| 114 | AttributeInit("foundation", &foundation), |
| 115 | AttributeInit("relatedAddress", &related_address), |
| 116 | AttributeInit("relatedPort", &related_port), |
| 117 | AttributeInit("usernameFragment", &username_fragment), |
| 118 | AttributeInit("tcpType", &tcp_type), |
| 119 | AttributeInit("vpn", &vpn), |
| 120 | AttributeInit("networkAdapterType", &network_adapter_type)) |
| 121 | // clang-format on |
| 122 |
| 123 | RTCIceCandidateStats::RTCIceCandidateStats(std::string id, |
| 124 | Timestamp timestamp, |
| 125 | bool is_remote) |
| 126 | : RTCStats(std::move(id), timestamp), is_remote(is_remote) {} |
| 127 |
| 128 | RTCIceCandidateStats::~RTCIceCandidateStats() {} |
| 129 |
| 130 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 131 |
| 132 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string id, |
| 133 | Timestamp timestamp) |
| 134 | : RTCIceCandidateStats(std::move(id), timestamp, false) {} |
| 135 |
| 136 | std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const { |
| 137 | return std::make_unique<RTCLocalIceCandidateStats>(*this); |
| 138 | } |
| 139 |
| 140 | const char* RTCLocalIceCandidateStats::type() const { |
| 141 | return kType; |
| 142 | } |
| 143 |
| 144 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 145 |
| 146 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string id, |
| 147 | Timestamp timestamp) |
| 148 | : RTCIceCandidateStats(std::move(id), timestamp, true) {} |
| 149 |
| 150 | std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const { |
| 151 | return std::make_unique<RTCRemoteIceCandidateStats>(*this); |
| 152 | } |
| 153 |
| 154 | const char* RTCRemoteIceCandidateStats::type() const { |
| 155 | return kType; |
| 156 | } |
| 157 |
| 158 | // clang-format off |
| 159 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 160 | AttributeInit("dataChannelsOpened", &data_channels_opened), |
| 161 | AttributeInit("dataChannelsClosed", &data_channels_closed)) |
| 162 | // clang-format on |
| 163 |
| 164 | RTCPeerConnectionStats::RTCPeerConnectionStats(std::string id, |
| 165 | Timestamp timestamp) |
| 166 | : RTCStats(std::move(id), timestamp) {} |
| 167 |
| 168 | RTCPeerConnectionStats::~RTCPeerConnectionStats() {} |
| 169 |
| 170 | // clang-format off |
| 171 | WEBRTC_RTCSTATS_IMPL(RTCRtpStreamStats, RTCStats, "rtp", |
| 172 | AttributeInit("ssrc", &ssrc), |
| 173 | AttributeInit("kind", &kind), |
| 174 | AttributeInit("transportId", &transport_id), |
| 175 | AttributeInit("codecId", &codec_id)) |
| 176 | // clang-format on |
| 177 |
| 178 | RTCRtpStreamStats::RTCRtpStreamStats(std::string id, Timestamp timestamp) |
| 179 | : RTCStats(std::move(id), timestamp) {} |
| 180 |
| 181 | RTCRtpStreamStats::~RTCRtpStreamStats() {} |
| 182 |
| 183 | // clang-format off |
| 184 | WEBRTC_RTCSTATS_IMPL( |
| 185 | RTCReceivedRtpStreamStats, RTCRtpStreamStats, "received-rtp", |
| 186 | AttributeInit("jitter", &jitter), |
| 187 | AttributeInit("packetsLost", &packets_lost)) |
| 188 | // clang-format on |
| 189 |
| 190 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string id, |
| 191 | Timestamp timestamp) |
| 192 | : RTCRtpStreamStats(std::move(id), timestamp) {} |
| 193 |
| 194 | RTCReceivedRtpStreamStats::~RTCReceivedRtpStreamStats() {} |
| 195 |
| 196 | // clang-format off |
| 197 | WEBRTC_RTCSTATS_IMPL(RTCSentRtpStreamStats, RTCRtpStreamStats, "sent-rtp", |
| 198 | AttributeInit("packetsSent", &packets_sent), |
| 199 | AttributeInit("bytesSent", &bytes_sent)) |
| 200 | // clang-format on |
| 201 |
| 202 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string id, |
| 203 | Timestamp timestamp) |
| 204 | : RTCRtpStreamStats(std::move(id), timestamp) {} |
| 205 |
| 206 | RTCSentRtpStreamStats::~RTCSentRtpStreamStats() {} |
| 207 |
| 208 | // clang-format off |
| 209 | WEBRTC_RTCSTATS_IMPL( |
| 210 | RTCInboundRtpStreamStats, RTCReceivedRtpStreamStats, "inbound-rtp", |
| 211 | AttributeInit("playoutId", &playout_id), |
| 212 | AttributeInit("trackIdentifier", &track_identifier), |
| 213 | AttributeInit("mid", &mid), |
| 214 | AttributeInit("remoteId", &remote_id), |
| 215 | AttributeInit("packetsReceived", &packets_received), |
| 216 | AttributeInit("packetsDiscarded", &packets_discarded), |
| 217 | AttributeInit("fecPacketsReceived", &fec_packets_received), |
| 218 | AttributeInit("fecBytesReceived", &fec_bytes_received), |
| 219 | AttributeInit("fecPacketsDiscarded", &fec_packets_discarded), |
| 220 | AttributeInit("fecSsrc", &fec_ssrc), |
| 221 | AttributeInit("bytesReceived", &bytes_received), |
| 222 | AttributeInit("headerBytesReceived", &header_bytes_received), |
| 223 | AttributeInit("retransmittedPacketsReceived", |
| 224 | &retransmitted_packets_received), |
| 225 | AttributeInit("retransmittedBytesReceived", &retransmitted_bytes_received), |
| 226 | AttributeInit("rtxSsrc", &rtx_ssrc), |
| 227 | AttributeInit("lastPacketReceivedTimestamp", |
| 228 | &last_packet_received_timestamp), |
| 229 | AttributeInit("jitterBufferDelay", &jitter_buffer_delay), |
| 230 | AttributeInit("jitterBufferTargetDelay", &jitter_buffer_target_delay), |
| 231 | AttributeInit("jitterBufferMinimumDelay", &jitter_buffer_minimum_delay), |
| 232 | AttributeInit("jitterBufferEmittedCount", &jitter_buffer_emitted_count), |
| 233 | AttributeInit("totalSamplesReceived", &total_samples_received), |
| 234 | AttributeInit("concealedSamples", &concealed_samples), |
| 235 | AttributeInit("silentConcealedSamples", &silent_concealed_samples), |
| 236 | AttributeInit("concealmentEvents", &concealment_events), |
| 237 | AttributeInit("insertedSamplesForDeceleration", |
| 238 | &inserted_samples_for_deceleration), |
| 239 | AttributeInit("removedSamplesForAcceleration", |
| 240 | &removed_samples_for_acceleration), |
| 241 | AttributeInit("audioLevel", &audio_level), |
| 242 | AttributeInit("totalAudioEnergy", &total_audio_energy), |
| 243 | AttributeInit("totalSamplesDuration", &total_samples_duration), |
| 244 | AttributeInit("framesReceived", &frames_received), |
| 245 | AttributeInit("frameWidth", &frame_width), |
| 246 | AttributeInit("frameHeight", &frame_height), |
| 247 | AttributeInit("framesPerSecond", &frames_per_second), |
| 248 | AttributeInit("framesDecoded", &frames_decoded), |
| 249 | AttributeInit("keyFramesDecoded", &key_frames_decoded), |
| 250 | AttributeInit("framesDropped", &frames_dropped), |
| 251 | AttributeInit("totalDecodeTime", &total_decode_time), |
| 252 | AttributeInit("totalProcessingDelay", &total_processing_delay), |
| 253 | AttributeInit("totalAssemblyTime", &total_assembly_time), |
| 254 | AttributeInit("framesAssembledFromMultiplePackets", |
| 255 | &frames_assembled_from_multiple_packets), |
| 256 | AttributeInit("totalInterFrameDelay", &total_inter_frame_delay), |
| 257 | AttributeInit("totalSquaredInterFrameDelay", |
| 258 | &total_squared_inter_frame_delay), |
| 259 | AttributeInit("pauseCount", &pause_count), |
| 260 | AttributeInit("totalPausesDuration", &total_pauses_duration), |
| 261 | AttributeInit("freezeCount", &freeze_count), |
| 262 | AttributeInit("totalFreezesDuration", &total_freezes_duration), |
| 263 | AttributeInit("contentType", &content_type), |
| 264 | AttributeInit("estimatedPlayoutTimestamp", &estimated_playout_timestamp), |
| 265 | AttributeInit("decoderImplementation", &decoder_implementation), |
| 266 | AttributeInit("firCount", &fir_count), |
| 267 | AttributeInit("pliCount", &pli_count), |
| 268 | AttributeInit("nackCount", &nack_count), |
| 269 | AttributeInit("qpSum", &qp_sum), |
| 270 | AttributeInit("googTimingFrameInfo", &goog_timing_frame_info), |
| 271 | AttributeInit("powerEfficientDecoder", &power_efficient_decoder), |
| 272 | AttributeInit("jitterBufferFlushes", &jitter_buffer_flushes), |
| 273 | AttributeInit("delayedPacketOutageSamples", &delayed_packet_outage_samples), |
| 274 | AttributeInit("relativePacketArrivalDelay", &relative_packet_arrival_delay), |
| 275 | AttributeInit("interruptionCount", &interruption_count), |
| 276 | AttributeInit("totalInterruptionDuration", &total_interruption_duration), |
| 277 | AttributeInit("minPlayoutDelay", &min_playout_delay)) |
| 278 | // clang-format on |
| 279 |
| 280 | RTCInboundRtpStreamStats::RTCInboundRtpStreamStats(std::string id, |
| 281 | Timestamp timestamp) |
| 282 | : RTCReceivedRtpStreamStats(std::move(id), timestamp) {} |
| 283 |
| 284 | RTCInboundRtpStreamStats::~RTCInboundRtpStreamStats() {} |
| 285 |
| 286 | // clang-format off |
| 287 | WEBRTC_RTCSTATS_IMPL( |
| 288 | RTCOutboundRtpStreamStats, RTCSentRtpStreamStats, "outbound-rtp", |
| 289 | AttributeInit("mediaSourceId", &media_source_id), |
| 290 | AttributeInit("remoteId", &remote_id), |
| 291 | AttributeInit("mid", &mid), |
| 292 | AttributeInit("rid", &rid), |
| 293 | AttributeInit("retransmittedPacketsSent", &retransmitted_packets_sent), |
| 294 | AttributeInit("headerBytesSent", &header_bytes_sent), |
| 295 | AttributeInit("retransmittedBytesSent", &retransmitted_bytes_sent), |
| 296 | AttributeInit("targetBitrate", &target_bitrate), |
| 297 | AttributeInit("framesEncoded", &frames_encoded), |
| 298 | AttributeInit("keyFramesEncoded", &key_frames_encoded), |
| 299 | AttributeInit("totalEncodeTime", &total_encode_time), |
| 300 | AttributeInit("totalEncodedBytesTarget", &total_encoded_bytes_target), |
| 301 | AttributeInit("frameWidth", &frame_width), |
| 302 | AttributeInit("frameHeight", &frame_height), |
| 303 | AttributeInit("framesPerSecond", &frames_per_second), |
| 304 | AttributeInit("framesSent", &frames_sent), |
| 305 | AttributeInit("hugeFramesSent", &huge_frames_sent), |
| 306 | AttributeInit("totalPacketSendDelay", &total_packet_send_delay), |
| 307 | AttributeInit("qualityLimitationReason", &quality_limitation_reason), |
| 308 | AttributeInit("qualityLimitationDurations", &quality_limitation_durations), |
| 309 | AttributeInit("qualityLimitationResolutionChanges", |
| 310 | &quality_limitation_resolution_changes), |
| 311 | AttributeInit("contentType", &content_type), |
| 312 | AttributeInit("encoderImplementation", &encoder_implementation), |
| 313 | AttributeInit("firCount", &fir_count), |
| 314 | AttributeInit("pliCount", &pli_count), |
| 315 | AttributeInit("nackCount", &nack_count), |
| 316 | AttributeInit("qpSum", &qp_sum), |
| 317 | AttributeInit("active", &active), |
| 318 | AttributeInit("powerEfficientEncoder", &power_efficient_encoder), |
| 319 | AttributeInit("scalabilityMode", &scalability_mode), |
| 320 | AttributeInit("rtxSsrc", &rtx_ssrc)) |
| 321 | // clang-format on |
| 322 |
| 323 | RTCOutboundRtpStreamStats::RTCOutboundRtpStreamStats(std::string id, |
| 324 | Timestamp timestamp) |
| 325 | : RTCSentRtpStreamStats(std::move(id), timestamp) {} |
| 326 |
| 327 | RTCOutboundRtpStreamStats::~RTCOutboundRtpStreamStats() {} |
| 328 |
| 329 | // clang-format off |
| 330 | WEBRTC_RTCSTATS_IMPL( |
| 331 | RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats, |
| 332 | "remote-inbound-rtp", |
| 333 | AttributeInit("localId", &local_id), |
| 334 | AttributeInit("roundTripTime", &round_trip_time), |
| 335 | AttributeInit("fractionLost", &fraction_lost), |
| 336 | AttributeInit("totalRoundTripTime", &total_round_trip_time), |
| 337 | AttributeInit("roundTripTimeMeasurements", &round_trip_time_measurements)) |
| 338 | // clang-format on |
| 339 |
| 340 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 341 | std::string id, |
| 342 | Timestamp timestamp) |
| 343 | : RTCReceivedRtpStreamStats(std::move(id), timestamp) {} |
| 344 |
| 345 | RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {} |
| 346 |
| 347 | // clang-format off |
| 348 | WEBRTC_RTCSTATS_IMPL( |
| 349 | RTCRemoteOutboundRtpStreamStats, RTCSentRtpStreamStats, |
| 350 | "remote-outbound-rtp", |
| 351 | AttributeInit("localId", &local_id), |
| 352 | AttributeInit("remoteTimestamp", &remote_timestamp), |
| 353 | AttributeInit("reportsSent", &reports_sent), |
| 354 | AttributeInit("roundTripTime", &round_trip_time), |
| 355 | AttributeInit("roundTripTimeMeasurements", &round_trip_time_measurements), |
| 356 | AttributeInit("totalRoundTripTime", &total_round_trip_time)) |
| 357 | // clang-format on |
| 358 |
| 359 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 360 | std::string id, |
| 361 | Timestamp timestamp) |
| 362 | : RTCSentRtpStreamStats(std::move(id), timestamp) {} |
| 363 |
| 364 | RTCRemoteOutboundRtpStreamStats::~RTCRemoteOutboundRtpStreamStats() {} |
| 365 |
| 366 | // clang-format off |
| 367 | WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source", |
| 368 | AttributeInit("trackIdentifier", &track_identifier), |
| 369 | AttributeInit("kind", &kind)) |
| 370 | // clang-format on |
| 371 |
| 372 | RTCMediaSourceStats::RTCMediaSourceStats(std::string id, Timestamp timestamp) |
| 373 | : RTCStats(std::move(id), timestamp) {} |
| 374 |
| 375 | RTCMediaSourceStats::~RTCMediaSourceStats() {} |
| 376 |
| 377 | // clang-format off |
| 378 | WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source", |
| 379 | AttributeInit("audioLevel", &audio_level), |
| 380 | AttributeInit("totalAudioEnergy", &total_audio_energy), |
| 381 | AttributeInit("totalSamplesDuration", &total_samples_duration), |
| 382 | AttributeInit("echoReturnLoss", &echo_return_loss), |
| 383 | AttributeInit("echoReturnLossEnhancement", &echo_return_loss_enhancement)) |
| 384 | // clang-format on |
| 385 |
| 386 | RTCAudioSourceStats::RTCAudioSourceStats(std::string id, Timestamp timestamp) |
| 387 | : RTCMediaSourceStats(std::move(id), timestamp) {} |
| 388 |
| 389 | RTCAudioSourceStats::~RTCAudioSourceStats() {} |
| 390 |
| 391 | // clang-format off |
| 392 | WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source", |
| 393 | AttributeInit("width", &width), |
| 394 | AttributeInit("height", &height), |
| 395 | AttributeInit("frames", &frames), |
| 396 | AttributeInit("framesPerSecond", &frames_per_second)) |
| 397 | // clang-format on |
| 398 |
| 399 | RTCVideoSourceStats::RTCVideoSourceStats(std::string id, Timestamp timestamp) |
| 400 | : RTCMediaSourceStats(std::move(id), timestamp) {} |
| 401 |
| 402 | RTCVideoSourceStats::~RTCVideoSourceStats() {} |
| 403 |
| 404 | // clang-format off |
| 405 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 406 | AttributeInit("bytesSent", &bytes_sent), |
| 407 | AttributeInit("packetsSent", &packets_sent), |
| 408 | AttributeInit("bytesReceived", &bytes_received), |
| 409 | AttributeInit("packetsReceived", &packets_received), |
| 410 | AttributeInit("rtcpTransportStatsId", &rtcp_transport_stats_id), |
| 411 | AttributeInit("dtlsState", &dtls_state), |
| 412 | AttributeInit("selectedCandidatePairId", &selected_candidate_pair_id), |
| 413 | AttributeInit("localCertificateId", &local_certificate_id), |
| 414 | AttributeInit("remoteCertificateId", &remote_certificate_id), |
| 415 | AttributeInit("tlsVersion", &tls_version), |
| 416 | AttributeInit("dtlsCipher", &dtls_cipher), |
| 417 | AttributeInit("dtlsRole", &dtls_role), |
| 418 | AttributeInit("srtpCipher", &srtp_cipher), |
| 419 | AttributeInit("selectedCandidatePairChanges", |
| 420 | &selected_candidate_pair_changes), |
| 421 | AttributeInit("iceRole", &ice_role), |
| 422 | AttributeInit("iceLocalUsernameFragment", &ice_local_username_fragment), |
| 423 | AttributeInit("iceState", &ice_state)) |
| 424 | // clang-format on |
| 425 |
| 426 | RTCTransportStats::RTCTransportStats(std::string id, Timestamp timestamp) |
| 427 | : RTCStats(std::move(id), timestamp) {} |
| 428 |
| 429 | RTCTransportStats::~RTCTransportStats() {} |
| 430 |
| 431 | // clang-format off |
| 432 | WEBRTC_RTCSTATS_IMPL(RTCAudioPlayoutStats, RTCStats, "media-playout", |
| 433 | AttributeInit("kind", &kind), |
| 434 | AttributeInit("synthesizedSamplesDuration", &synthesized_samples_duration), |
| 435 | AttributeInit("synthesizedSamplesEvents", &synthesized_samples_events), |
| 436 | AttributeInit("totalSamplesDuration", &total_samples_duration), |
| 437 | AttributeInit("totalPlayoutDelay", &total_playout_delay), |
| 438 | AttributeInit("totalSamplesCount", &total_samples_count)) |
| 439 | // clang-format on |
| 440 |
| 441 | RTCAudioPlayoutStats::RTCAudioPlayoutStats(const std::string& id, |
| 442 | Timestamp timestamp) |
| 443 | : RTCStats(std::move(id), timestamp), kind("audio") {} |
| 444 |
| 445 | RTCAudioPlayoutStats::~RTCAudioPlayoutStats() {} |
| 446 |
| 447 | } // namespace webrtc |
| 448 |