2016-08-30 14:04:35 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright 2016 The WebRTC Project Authors. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/stats/rtcstats_objects.h"
|
2016-08-30 14:04:35 -07:00
|
|
|
|
2018-11-28 16:47:49 +01:00
|
|
|
#include <utility>
|
|
|
|
|
|
2019-03-19 15:38:49 +01:00
|
|
|
#include "api/stats/rtc_stats.h"
|
2018-11-28 16:47:49 +01:00
|
|
|
#include "rtc_base/checks.h"
|
2019-03-19 15:38:49 +01:00
|
|
|
|
2016-08-30 14:04:35 -07:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
2017-08-08 10:48:15 -07:00
|
|
|
const char* const RTCDataChannelState::kConnecting = "connecting";
|
|
|
|
|
const char* const RTCDataChannelState::kOpen = "open";
|
|
|
|
|
const char* const RTCDataChannelState::kClosing = "closing";
|
|
|
|
|
const char* const RTCDataChannelState::kClosed = "closed";
|
2016-10-18 12:48:31 -07:00
|
|
|
|
2017-08-08 10:48:15 -07:00
|
|
|
const char* const RTCStatsIceCandidatePairState::kFrozen = "frozen";
|
|
|
|
|
const char* const RTCStatsIceCandidatePairState::kWaiting = "waiting";
|
|
|
|
|
const char* const RTCStatsIceCandidatePairState::kInProgress = "in-progress";
|
|
|
|
|
const char* const RTCStatsIceCandidatePairState::kFailed = "failed";
|
|
|
|
|
const char* const RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
|
2016-10-11 14:54:49 -07:00
|
|
|
|
|
|
|
|
// Strings defined in https://tools.ietf.org/html/rfc5245.
|
2017-08-08 10:48:15 -07:00
|
|
|
const char* const RTCIceCandidateType::kHost = "host";
|
|
|
|
|
const char* const RTCIceCandidateType::kSrflx = "srflx";
|
|
|
|
|
const char* const RTCIceCandidateType::kPrflx = "prflx";
|
|
|
|
|
const char* const RTCIceCandidateType::kRelay = "relay";
|
|
|
|
|
|
|
|
|
|
const char* const RTCDtlsTransportState::kNew = "new";
|
|
|
|
|
const char* const RTCDtlsTransportState::kConnecting = "connecting";
|
|
|
|
|
const char* const RTCDtlsTransportState::kConnected = "connected";
|
|
|
|
|
const char* const RTCDtlsTransportState::kClosed = "closed";
|
|
|
|
|
const char* const RTCDtlsTransportState::kFailed = "failed";
|
|
|
|
|
|
|
|
|
|
const char* const RTCMediaStreamTrackKind::kAudio = "audio";
|
|
|
|
|
const char* const RTCMediaStreamTrackKind::kVideo = "video";
|
2017-01-17 02:53:23 -08:00
|
|
|
|
2017-11-21 10:49:36 -08:00
|
|
|
// https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype
|
|
|
|
|
const char* const RTCNetworkType::kBluetooth = "bluetooth";
|
|
|
|
|
const char* const RTCNetworkType::kCellular = "cellular";
|
|
|
|
|
const char* const RTCNetworkType::kEthernet = "ethernet";
|
|
|
|
|
const char* const RTCNetworkType::kWifi = "wifi";
|
|
|
|
|
const char* const RTCNetworkType::kWimax = "wimax";
|
|
|
|
|
const char* const RTCNetworkType::kVpn = "vpn";
|
|
|
|
|
const char* const RTCNetworkType::kUnknown = "unknown";
|
|
|
|
|
|
2019-05-28 17:42:38 +02:00
|
|
|
// https://w3c.github.io/webrtc-stats/#dom-rtcqualitylimitationreason
|
|
|
|
|
const char* const RTCQualityLimitationReason::kNone = "none";
|
|
|
|
|
const char* const RTCQualityLimitationReason::kCpu = "cpu";
|
|
|
|
|
const char* const RTCQualityLimitationReason::kBandwidth = "bandwidth";
|
|
|
|
|
const char* const RTCQualityLimitationReason::kOther = "other";
|
|
|
|
|
|
2019-04-09 13:59:31 +02:00
|
|
|
// https://webrtc.org/experiments/rtp-hdrext/video-content-type/
|
|
|
|
|
const char* const RTCContentType::kUnspecified = "unspecified";
|
|
|
|
|
const char* const RTCContentType::kScreenshare = "screenshare";
|
|
|
|
|
|
2022-04-22 15:46:24 +02:00
|
|
|
// https://w3c.github.io/webrtc-stats/#dom-rtcdtlsrole
|
|
|
|
|
const char* const RTCDtlsRole::kUnknown = "unknown";
|
|
|
|
|
const char* const RTCDtlsRole::kClient = "client";
|
|
|
|
|
const char* const RTCDtlsRole::kServer = "server";
|
|
|
|
|
|
2022-05-04 18:58:26 +02:00
|
|
|
// https://www.w3.org/TR/webrtc/#rtcicerole
|
|
|
|
|
const char* const RTCIceRole::kUnknown = "unknown";
|
|
|
|
|
const char* const RTCIceRole::kControlled = "controlled";
|
|
|
|
|
const char* const RTCIceRole::kControlling = "controlling";
|
|
|
|
|
|
2022-05-09 17:43:31 +02:00
|
|
|
// https://www.w3.org/TR/webrtc/#dom-rtcicetransportstate
|
|
|
|
|
const char* const RTCIceTransportState::kNew = "new";
|
|
|
|
|
const char* const RTCIceTransportState::kChecking = "checking";
|
|
|
|
|
const char* const RTCIceTransportState::kConnected = "connected";
|
|
|
|
|
const char* const RTCIceTransportState::kCompleted = "completed";
|
|
|
|
|
const char* const RTCIceTransportState::kDisconnected = "disconnected";
|
|
|
|
|
const char* const RTCIceTransportState::kFailed = "failed";
|
|
|
|
|
const char* const RTCIceTransportState::kClosed = "closed";
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-10-24 04:00:05 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
|
|
|
|
|
&fingerprint,
|
|
|
|
|
&fingerprint_algorithm,
|
|
|
|
|
&base64_certificate,
|
2019-02-20 10:13:16 -05:00
|
|
|
&issuer_certificate_id)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-24 04:00:05 -07:00
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCCertificateStats::RTCCertificateStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-10-24 04:00:05 -07:00
|
|
|
fingerprint("fingerprint"),
|
|
|
|
|
fingerprint_algorithm("fingerprintAlgorithm"),
|
|
|
|
|
base64_certificate("base64Certificate"),
|
|
|
|
|
issuer_certificate_id("issuerCertificateId") {}
|
|
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCCertificateStats::RTCCertificateStats(const RTCCertificateStats& other) =
|
|
|
|
|
default;
|
2016-10-24 04:00:05 -07:00
|
|
|
RTCCertificateStats::~RTCCertificateStats() {}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-11-23 02:32:06 -08:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec",
|
2020-11-16 20:08:27 +01:00
|
|
|
&transport_id,
|
2016-11-23 02:32:06 -08:00
|
|
|
&payload_type,
|
2017-02-28 06:56:04 -08:00
|
|
|
&mime_type,
|
2016-11-23 02:32:06 -08:00
|
|
|
&clock_rate,
|
|
|
|
|
&channels,
|
2019-08-16 13:09:51 +02:00
|
|
|
&sdp_fmtp_line)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-23 02:32:06 -08:00
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCCodecStats::RTCCodecStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2020-11-16 20:08:27 +01:00
|
|
|
transport_id("transportId"),
|
2016-11-23 02:32:06 -08:00
|
|
|
payload_type("payloadType"),
|
2017-02-28 06:56:04 -08:00
|
|
|
mime_type("mimeType"),
|
2016-11-23 02:32:06 -08:00
|
|
|
clock_rate("clockRate"),
|
|
|
|
|
channels("channels"),
|
2019-08-16 13:09:51 +02:00
|
|
|
sdp_fmtp_line("sdpFmtpLine") {}
|
2016-11-23 02:32:06 -08:00
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCCodecStats::RTCCodecStats(const RTCCodecStats& other) = default;
|
2016-11-23 02:32:06 -08:00
|
|
|
|
|
|
|
|
RTCCodecStats::~RTCCodecStats() {}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-10-24 04:00:05 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
|
|
|
|
|
&label,
|
|
|
|
|
&protocol,
|
2020-06-05 15:38:51 +02:00
|
|
|
&data_channel_identifier,
|
2016-10-24 04:00:05 -07:00
|
|
|
&state,
|
|
|
|
|
&messages_sent,
|
|
|
|
|
&bytes_sent,
|
|
|
|
|
&messages_received,
|
2019-02-20 10:13:16 -05:00
|
|
|
&bytes_received)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-24 04:00:05 -07:00
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCDataChannelStats::RTCDataChannelStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-10-24 04:00:05 -07:00
|
|
|
label("label"),
|
|
|
|
|
protocol("protocol"),
|
2020-06-05 15:38:51 +02:00
|
|
|
data_channel_identifier("dataChannelIdentifier"),
|
2016-10-24 04:00:05 -07:00
|
|
|
state("state"),
|
|
|
|
|
messages_sent("messagesSent"),
|
|
|
|
|
bytes_sent("bytesSent"),
|
|
|
|
|
messages_received("messagesReceived"),
|
|
|
|
|
bytes_received("bytesReceived") {}
|
|
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCDataChannelStats::RTCDataChannelStats(const RTCDataChannelStats& other) =
|
|
|
|
|
default;
|
2016-10-24 04:00:05 -07:00
|
|
|
|
|
|
|
|
RTCDataChannelStats::~RTCDataChannelStats() {}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-10-11 14:54:49 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
|
|
|
|
|
&transport_id,
|
|
|
|
|
&local_candidate_id,
|
|
|
|
|
&remote_candidate_id,
|
|
|
|
|
&state,
|
|
|
|
|
&priority,
|
|
|
|
|
&nominated,
|
|
|
|
|
&writable,
|
2021-09-28 15:09:53 -07:00
|
|
|
&packets_sent,
|
|
|
|
|
&packets_received,
|
2016-10-11 14:54:49 -07:00
|
|
|
&bytes_sent,
|
|
|
|
|
&bytes_received,
|
2016-12-15 06:17:08 -08:00
|
|
|
&total_round_trip_time,
|
|
|
|
|
¤t_round_trip_time,
|
2016-10-11 14:54:49 -07:00
|
|
|
&available_outgoing_bitrate,
|
|
|
|
|
&available_incoming_bitrate,
|
|
|
|
|
&requests_received,
|
|
|
|
|
&requests_sent,
|
|
|
|
|
&responses_received,
|
|
|
|
|
&responses_sent,
|
|
|
|
|
&consent_requests_sent,
|
2021-09-28 15:09:53 -07:00
|
|
|
&packets_discarded_on_send,
|
2022-11-01 17:03:01 +01:00
|
|
|
&bytes_discarded_on_send,
|
|
|
|
|
&last_packet_received_timestamp,
|
|
|
|
|
&last_packet_sent_timestamp)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-11 14:54:49 -07:00
|
|
|
|
2023-01-02 13:20:45 +01:00
|
|
|
RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-10-11 14:54:49 -07:00
|
|
|
transport_id("transportId"),
|
|
|
|
|
local_candidate_id("localCandidateId"),
|
|
|
|
|
remote_candidate_id("remoteCandidateId"),
|
|
|
|
|
state("state"),
|
|
|
|
|
priority("priority"),
|
|
|
|
|
nominated("nominated"),
|
|
|
|
|
writable("writable"),
|
2021-09-28 15:09:53 -07:00
|
|
|
packets_sent("packetsSent"),
|
|
|
|
|
packets_received("packetsReceived"),
|
2016-10-11 14:54:49 -07:00
|
|
|
bytes_sent("bytesSent"),
|
|
|
|
|
bytes_received("bytesReceived"),
|
2016-12-15 06:17:08 -08:00
|
|
|
total_round_trip_time("totalRoundTripTime"),
|
|
|
|
|
current_round_trip_time("currentRoundTripTime"),
|
2016-10-11 14:54:49 -07:00
|
|
|
available_outgoing_bitrate("availableOutgoingBitrate"),
|
|
|
|
|
available_incoming_bitrate("availableIncomingBitrate"),
|
|
|
|
|
requests_received("requestsReceived"),
|
|
|
|
|
requests_sent("requestsSent"),
|
|
|
|
|
responses_received("responsesReceived"),
|
|
|
|
|
responses_sent("responsesSent"),
|
|
|
|
|
consent_requests_sent("consentRequestsSent"),
|
2021-09-28 15:09:53 -07:00
|
|
|
packets_discarded_on_send("packetsDiscardedOnSend"),
|
2022-11-01 17:03:01 +01:00
|
|
|
bytes_discarded_on_send("bytesDiscardedOnSend"),
|
|
|
|
|
last_packet_received_timestamp("lastPacketReceivedTimestamp"),
|
|
|
|
|
last_packet_sent_timestamp("lastPacketSentTimestamp") {}
|
2016-10-11 14:54:49 -07:00
|
|
|
|
|
|
|
|
RTCIceCandidatePairStats::RTCIceCandidatePairStats(
|
2022-10-11 13:04:03 +02:00
|
|
|
const RTCIceCandidatePairStats& other) = default;
|
2016-10-11 14:54:49 -07:00
|
|
|
|
|
|
|
|
RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2018-03-20 13:24:20 +01:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate",
|
2017-01-02 09:59:31 -08:00
|
|
|
&transport_id,
|
2017-01-02 04:46:15 -08:00
|
|
|
&is_remote,
|
2017-11-21 10:49:36 -08:00
|
|
|
&network_type,
|
2016-10-07 02:18:47 -07:00
|
|
|
&ip,
|
2021-03-22 13:22:54 +01:00
|
|
|
&address,
|
2016-10-07 02:18:47 -07:00
|
|
|
&port,
|
|
|
|
|
&protocol,
|
2018-09-27 14:40:08 +02:00
|
|
|
&relay_protocol,
|
2016-10-07 02:18:47 -07:00
|
|
|
&candidate_type,
|
|
|
|
|
&priority,
|
2022-03-02 11:17:36 +01:00
|
|
|
&url,
|
2022-09-27 10:23:09 +02:00
|
|
|
&foundation,
|
|
|
|
|
&related_address,
|
|
|
|
|
&related_port,
|
|
|
|
|
&username_fragment,
|
|
|
|
|
&tcp_type,
|
2022-03-02 11:17:36 +01:00
|
|
|
&vpn,
|
|
|
|
|
&network_adapter_type)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-07 02:18:47 -07:00
|
|
|
|
2023-01-02 13:20:45 +01:00
|
|
|
RTCIceCandidateStats::RTCIceCandidateStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp,
|
2017-11-21 10:49:36 -08:00
|
|
|
bool is_remote)
|
2023-01-04 15:17:42 +01:00
|
|
|
: RTCStats(std::move(id), timestamp),
|
2017-01-02 09:59:31 -08:00
|
|
|
transport_id("transportId"),
|
2017-01-02 04:46:15 -08:00
|
|
|
is_remote("isRemote", is_remote),
|
2017-11-21 10:49:36 -08:00
|
|
|
network_type("networkType"),
|
2016-10-07 02:18:47 -07:00
|
|
|
ip("ip"),
|
2021-03-22 13:22:54 +01:00
|
|
|
address("address"),
|
2016-10-07 02:18:47 -07:00
|
|
|
port("port"),
|
|
|
|
|
protocol("protocol"),
|
2018-09-27 14:40:08 +02:00
|
|
|
relay_protocol("relayProtocol"),
|
2016-10-07 02:18:47 -07:00
|
|
|
candidate_type("candidateType"),
|
|
|
|
|
priority("priority"),
|
2022-03-02 11:17:36 +01:00
|
|
|
url("url"),
|
2022-09-27 10:23:09 +02:00
|
|
|
foundation("foundation"),
|
|
|
|
|
related_address("relatedAddress"),
|
|
|
|
|
related_port("relatedPort"),
|
|
|
|
|
username_fragment("usernameFragment"),
|
|
|
|
|
tcp_type("tcpType"),
|
2022-03-02 11:17:36 +01:00
|
|
|
vpn("vpn"),
|
|
|
|
|
network_adapter_type("networkAdapterType") {}
|
2016-10-07 02:18:47 -07:00
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) =
|
|
|
|
|
default;
|
2016-10-07 02:18:47 -07:00
|
|
|
|
|
|
|
|
RTCIceCandidateStats::~RTCIceCandidateStats() {}
|
|
|
|
|
|
|
|
|
|
const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
|
|
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string id,
|
|
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCIceCandidateStats(std::move(id), timestamp, false) {}
|
2016-10-07 02:18:47 -07:00
|
|
|
|
2018-03-20 13:24:20 +01:00
|
|
|
std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const {
|
2022-09-06 11:55:31 +02:00
|
|
|
return std::make_unique<RTCLocalIceCandidateStats>(*this);
|
2018-03-20 13:24:20 +01:00
|
|
|
}
|
|
|
|
|
|
2016-10-07 02:18:47 -07:00
|
|
|
const char* RTCLocalIceCandidateStats::type() const {
|
|
|
|
|
return kType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
|
|
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string id,
|
|
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCIceCandidateStats(std::move(id), timestamp, true) {}
|
2016-10-07 02:18:47 -07:00
|
|
|
|
2018-03-20 13:24:20 +01:00
|
|
|
std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const {
|
2022-09-06 11:55:31 +02:00
|
|
|
return std::make_unique<RTCRemoteIceCandidateStats>(*this);
|
2018-03-20 13:24:20 +01:00
|
|
|
}
|
|
|
|
|
|
2016-10-07 02:18:47 -07:00
|
|
|
const char* RTCRemoteIceCandidateStats::type() const {
|
|
|
|
|
return kType;
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2022-10-19 11:06:58 +02:00
|
|
|
WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamStats, RTCStats, "stream",
|
2016-11-08 06:29:22 -08:00
|
|
|
&stream_identifier,
|
2019-02-20 10:13:16 -05:00
|
|
|
&track_ids)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats(
|
2023-01-02 13:20:45 +01:00
|
|
|
std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-11-08 06:29:22 -08:00
|
|
|
stream_identifier("streamIdentifier"),
|
|
|
|
|
track_ids("trackIds") {}
|
|
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats(
|
|
|
|
|
const DEPRECATED_RTCMediaStreamStats& other) = default;
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamStats::~DEPRECATED_RTCMediaStreamStats() {}
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2022-10-19 11:06:58 +02:00
|
|
|
WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamTrackStats, RTCStats, "track",
|
2017-07-14 12:17:49 -07:00
|
|
|
&track_identifier,
|
2019-05-22 15:49:42 +02:00
|
|
|
&media_source_id,
|
2017-07-14 12:17:49 -07:00
|
|
|
&remote_source,
|
|
|
|
|
&ended,
|
|
|
|
|
&detached,
|
|
|
|
|
&kind,
|
2017-10-02 12:00:34 +02:00
|
|
|
&jitter_buffer_delay,
|
2019-01-15 15:46:29 +01:00
|
|
|
&jitter_buffer_emitted_count,
|
2017-07-14 12:17:49 -07:00
|
|
|
&frame_width,
|
|
|
|
|
&frame_height,
|
|
|
|
|
&frames_sent,
|
2018-02-28 16:35:03 +01:00
|
|
|
&huge_frames_sent,
|
2017-07-14 12:17:49 -07:00
|
|
|
&frames_received,
|
|
|
|
|
&frames_decoded,
|
|
|
|
|
&frames_dropped,
|
|
|
|
|
&audio_level,
|
|
|
|
|
&total_audio_energy,
|
|
|
|
|
&echo_return_loss,
|
2017-08-24 17:15:13 -07:00
|
|
|
&echo_return_loss_enhancement,
|
|
|
|
|
&total_samples_received,
|
|
|
|
|
&total_samples_duration,
|
2017-09-18 09:28:20 +02:00
|
|
|
&concealed_samples,
|
2019-08-21 12:09:51 +02:00
|
|
|
&silent_concealed_samples,
|
2018-11-22 17:21:10 +01:00
|
|
|
&concealment_events,
|
2019-08-21 12:09:51 +02:00
|
|
|
&inserted_samples_for_deceleration,
|
2022-10-31 16:31:40 +01:00
|
|
|
&removed_samples_for_acceleration)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats(
|
2023-01-02 13:20:45 +01:00
|
|
|
std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp,
|
2022-10-19 11:06:58 +02:00
|
|
|
const char* kind)
|
2023-01-04 15:17:42 +01:00
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-11-08 06:29:22 -08:00
|
|
|
track_identifier("trackIdentifier"),
|
2019-05-22 15:49:42 +02:00
|
|
|
media_source_id("mediaSourceId"),
|
2016-11-08 06:29:22 -08:00
|
|
|
remote_source("remoteSource"),
|
|
|
|
|
ended("ended"),
|
|
|
|
|
detached("detached"),
|
2017-01-17 02:53:23 -08:00
|
|
|
kind("kind", kind),
|
2017-10-02 12:00:34 +02:00
|
|
|
jitter_buffer_delay("jitterBufferDelay"),
|
2019-01-15 15:46:29 +01:00
|
|
|
jitter_buffer_emitted_count("jitterBufferEmittedCount"),
|
2016-11-08 06:29:22 -08:00
|
|
|
frame_width("frameWidth"),
|
|
|
|
|
frame_height("frameHeight"),
|
|
|
|
|
frames_sent("framesSent"),
|
2018-02-28 16:35:03 +01:00
|
|
|
huge_frames_sent("hugeFramesSent"),
|
2016-11-08 06:29:22 -08:00
|
|
|
frames_received("framesReceived"),
|
|
|
|
|
frames_decoded("framesDecoded"),
|
|
|
|
|
frames_dropped("framesDropped"),
|
|
|
|
|
audio_level("audioLevel"),
|
2017-07-14 12:17:49 -07:00
|
|
|
total_audio_energy("totalAudioEnergy"),
|
2016-11-08 06:29:22 -08:00
|
|
|
echo_return_loss("echoReturnLoss"),
|
2017-08-24 17:15:13 -07:00
|
|
|
echo_return_loss_enhancement("echoReturnLossEnhancement"),
|
|
|
|
|
total_samples_received("totalSamplesReceived"),
|
|
|
|
|
total_samples_duration("totalSamplesDuration"),
|
2017-09-18 09:28:20 +02:00
|
|
|
concealed_samples("concealedSamples"),
|
2019-04-30 09:45:21 +02:00
|
|
|
silent_concealed_samples("silentConcealedSamples"),
|
2018-11-22 17:21:10 +01:00
|
|
|
concealment_events("concealmentEvents"),
|
2019-04-30 09:45:21 +02:00
|
|
|
inserted_samples_for_deceleration("insertedSamplesForDeceleration"),
|
2022-10-31 16:31:40 +01:00
|
|
|
removed_samples_for_acceleration("removedSamplesForAcceleration") {
|
2017-01-17 02:53:23 -08:00
|
|
|
RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio ||
|
|
|
|
|
kind == RTCMediaStreamTrackKind::kVideo);
|
2016-11-08 06:29:22 -08:00
|
|
|
}
|
|
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats(
|
|
|
|
|
const DEPRECATED_RTCMediaStreamTrackStats& other) = default;
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2022-10-19 11:06:58 +02:00
|
|
|
DEPRECATED_RTCMediaStreamTrackStats::~DEPRECATED_RTCMediaStreamTrackStats() {}
|
2016-11-08 06:29:22 -08:00
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-10-24 04:00:05 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
|
|
|
|
|
&data_channels_opened,
|
2019-02-20 10:13:16 -05:00
|
|
|
&data_channels_closed)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-03 14:16:56 -07:00
|
|
|
|
2023-01-02 13:20:45 +01:00
|
|
|
RTCPeerConnectionStats::RTCPeerConnectionStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-10-24 04:00:05 -07:00
|
|
|
data_channels_opened("dataChannelsOpened"),
|
|
|
|
|
data_channels_closed("dataChannelsClosed") {}
|
2016-10-03 14:16:56 -07:00
|
|
|
|
2016-10-24 04:00:05 -07:00
|
|
|
RTCPeerConnectionStats::RTCPeerConnectionStats(
|
2022-10-11 13:04:03 +02:00
|
|
|
const RTCPeerConnectionStats& other) = default;
|
2016-10-06 02:06:10 -07:00
|
|
|
|
2016-10-24 04:00:05 -07:00
|
|
|
RTCPeerConnectionStats::~RTCPeerConnectionStats() {}
|
2016-10-06 02:06:10 -07:00
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2023-03-01 08:28:53 +01:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCRtpStreamStats, RTCStats, "rtp",
|
2016-11-01 01:50:46 -07:00
|
|
|
&ssrc,
|
2018-08-28 14:55:03 +02:00
|
|
|
&kind,
|
2017-01-27 06:35:16 -08:00
|
|
|
&track_id,
|
2016-11-01 01:50:46 -07:00
|
|
|
&transport_id,
|
|
|
|
|
&codec_id,
|
2021-03-09 09:25:28 -08:00
|
|
|
&media_type)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-01 08:28:53 +01:00
|
|
|
RTCRtpStreamStats::RTCRtpStreamStats(std::string id, Timestamp timestamp)
|
2023-01-04 15:17:42 +01:00
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-11-01 01:50:46 -07:00
|
|
|
ssrc("ssrc"),
|
2018-08-28 14:55:03 +02:00
|
|
|
kind("kind"),
|
2017-01-27 06:35:16 -08:00
|
|
|
track_id("trackId"),
|
2016-11-01 01:50:46 -07:00
|
|
|
transport_id("transportId"),
|
|
|
|
|
codec_id("codecId"),
|
2021-03-09 09:25:28 -08:00
|
|
|
media_type("mediaType") {}
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-01 08:28:53 +01:00
|
|
|
RTCRtpStreamStats::RTCRtpStreamStats(const RTCRtpStreamStats& other) = default;
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-01 08:28:53 +01:00
|
|
|
RTCRtpStreamStats::~RTCRtpStreamStats() {}
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-11-01 03:00:17 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
2023-03-01 08:28:53 +01:00
|
|
|
RTCReceivedRtpStreamStats, RTCRtpStreamStats, "received-rtp",
|
2021-03-09 09:25:28 -08:00
|
|
|
&jitter,
|
2022-10-03 17:26:41 +02:00
|
|
|
&packets_lost)
|
2021-03-09 09:25:28 -08:00
|
|
|
// clang-format on
|
|
|
|
|
|
2023-01-02 13:20:45 +01:00
|
|
|
RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
2023-03-01 08:28:53 +01:00
|
|
|
: RTCRtpStreamStats(std::move(id), timestamp),
|
2021-03-09 09:25:28 -08:00
|
|
|
jitter("jitter"),
|
2022-10-03 17:26:41 +02:00
|
|
|
packets_lost("packetsLost") {}
|
2021-03-09 09:25:28 -08:00
|
|
|
|
|
|
|
|
RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(
|
2022-10-11 13:04:03 +02:00
|
|
|
const RTCReceivedRtpStreamStats& other) = default;
|
2021-03-09 09:25:28 -08:00
|
|
|
|
|
|
|
|
RTCReceivedRtpStreamStats::~RTCReceivedRtpStreamStats() {}
|
|
|
|
|
|
2021-03-23 17:23:04 +01:00
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
2023-03-01 08:28:53 +01:00
|
|
|
RTCSentRtpStreamStats, RTCRtpStreamStats, "sent-rtp",
|
2021-03-23 17:23:04 +01:00
|
|
|
&packets_sent,
|
|
|
|
|
&bytes_sent)
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
2023-01-02 13:20:45 +01:00
|
|
|
RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
2023-03-01 08:28:53 +01:00
|
|
|
: RTCRtpStreamStats(std::move(id), timestamp),
|
2021-03-23 17:23:04 +01:00
|
|
|
packets_sent("packetsSent"),
|
|
|
|
|
bytes_sent("bytesSent") {}
|
|
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCSentRtpStreamStats::RTCSentRtpStreamStats(
|
|
|
|
|
const RTCSentRtpStreamStats& other) = default;
|
2021-03-23 17:23:04 +01:00
|
|
|
|
|
|
|
|
RTCSentRtpStreamStats::~RTCSentRtpStreamStats() {}
|
|
|
|
|
|
2021-03-09 09:25:28 -08:00
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCInboundRtpStreamStats, RTCReceivedRtpStreamStats, "inbound-rtp",
|
2022-06-16 16:55:31 +02:00
|
|
|
&track_identifier,
|
2022-06-16 17:07:33 +02:00
|
|
|
&mid,
|
2021-03-23 17:23:04 +01:00
|
|
|
&remote_id,
|
2016-11-01 03:00:17 -07:00
|
|
|
&packets_received,
|
2022-10-03 17:26:41 +02:00
|
|
|
&packets_discarded,
|
2020-01-28 11:15:35 +01:00
|
|
|
&fec_packets_received,
|
|
|
|
|
&fec_packets_discarded,
|
2016-11-01 03:00:17 -07:00
|
|
|
&bytes_received,
|
2019-10-09 15:01:33 +02:00
|
|
|
&header_bytes_received,
|
2019-04-15 17:32:00 +02:00
|
|
|
&last_packet_received_timestamp,
|
2020-07-06 14:18:07 +03:00
|
|
|
&jitter_buffer_delay,
|
2022-07-04 14:16:39 +02:00
|
|
|
&jitter_buffer_target_delay,
|
2022-07-19 16:33:10 +02:00
|
|
|
&jitter_buffer_minimum_delay,
|
2020-07-06 14:18:07 +03:00
|
|
|
&jitter_buffer_emitted_count,
|
|
|
|
|
&total_samples_received,
|
|
|
|
|
&concealed_samples,
|
|
|
|
|
&silent_concealed_samples,
|
|
|
|
|
&concealment_events,
|
|
|
|
|
&inserted_samples_for_deceleration,
|
|
|
|
|
&removed_samples_for_acceleration,
|
|
|
|
|
&audio_level,
|
|
|
|
|
&total_audio_energy,
|
|
|
|
|
&total_samples_duration,
|
2023-01-19 15:04:54 +01:00
|
|
|
&playout_id,
|
2022-04-25 12:21:30 +02:00
|
|
|
&frames_received,
|
2020-07-06 14:18:07 +03:00
|
|
|
&frame_width,
|
|
|
|
|
&frame_height,
|
|
|
|
|
&frames_per_second,
|
2019-04-09 13:59:31 +02:00
|
|
|
&frames_decoded,
|
2019-06-27 14:29:34 +02:00
|
|
|
&key_frames_decoded,
|
2020-07-06 14:18:07 +03:00
|
|
|
&frames_dropped,
|
2019-07-01 10:07:50 +02:00
|
|
|
&total_decode_time,
|
2022-04-25 12:21:30 +02:00
|
|
|
&total_processing_delay,
|
2022-05-05 15:55:36 +02:00
|
|
|
&total_assembly_time,
|
|
|
|
|
&frames_assembled_from_multiple_packets,
|
2019-11-25 10:25:42 +01:00
|
|
|
&total_inter_frame_delay,
|
|
|
|
|
&total_squared_inter_frame_delay,
|
2022-10-06 11:59:05 +02:00
|
|
|
&pause_count,
|
|
|
|
|
&total_pauses_duration,
|
|
|
|
|
&freeze_count,
|
|
|
|
|
&total_freezes_duration,
|
2019-08-16 13:09:51 +02:00
|
|
|
&content_type,
|
2019-10-22 15:23:44 +02:00
|
|
|
&estimated_playout_timestamp,
|
2021-03-09 09:25:28 -08:00
|
|
|
&decoder_implementation,
|
|
|
|
|
&fir_count,
|
|
|
|
|
&pli_count,
|
|
|
|
|
&nack_count,
|
2022-05-30 12:37:04 +02:00
|
|
|
&qp_sum,
|
2022-10-19 17:50:09 +02:00
|
|
|
&goog_timing_frame_info,
|
2022-10-31 11:03:10 +00:00
|
|
|
&power_efficient_decoder,
|
2022-10-06 13:37:11 +02:00
|
|
|
&jitter_buffer_flushes,
|
|
|
|
|
&delayed_packet_outage_samples,
|
|
|
|
|
&relative_packet_arrival_delay,
|
|
|
|
|
&interruption_count,
|
|
|
|
|
&total_interruption_duration,
|
2022-05-30 12:37:04 +02:00
|
|
|
&min_playout_delay)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-01 03:00:17 -07:00
|
|
|
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCInboundRtpStreamStats::RTCInboundRtpStreamStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCReceivedRtpStreamStats(std::move(id), timestamp),
|
2023-01-19 15:04:54 +01:00
|
|
|
playout_id("playoutId"),
|
2022-06-16 16:55:31 +02:00
|
|
|
track_identifier("trackIdentifier"),
|
2022-06-16 17:07:33 +02:00
|
|
|
mid("mid"),
|
2021-03-23 17:23:04 +01:00
|
|
|
remote_id("remoteId"),
|
2016-11-01 03:00:17 -07:00
|
|
|
packets_received("packetsReceived"),
|
2022-10-03 17:26:41 +02:00
|
|
|
packets_discarded("packetsDiscarded"),
|
2019-04-30 09:45:21 +02:00
|
|
|
fec_packets_received("fecPacketsReceived"),
|
|
|
|
|
fec_packets_discarded("fecPacketsDiscarded"),
|
2016-11-01 03:00:17 -07:00
|
|
|
bytes_received("bytesReceived"),
|
2019-10-09 15:01:33 +02:00
|
|
|
header_bytes_received("headerBytesReceived"),
|
2019-04-15 17:32:00 +02:00
|
|
|
last_packet_received_timestamp("lastPacketReceivedTimestamp"),
|
2020-07-06 14:18:07 +03:00
|
|
|
jitter_buffer_delay("jitterBufferDelay"),
|
2022-07-04 14:16:39 +02:00
|
|
|
jitter_buffer_target_delay("jitterBufferTargetDelay"),
|
2022-07-19 16:33:10 +02:00
|
|
|
jitter_buffer_minimum_delay("jitterBufferMinimumDelay"),
|
2020-07-06 14:18:07 +03:00
|
|
|
jitter_buffer_emitted_count("jitterBufferEmittedCount"),
|
|
|
|
|
total_samples_received("totalSamplesReceived"),
|
|
|
|
|
concealed_samples("concealedSamples"),
|
|
|
|
|
silent_concealed_samples("silentConcealedSamples"),
|
|
|
|
|
concealment_events("concealmentEvents"),
|
|
|
|
|
inserted_samples_for_deceleration("insertedSamplesForDeceleration"),
|
|
|
|
|
removed_samples_for_acceleration("removedSamplesForAcceleration"),
|
|
|
|
|
audio_level("audioLevel"),
|
|
|
|
|
total_audio_energy("totalAudioEnergy"),
|
|
|
|
|
total_samples_duration("totalSamplesDuration"),
|
2022-04-25 12:21:30 +02:00
|
|
|
frames_received("framesReceived"),
|
2020-07-06 14:18:07 +03:00
|
|
|
frame_width("frameWidth"),
|
|
|
|
|
frame_height("frameHeight"),
|
|
|
|
|
frames_per_second("framesPerSecond"),
|
2019-04-09 13:59:31 +02:00
|
|
|
frames_decoded("framesDecoded"),
|
2019-06-27 14:29:34 +02:00
|
|
|
key_frames_decoded("keyFramesDecoded"),
|
2020-07-06 14:18:07 +03:00
|
|
|
frames_dropped("framesDropped"),
|
2019-07-01 10:07:50 +02:00
|
|
|
total_decode_time("totalDecodeTime"),
|
2022-04-25 12:21:30 +02:00
|
|
|
total_processing_delay("totalProcessingDelay"),
|
2022-05-05 15:55:36 +02:00
|
|
|
total_assembly_time("totalAssemblyTime"),
|
|
|
|
|
frames_assembled_from_multiple_packets(
|
|
|
|
|
"framesAssembledFromMultiplePackets"),
|
2019-11-25 10:25:42 +01:00
|
|
|
total_inter_frame_delay("totalInterFrameDelay"),
|
|
|
|
|
total_squared_inter_frame_delay("totalSquaredInterFrameDelay"),
|
2022-10-06 11:59:05 +02:00
|
|
|
pause_count("pauseCount"),
|
|
|
|
|
total_pauses_duration("totalPausesDuration"),
|
|
|
|
|
freeze_count("freezeCount"),
|
|
|
|
|
total_freezes_duration("totalFreezesDuration"),
|
2019-08-16 13:09:51 +02:00
|
|
|
content_type("contentType"),
|
2019-10-22 15:23:44 +02:00
|
|
|
estimated_playout_timestamp("estimatedPlayoutTimestamp"),
|
2021-03-09 09:25:28 -08:00
|
|
|
decoder_implementation("decoderImplementation"),
|
|
|
|
|
fir_count("firCount"),
|
|
|
|
|
pli_count("pliCount"),
|
|
|
|
|
nack_count("nackCount"),
|
2022-05-30 12:37:04 +02:00
|
|
|
qp_sum("qpSum"),
|
2022-10-19 17:50:09 +02:00
|
|
|
goog_timing_frame_info("googTimingFrameInfo"),
|
2022-10-31 11:03:10 +00:00
|
|
|
power_efficient_decoder("powerEfficientDecoder"),
|
2022-10-06 13:37:11 +02:00
|
|
|
jitter_buffer_flushes(
|
|
|
|
|
"jitterBufferFlushes",
|
|
|
|
|
{NonStandardGroupId::kRtcAudioJitterBufferMaxPackets}),
|
|
|
|
|
delayed_packet_outage_samples(
|
|
|
|
|
"delayedPacketOutageSamples",
|
|
|
|
|
{NonStandardGroupId::kRtcAudioJitterBufferMaxPackets,
|
|
|
|
|
NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}),
|
|
|
|
|
relative_packet_arrival_delay(
|
|
|
|
|
"relativePacketArrivalDelay",
|
|
|
|
|
{NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}),
|
|
|
|
|
interruption_count("interruptionCount"),
|
|
|
|
|
total_interruption_duration("totalInterruptionDuration"),
|
2022-05-30 12:37:04 +02:00
|
|
|
min_playout_delay("minPlayoutDelay") {}
|
2016-11-01 03:00:17 -07:00
|
|
|
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCInboundRtpStreamStats::RTCInboundRtpStreamStats(
|
|
|
|
|
const RTCInboundRtpStreamStats& other) = default;
|
|
|
|
|
RTCInboundRtpStreamStats::~RTCInboundRtpStreamStats() {}
|
2016-11-01 03:00:17 -07:00
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-11-01 01:50:46 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCOutboundRtpStreamStats, RTCSentRtpStreamStats, "outbound-rtp",
|
2019-05-22 15:49:42 +02:00
|
|
|
&media_source_id,
|
2019-12-19 13:27:27 +01:00
|
|
|
&remote_id,
|
2022-06-16 17:07:33 +02:00
|
|
|
&mid,
|
Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce33a6ccdd11b545b11ba68e985c2a65d.
Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".
Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839dac7d9d18eba8d365188fa94831e0b1.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}
TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 15:54:46 +02:00
|
|
|
&rid,
|
2019-04-17 13:51:53 +02:00
|
|
|
&retransmitted_packets_sent,
|
2019-10-09 15:01:33 +02:00
|
|
|
&header_bytes_sent,
|
2019-04-17 13:51:53 +02:00
|
|
|
&retransmitted_bytes_sent,
|
2016-11-01 01:50:46 -07:00
|
|
|
&target_bitrate,
|
2019-04-08 16:14:23 +02:00
|
|
|
&frames_encoded,
|
2019-06-27 14:29:34 +02:00
|
|
|
&key_frames_encoded,
|
2019-04-09 13:59:31 +02:00
|
|
|
&total_encode_time,
|
2019-05-20 15:15:38 +02:00
|
|
|
&total_encoded_bytes_target,
|
Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce33a6ccdd11b545b11ba68e985c2a65d.
Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".
Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839dac7d9d18eba8d365188fa94831e0b1.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}
TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 15:54:46 +02:00
|
|
|
&frame_width,
|
|
|
|
|
&frame_height,
|
|
|
|
|
&frames_per_second,
|
|
|
|
|
&frames_sent,
|
|
|
|
|
&huge_frames_sent,
|
2019-05-16 18:38:20 +02:00
|
|
|
&total_packet_send_delay,
|
2019-05-28 17:42:38 +02:00
|
|
|
&quality_limitation_reason,
|
2021-05-28 21:32:04 +09:00
|
|
|
&quality_limitation_durations,
|
2019-09-09 11:26:45 +02:00
|
|
|
&quality_limitation_resolution_changes,
|
2019-08-16 13:09:51 +02:00
|
|
|
&content_type,
|
2021-03-09 09:25:28 -08:00
|
|
|
&encoder_implementation,
|
|
|
|
|
&fir_count,
|
|
|
|
|
&pli_count,
|
|
|
|
|
&nack_count,
|
2022-07-28 12:41:00 +02:00
|
|
|
&qp_sum,
|
2022-10-31 11:03:10 +00:00
|
|
|
&active,
|
2022-12-06 10:09:10 +00:00
|
|
|
&power_efficient_encoder,
|
|
|
|
|
&scalability_mode)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCOutboundRtpStreamStats::RTCOutboundRtpStreamStats(std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
2023-03-01 08:28:53 +01:00
|
|
|
: RTCSentRtpStreamStats(std::move(id), timestamp),
|
2019-05-22 15:49:42 +02:00
|
|
|
media_source_id("mediaSourceId"),
|
2019-12-19 13:27:27 +01:00
|
|
|
remote_id("remoteId"),
|
2022-06-16 17:07:33 +02:00
|
|
|
mid("mid"),
|
Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce33a6ccdd11b545b11ba68e985c2a65d.
Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".
Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839dac7d9d18eba8d365188fa94831e0b1.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}
TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 15:54:46 +02:00
|
|
|
rid("rid"),
|
2019-04-17 13:51:53 +02:00
|
|
|
retransmitted_packets_sent("retransmittedPacketsSent"),
|
2019-10-09 15:01:33 +02:00
|
|
|
header_bytes_sent("headerBytesSent"),
|
2019-04-17 13:51:53 +02:00
|
|
|
retransmitted_bytes_sent("retransmittedBytesSent"),
|
2016-11-01 01:50:46 -07:00
|
|
|
target_bitrate("targetBitrate"),
|
2019-04-08 16:14:23 +02:00
|
|
|
frames_encoded("framesEncoded"),
|
2019-06-27 14:29:34 +02:00
|
|
|
key_frames_encoded("keyFramesEncoded"),
|
2019-04-09 13:59:31 +02:00
|
|
|
total_encode_time("totalEncodeTime"),
|
2019-05-20 15:15:38 +02:00
|
|
|
total_encoded_bytes_target("totalEncodedBytesTarget"),
|
Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce33a6ccdd11b545b11ba68e985c2a65d.
Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".
Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839dac7d9d18eba8d365188fa94831e0b1.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}
TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
# Not skipping CQ checks because this is a reland.
Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 15:54:46 +02:00
|
|
|
frame_width("frameWidth"),
|
|
|
|
|
frame_height("frameHeight"),
|
|
|
|
|
frames_per_second("framesPerSecond"),
|
|
|
|
|
frames_sent("framesSent"),
|
|
|
|
|
huge_frames_sent("hugeFramesSent"),
|
2019-05-16 18:38:20 +02:00
|
|
|
total_packet_send_delay("totalPacketSendDelay"),
|
2019-05-28 17:42:38 +02:00
|
|
|
quality_limitation_reason("qualityLimitationReason"),
|
2021-05-28 21:32:04 +09:00
|
|
|
quality_limitation_durations("qualityLimitationDurations"),
|
2019-09-09 11:26:45 +02:00
|
|
|
quality_limitation_resolution_changes(
|
|
|
|
|
"qualityLimitationResolutionChanges"),
|
2019-08-16 13:09:51 +02:00
|
|
|
content_type("contentType"),
|
2021-03-09 09:25:28 -08:00
|
|
|
encoder_implementation("encoderImplementation"),
|
|
|
|
|
fir_count("firCount"),
|
|
|
|
|
pli_count("pliCount"),
|
|
|
|
|
nack_count("nackCount"),
|
2022-07-28 12:41:00 +02:00
|
|
|
qp_sum("qpSum"),
|
2022-10-31 11:03:10 +00:00
|
|
|
active("active"),
|
2022-12-06 10:09:10 +00:00
|
|
|
power_efficient_encoder("powerEfficientEncoder"),
|
|
|
|
|
scalability_mode("scalabilityMode") {}
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCOutboundRtpStreamStats::RTCOutboundRtpStreamStats(
|
|
|
|
|
const RTCOutboundRtpStreamStats& other) = default;
|
2016-11-01 01:50:46 -07:00
|
|
|
|
2023-03-07 09:53:59 +01:00
|
|
|
RTCOutboundRtpStreamStats::~RTCOutboundRtpStreamStats() {}
|
2016-11-01 01:50:46 -07:00
|
|
|
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
2021-03-23 15:18:55 +01:00
|
|
|
RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats,
|
|
|
|
|
"remote-inbound-rtp",
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
&local_id,
|
2021-02-28 23:36:03 -08:00
|
|
|
&round_trip_time,
|
2021-03-01 11:22:06 -08:00
|
|
|
&fraction_lost,
|
|
|
|
|
&total_round_trip_time,
|
|
|
|
|
&round_trip_time_measurements)
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
|
|
RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats(
|
2023-01-02 13:20:45 +01:00
|
|
|
std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCReceivedRtpStreamStats(std::move(id), timestamp),
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
local_id("localId"),
|
2021-02-28 23:36:03 -08:00
|
|
|
round_trip_time("roundTripTime"),
|
2021-03-01 11:22:06 -08:00
|
|
|
fraction_lost("fractionLost"),
|
|
|
|
|
total_round_trip_time("totalRoundTripTime"),
|
|
|
|
|
round_trip_time_measurements("roundTripTimeMeasurements") {}
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
|
|
|
|
|
RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats(
|
2022-10-11 13:04:03 +02:00
|
|
|
const RTCRemoteInboundRtpStreamStats& other) = default;
|
Implement RTCRemoteInboundRtpStreamStats for both audio and video.
This implements the essentials of RTCRemoteInboundRtpStreamStats. This
includes:
- ssrc
- transportId
- codecId
- packetsLost
- jitter
- localId
- roundTripTime
https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
The following members are not implemented because they require more
work...
- From RTCReceivedRtpStreamStats: packetsReceived, packetsDiscarded,
packetsRepaired, burstPacketsLost, burstPacketsDiscarded,
burstLossCount, burstDiscardCount, burstLossRate, burstDiscardRate,
gapLossRate and gapDiscardRate.
- From RTCRemoteInboundRtpStreamStats: fractionLost.
Bug: webrtc:10455, webrtc:10456
Change-Id: If2ab0da7105d8c93bba58e14aa93bd22ffe57f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138067
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28073}
2019-05-27 13:40:25 +02:00
|
|
|
|
|
|
|
|
RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {}
|
|
|
|
|
|
2021-03-23 17:23:04 +01:00
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(
|
|
|
|
|
RTCRemoteOutboundRtpStreamStats, RTCSentRtpStreamStats,
|
|
|
|
|
"remote-outbound-rtp",
|
|
|
|
|
&local_id,
|
|
|
|
|
&remote_timestamp,
|
2021-09-03 14:51:22 +00:00
|
|
|
&reports_sent,
|
|
|
|
|
&round_trip_time,
|
|
|
|
|
&round_trip_time_measurements,
|
|
|
|
|
&total_round_trip_time)
|
2021-03-23 17:23:04 +01:00
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
|
|
RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats(
|
2023-01-02 13:20:45 +01:00
|
|
|
std::string id,
|
2023-01-04 15:17:42 +01:00
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCSentRtpStreamStats(std::move(id), timestamp),
|
2021-03-23 17:23:04 +01:00
|
|
|
local_id("localId"),
|
|
|
|
|
remote_timestamp("remoteTimestamp"),
|
2021-09-03 14:51:22 +00:00
|
|
|
reports_sent("reportsSent"),
|
|
|
|
|
round_trip_time("roundTripTime"),
|
|
|
|
|
round_trip_time_measurements("roundTripTimeMeasurements"),
|
|
|
|
|
total_round_trip_time("totalRoundTripTime") {}
|
2021-03-23 17:23:04 +01:00
|
|
|
|
|
|
|
|
RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats(
|
2022-10-11 13:04:03 +02:00
|
|
|
const RTCRemoteOutboundRtpStreamStats& other) = default;
|
2021-03-23 17:23:04 +01:00
|
|
|
|
|
|
|
|
RTCRemoteOutboundRtpStreamStats::~RTCRemoteOutboundRtpStreamStats() {}
|
|
|
|
|
|
2019-05-22 15:49:42 +02:00
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source",
|
|
|
|
|
&track_identifier,
|
|
|
|
|
&kind)
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCMediaSourceStats::RTCMediaSourceStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2019-05-22 15:49:42 +02:00
|
|
|
track_identifier("trackIdentifier"),
|
|
|
|
|
kind("kind") {}
|
|
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCMediaSourceStats::RTCMediaSourceStats(const RTCMediaSourceStats& other) =
|
|
|
|
|
default;
|
2019-05-22 15:49:42 +02:00
|
|
|
|
|
|
|
|
RTCMediaSourceStats::~RTCMediaSourceStats() {}
|
|
|
|
|
|
|
|
|
|
// clang-format off
|
[getStats] Implement "media-source" audio levels, fixing Chrome bug.
Implements RTCAudioSourceStats members:
- audioLevel
- totalAudioEnergy
- totalSamplesDuration
In this CL description these are collectively referred to as the audio
levels.
The audio levels are removed from sending "track" stats (in Chrome,
these are now reported as undefined instead of 0).
Background:
For sending tracks, audio levels were always reported as 0 in Chrome
(https://crbug.com/736403), while audio levels were correctly reported
for receiving tracks. This problem affected the standard getStats() but
not the legacy getStats(), blocking some people from migrating. This
was likely not a problem in native third_party/webrtc code because the
delivery of audio frames from device to send-stream uses a different
code path outside of chromium.
A recent PR (https://github.com/w3c/webrtc-stats/pull/451) moved the
send-side audio levels to the RTCAudioSourceStats, while keeping the
receive-side audio levels on the "track" stats. This allows an
implementation to report the audio levels even if samples are not sent
onto the network (such as if an ICE connection has not been established
yet), reflecting some of the current implementation.
Changes:
1. Audio levels are added to RTCAudioSourceStats. Send-side audio
"track" stats are left undefined. Receive-side audio "track" stats
are not changed in this CL and continue to work.
2. Audio level computation is moved from the AudioState and
AudioTransportImpl to the AudioSendStream. This is because a) the
AudioTransportImpl::RecordedDataIsAvailable() code path is not
exercised in chromium, and b) audio levels should, per-spec, not be
calculated on a per-call basis, for which the AudioState is defined.
3. The audio level computation is now performed in
AudioSendStream::SendAudioData(), a code path used by both native
and chromium code.
4. Comments are added to document behavior of existing code, such as
AudioLevel and AudioSendStream::SendAudioData().
Note:
In this CL, just like before this CL, audio level is only calculated
after an AudioSendStream has been created. This means that before an
O/A negotiation, audio levels are unavailable.
According to spec, if we have an audio source, we should have audio
levels. An immediate solution to this would have been to calculate the
audio level at pc/rtp_sender.cc. The problem is that the
LocalAudioSinkAdapter::OnData() code path, while exercised in chromium,
is not exercised in native code. The issue of calculating audio levels
on a per-source bases rather than on a per-send stream basis is left to
https://crbug.com/webrtc/10771, an existing "media-source" bug.
This CL can be verified manually in Chrome at:
https://codepen.io/anon/pen/vqRGyq
Bug: chromium:736403, webrtc:10771
Change-Id: I8036cd9984f3b187c3177470a8c0d6670a201a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143789
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28480}
2019-07-03 17:11:10 +02:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source",
|
|
|
|
|
&audio_level,
|
|
|
|
|
&total_audio_energy,
|
2021-06-24 13:32:50 -07:00
|
|
|
&total_samples_duration,
|
|
|
|
|
&echo_return_loss,
|
|
|
|
|
&echo_return_loss_enhancement)
|
2019-05-22 15:49:42 +02:00
|
|
|
// clang-format on
|
|
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCAudioSourceStats::RTCAudioSourceStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCMediaSourceStats(std::move(id), timestamp),
|
[getStats] Implement "media-source" audio levels, fixing Chrome bug.
Implements RTCAudioSourceStats members:
- audioLevel
- totalAudioEnergy
- totalSamplesDuration
In this CL description these are collectively referred to as the audio
levels.
The audio levels are removed from sending "track" stats (in Chrome,
these are now reported as undefined instead of 0).
Background:
For sending tracks, audio levels were always reported as 0 in Chrome
(https://crbug.com/736403), while audio levels were correctly reported
for receiving tracks. This problem affected the standard getStats() but
not the legacy getStats(), blocking some people from migrating. This
was likely not a problem in native third_party/webrtc code because the
delivery of audio frames from device to send-stream uses a different
code path outside of chromium.
A recent PR (https://github.com/w3c/webrtc-stats/pull/451) moved the
send-side audio levels to the RTCAudioSourceStats, while keeping the
receive-side audio levels on the "track" stats. This allows an
implementation to report the audio levels even if samples are not sent
onto the network (such as if an ICE connection has not been established
yet), reflecting some of the current implementation.
Changes:
1. Audio levels are added to RTCAudioSourceStats. Send-side audio
"track" stats are left undefined. Receive-side audio "track" stats
are not changed in this CL and continue to work.
2. Audio level computation is moved from the AudioState and
AudioTransportImpl to the AudioSendStream. This is because a) the
AudioTransportImpl::RecordedDataIsAvailable() code path is not
exercised in chromium, and b) audio levels should, per-spec, not be
calculated on a per-call basis, for which the AudioState is defined.
3. The audio level computation is now performed in
AudioSendStream::SendAudioData(), a code path used by both native
and chromium code.
4. Comments are added to document behavior of existing code, such as
AudioLevel and AudioSendStream::SendAudioData().
Note:
In this CL, just like before this CL, audio level is only calculated
after an AudioSendStream has been created. This means that before an
O/A negotiation, audio levels are unavailable.
According to spec, if we have an audio source, we should have audio
levels. An immediate solution to this would have been to calculate the
audio level at pc/rtp_sender.cc. The problem is that the
LocalAudioSinkAdapter::OnData() code path, while exercised in chromium,
is not exercised in native code. The issue of calculating audio levels
on a per-source bases rather than on a per-send stream basis is left to
https://crbug.com/webrtc/10771, an existing "media-source" bug.
This CL can be verified manually in Chrome at:
https://codepen.io/anon/pen/vqRGyq
Bug: chromium:736403, webrtc:10771
Change-Id: I8036cd9984f3b187c3177470a8c0d6670a201a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143789
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28480}
2019-07-03 17:11:10 +02:00
|
|
|
audio_level("audioLevel"),
|
|
|
|
|
total_audio_energy("totalAudioEnergy"),
|
2021-06-24 13:32:50 -07:00
|
|
|
total_samples_duration("totalSamplesDuration"),
|
|
|
|
|
echo_return_loss("echoReturnLoss"),
|
|
|
|
|
echo_return_loss_enhancement("echoReturnLossEnhancement") {}
|
2019-05-22 15:49:42 +02:00
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) =
|
|
|
|
|
default;
|
2019-05-22 15:49:42 +02:00
|
|
|
|
|
|
|
|
RTCAudioSourceStats::~RTCAudioSourceStats() {}
|
|
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source",
|
|
|
|
|
&width,
|
|
|
|
|
&height,
|
|
|
|
|
&frames,
|
|
|
|
|
&frames_per_second)
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCVideoSourceStats::RTCVideoSourceStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCMediaSourceStats(std::move(id), timestamp),
|
2019-05-22 15:49:42 +02:00
|
|
|
width("width"),
|
|
|
|
|
height("height"),
|
|
|
|
|
frames("frames"),
|
|
|
|
|
frames_per_second("framesPerSecond") {}
|
|
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCVideoSourceStats::RTCVideoSourceStats(const RTCVideoSourceStats& other) =
|
|
|
|
|
default;
|
2019-05-22 15:49:42 +02:00
|
|
|
|
|
|
|
|
RTCVideoSourceStats::~RTCVideoSourceStats() {}
|
|
|
|
|
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format off
|
2016-10-24 04:00:05 -07:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
|
2016-10-18 12:48:31 -07:00
|
|
|
&bytes_sent,
|
2020-07-06 16:06:37 +02:00
|
|
|
&packets_sent,
|
2016-10-24 04:00:05 -07:00
|
|
|
&bytes_received,
|
2020-07-06 16:06:37 +02:00
|
|
|
&packets_received,
|
2016-10-24 04:00:05 -07:00
|
|
|
&rtcp_transport_stats_id,
|
2017-01-16 07:38:02 -08:00
|
|
|
&dtls_state,
|
2016-10-24 04:00:05 -07:00
|
|
|
&selected_candidate_pair_id,
|
|
|
|
|
&local_certificate_id,
|
2019-08-28 08:10:27 +02:00
|
|
|
&remote_certificate_id,
|
2019-10-28 09:51:17 +01:00
|
|
|
&tls_version,
|
|
|
|
|
&dtls_cipher,
|
2022-04-22 15:46:24 +02:00
|
|
|
&dtls_role,
|
2019-10-28 09:51:17 +01:00
|
|
|
&srtp_cipher,
|
2022-05-04 18:58:26 +02:00
|
|
|
&selected_candidate_pair_changes,
|
2022-05-05 07:53:54 +02:00
|
|
|
&ice_role,
|
2022-05-09 17:43:31 +02:00
|
|
|
&ice_local_username_fragment,
|
|
|
|
|
&ice_state)
|
2017-08-18 09:40:25 -07:00
|
|
|
// clang-format on
|
2016-10-18 12:48:31 -07:00
|
|
|
|
2023-01-04 15:17:42 +01:00
|
|
|
RTCTransportStats::RTCTransportStats(std::string id, Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2016-10-18 12:48:31 -07:00
|
|
|
bytes_sent("bytesSent"),
|
2020-07-06 16:06:37 +02:00
|
|
|
packets_sent("packetsSent"),
|
2016-10-24 04:00:05 -07:00
|
|
|
bytes_received("bytesReceived"),
|
2020-07-06 16:06:37 +02:00
|
|
|
packets_received("packetsReceived"),
|
2016-10-24 04:00:05 -07:00
|
|
|
rtcp_transport_stats_id("rtcpTransportStatsId"),
|
2017-01-16 07:38:02 -08:00
|
|
|
dtls_state("dtlsState"),
|
2016-10-24 04:00:05 -07:00
|
|
|
selected_candidate_pair_id("selectedCandidatePairId"),
|
|
|
|
|
local_certificate_id("localCertificateId"),
|
2019-08-28 08:10:27 +02:00
|
|
|
remote_certificate_id("remoteCertificateId"),
|
2019-10-28 09:51:17 +01:00
|
|
|
tls_version("tlsVersion"),
|
|
|
|
|
dtls_cipher("dtlsCipher"),
|
2022-04-22 15:46:24 +02:00
|
|
|
dtls_role("dtlsRole"),
|
2019-10-28 09:51:17 +01:00
|
|
|
srtp_cipher("srtpCipher"),
|
2022-05-04 18:58:26 +02:00
|
|
|
selected_candidate_pair_changes("selectedCandidatePairChanges"),
|
2022-05-05 07:53:54 +02:00
|
|
|
ice_role("iceRole"),
|
2022-05-09 17:43:31 +02:00
|
|
|
ice_local_username_fragment("iceLocalUsernameFragment"),
|
|
|
|
|
ice_state("iceState") {}
|
2016-10-18 12:48:31 -07:00
|
|
|
|
2022-10-11 13:04:03 +02:00
|
|
|
RTCTransportStats::RTCTransportStats(const RTCTransportStats& other) = default;
|
2016-10-06 02:06:10 -07:00
|
|
|
|
2016-10-24 04:00:05 -07:00
|
|
|
RTCTransportStats::~RTCTransportStats() {}
|
2016-10-06 02:06:10 -07:00
|
|
|
|
2023-01-13 16:42:36 +01:00
|
|
|
RTCAudioPlayoutStats::RTCAudioPlayoutStats(const std::string& id,
|
|
|
|
|
Timestamp timestamp)
|
|
|
|
|
: RTCStats(std::move(id), timestamp),
|
2023-01-25 13:49:16 +01:00
|
|
|
kind("kind", "audio"),
|
2023-01-13 16:42:36 +01:00
|
|
|
synthesized_samples_duration("synthesizedSamplesDuration"),
|
|
|
|
|
synthesized_samples_events("synthesizedSamplesEvents"),
|
|
|
|
|
total_samples_duration("totalSamplesDuration"),
|
|
|
|
|
total_playout_delay("totalPlayoutDelay"),
|
|
|
|
|
total_samples_count("totalSamplesCount") {}
|
|
|
|
|
|
|
|
|
|
RTCAudioPlayoutStats::RTCAudioPlayoutStats(const RTCAudioPlayoutStats& other) =
|
|
|
|
|
default;
|
|
|
|
|
|
|
|
|
|
RTCAudioPlayoutStats::~RTCAudioPlayoutStats() {}
|
|
|
|
|
|
|
|
|
|
// clang-format off
|
2023-01-25 13:49:16 +01:00
|
|
|
WEBRTC_RTCSTATS_IMPL(RTCAudioPlayoutStats, RTCStats, "media-playout",
|
|
|
|
|
&kind,
|
2023-01-13 16:42:36 +01:00
|
|
|
&synthesized_samples_duration,
|
|
|
|
|
&synthesized_samples_events,
|
|
|
|
|
&total_samples_duration,
|
|
|
|
|
&total_playout_delay,
|
|
|
|
|
&total_samples_count)
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
2016-08-30 14:04:35 -07:00
|
|
|
} // namespace webrtc
|