api: use std::string in stats constructor
instead of const reference or rvalues. This follows the style guide: https://google.github.io/styleguide/cppguide.html#Rvalue_references BUG=webrtc:14807 Change-Id: I936b99146520815ae8105806409d46565fa83546 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289985 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Philipp Hancke <phancke@microsoft.com> Cr-Commit-Position: refs/heads/main@{#38996}
This commit is contained in:
parent
8bec181bfc
commit
7a5de44455
@ -55,9 +55,7 @@ class RTCStatsMemberInterface;
|
||||
// }
|
||||
class RTC_EXPORT RTCStats {
|
||||
public:
|
||||
RTCStats(const std::string& id, int64_t timestamp_us)
|
||||
: id_(id), timestamp_us_(timestamp_us) {}
|
||||
RTCStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCStats(std::string id, int64_t timestamp_us)
|
||||
: id_(std::move(id)), timestamp_us_(timestamp_us) {}
|
||||
virtual ~RTCStats() {}
|
||||
|
||||
|
||||
@ -120,8 +120,7 @@ class RTC_EXPORT RTCCertificateStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCCertificateStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCCertificateStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCCertificateStats(std::string id, int64_t timestamp_us);
|
||||
RTCCertificateStats(const RTCCertificateStats& other);
|
||||
~RTCCertificateStats() override;
|
||||
|
||||
@ -150,8 +149,7 @@ class RTC_EXPORT RTCCodecStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCCodecStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCCodecStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCCodecStats(std::string id, int64_t timestamp_us);
|
||||
RTCCodecStats(const RTCCodecStats& other);
|
||||
~RTCCodecStats() override;
|
||||
|
||||
@ -168,8 +166,7 @@ class RTC_EXPORT RTCDataChannelStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCDataChannelStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCDataChannelStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCDataChannelStats(std::string id, int64_t timestamp_us);
|
||||
RTCDataChannelStats(const RTCDataChannelStats& other);
|
||||
~RTCDataChannelStats() override;
|
||||
|
||||
@ -189,8 +186,7 @@ class RTC_EXPORT RTCIceCandidatePairStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCIceCandidatePairStats(std::string id, int64_t timestamp_us);
|
||||
RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
|
||||
~RTCIceCandidatePairStats() override;
|
||||
|
||||
@ -258,10 +254,7 @@ class RTC_EXPORT RTCIceCandidateStats : public RTCStats {
|
||||
RTCNonStandardStatsMember<std::string> network_adapter_type;
|
||||
|
||||
protected:
|
||||
RTCIceCandidateStats(const std::string& id,
|
||||
int64_t timestamp_us,
|
||||
bool is_remote);
|
||||
RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote);
|
||||
RTCIceCandidateStats(std::string id, int64_t timestamp_us, bool is_remote);
|
||||
};
|
||||
|
||||
// In the spec both local and remote varieties are of type RTCIceCandidateStats.
|
||||
@ -272,8 +265,7 @@ class RTC_EXPORT RTCIceCandidateStats : public RTCStats {
|
||||
class RTC_EXPORT RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
|
||||
public:
|
||||
static const char kType[];
|
||||
RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCLocalIceCandidateStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCLocalIceCandidateStats(std::string id, int64_t timestamp_us);
|
||||
std::unique_ptr<RTCStats> copy() const override;
|
||||
const char* type() const override;
|
||||
};
|
||||
@ -282,8 +274,7 @@ class RTC_EXPORT RTCRemoteIceCandidateStats final
|
||||
: public RTCIceCandidateStats {
|
||||
public:
|
||||
static const char kType[];
|
||||
RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCRemoteIceCandidateStats(std::string id, int64_t timestamp_us);
|
||||
std::unique_ptr<RTCStats> copy() const override;
|
||||
const char* type() const override;
|
||||
};
|
||||
@ -293,8 +284,7 @@ class RTC_EXPORT DEPRECATED_RTCMediaStreamStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
DEPRECATED_RTCMediaStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
DEPRECATED_RTCMediaStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
DEPRECATED_RTCMediaStreamStats(std::string id, int64_t timestamp_us);
|
||||
DEPRECATED_RTCMediaStreamStats(const DEPRECATED_RTCMediaStreamStats& other);
|
||||
~DEPRECATED_RTCMediaStreamStats() override;
|
||||
|
||||
@ -309,10 +299,7 @@ class RTC_EXPORT DEPRECATED_RTCMediaStreamTrackStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
DEPRECATED_RTCMediaStreamTrackStats(const std::string& id,
|
||||
int64_t timestamp_us,
|
||||
const char* kind);
|
||||
DEPRECATED_RTCMediaStreamTrackStats(std::string&& id,
|
||||
DEPRECATED_RTCMediaStreamTrackStats(std::string id,
|
||||
int64_t timestamp_us,
|
||||
const char* kind);
|
||||
DEPRECATED_RTCMediaStreamTrackStats(
|
||||
@ -358,8 +345,7 @@ class RTC_EXPORT RTCPeerConnectionStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCPeerConnectionStats(std::string id, int64_t timestamp_us);
|
||||
RTCPeerConnectionStats(const RTCPeerConnectionStats& other);
|
||||
~RTCPeerConnectionStats() override;
|
||||
|
||||
@ -386,8 +372,7 @@ class RTC_EXPORT RTCRTPStreamStats : public RTCStats {
|
||||
RTCStatsMember<std::string> media_type; // renamed to kind.
|
||||
|
||||
protected:
|
||||
RTCRTPStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCRTPStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCRTPStreamStats(std::string id, int64_t timestamp_us);
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/webrtc-stats/#receivedrtpstats-dict*
|
||||
@ -402,8 +387,7 @@ class RTC_EXPORT RTCReceivedRtpStreamStats : public RTCRTPStreamStats {
|
||||
RTCStatsMember<int32_t> packets_lost; // Signed per RFC 3550
|
||||
|
||||
protected:
|
||||
RTCReceivedRtpStreamStats(const std::string&& id, int64_t timestamp_us);
|
||||
RTCReceivedRtpStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCReceivedRtpStreamStats(std::string id, int64_t timestamp_us);
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict*
|
||||
@ -418,8 +402,7 @@ class RTC_EXPORT RTCSentRtpStreamStats : public RTCRTPStreamStats {
|
||||
RTCStatsMember<uint64_t> bytes_sent;
|
||||
|
||||
protected:
|
||||
RTCSentRtpStreamStats(const std::string&& id, int64_t timestamp_us);
|
||||
RTCSentRtpStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCSentRtpStreamStats(std::string id, int64_t timestamp_us);
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
|
||||
@ -428,8 +411,7 @@ class RTC_EXPORT RTCInboundRTPStreamStats final
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCInboundRTPStreamStats(std::string id, int64_t timestamp_us);
|
||||
RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other);
|
||||
~RTCInboundRTPStreamStats() override;
|
||||
|
||||
@ -516,8 +498,7 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCOutboundRTPStreamStats(std::string id, int64_t timestamp_us);
|
||||
RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other);
|
||||
~RTCOutboundRTPStreamStats() override;
|
||||
|
||||
@ -570,8 +551,7 @@ class RTC_EXPORT RTCRemoteInboundRtpStreamStats final
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCRemoteInboundRtpStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCRemoteInboundRtpStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCRemoteInboundRtpStreamStats(std::string id, int64_t timestamp_us);
|
||||
RTCRemoteInboundRtpStreamStats(const RTCRemoteInboundRtpStreamStats& other);
|
||||
~RTCRemoteInboundRtpStreamStats() override;
|
||||
|
||||
@ -588,8 +568,7 @@ class RTC_EXPORT RTCRemoteOutboundRtpStreamStats final
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCRemoteOutboundRtpStreamStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCRemoteOutboundRtpStreamStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCRemoteOutboundRtpStreamStats(std::string id, int64_t timestamp_us);
|
||||
RTCRemoteOutboundRtpStreamStats(const RTCRemoteOutboundRtpStreamStats& other);
|
||||
~RTCRemoteOutboundRtpStreamStats() override;
|
||||
|
||||
@ -613,8 +592,7 @@ class RTC_EXPORT RTCMediaSourceStats : public RTCStats {
|
||||
RTCStatsMember<std::string> kind;
|
||||
|
||||
protected:
|
||||
RTCMediaSourceStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCMediaSourceStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCMediaSourceStats(std::string id, int64_t timestamp_us);
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webrtc-stats/#dom-rtcaudiosourcestats
|
||||
@ -622,8 +600,7 @@ class RTC_EXPORT RTCAudioSourceStats final : public RTCMediaSourceStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCAudioSourceStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCAudioSourceStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCAudioSourceStats(std::string id, int64_t timestamp_us);
|
||||
RTCAudioSourceStats(const RTCAudioSourceStats& other);
|
||||
~RTCAudioSourceStats() override;
|
||||
|
||||
@ -639,8 +616,7 @@ class RTC_EXPORT RTCVideoSourceStats final : public RTCMediaSourceStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCVideoSourceStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCVideoSourceStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCVideoSourceStats(std::string id, int64_t timestamp_us);
|
||||
RTCVideoSourceStats(const RTCVideoSourceStats& other);
|
||||
~RTCVideoSourceStats() override;
|
||||
|
||||
@ -655,8 +631,7 @@ class RTC_EXPORT RTCTransportStats final : public RTCStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCTransportStats(const std::string& id, int64_t timestamp_us);
|
||||
RTCTransportStats(std::string&& id, int64_t timestamp_us);
|
||||
RTCTransportStats(std::string id, int64_t timestamp_us);
|
||||
RTCTransportStats(const RTCTransportStats& other);
|
||||
~RTCTransportStats() override;
|
||||
|
||||
|
||||
@ -89,11 +89,7 @@ WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
|
||||
&issuer_certificate_id)
|
||||
// clang-format on
|
||||
|
||||
RTCCertificateStats::RTCCertificateStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCCertificateStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCCertificateStats::RTCCertificateStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCCertificateStats::RTCCertificateStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
fingerprint("fingerprint"),
|
||||
fingerprint_algorithm("fingerprintAlgorithm"),
|
||||
@ -114,10 +110,7 @@ WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec",
|
||||
&sdp_fmtp_line)
|
||||
// clang-format on
|
||||
|
||||
RTCCodecStats::RTCCodecStats(const std::string& id, int64_t timestamp_us)
|
||||
: RTCCodecStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCCodecStats::RTCCodecStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCCodecStats::RTCCodecStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
transport_id("transportId"),
|
||||
payload_type("payloadType"),
|
||||
@ -142,11 +135,7 @@ WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
|
||||
&bytes_received)
|
||||
// clang-format on
|
||||
|
||||
RTCDataChannelStats::RTCDataChannelStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCDataChannelStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCDataChannelStats::RTCDataChannelStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCDataChannelStats::RTCDataChannelStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
label("label"),
|
||||
protocol("protocol"),
|
||||
@ -190,11 +179,7 @@ WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
|
||||
&last_packet_sent_timestamp)
|
||||
// clang-format on
|
||||
|
||||
RTCIceCandidatePairStats::RTCIceCandidatePairStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCIceCandidatePairStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string&& id,
|
||||
RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
transport_id("transportId"),
|
||||
@ -249,12 +234,7 @@ WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate",
|
||||
&network_adapter_type)
|
||||
// clang-format on
|
||||
|
||||
RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id,
|
||||
int64_t timestamp_us,
|
||||
bool is_remote)
|
||||
: RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {}
|
||||
|
||||
RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id,
|
||||
RTCIceCandidateStats::RTCIceCandidateStats(std::string id,
|
||||
int64_t timestamp_us,
|
||||
bool is_remote)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
@ -284,11 +264,7 @@ RTCIceCandidateStats::~RTCIceCandidateStats() {}
|
||||
|
||||
const char RTCLocalIceCandidateStats::kType[] = "local-candidate";
|
||||
|
||||
RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCIceCandidateStats(id, timestamp_us, false) {}
|
||||
|
||||
RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string&& id,
|
||||
RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCIceCandidateStats(std::move(id), timestamp_us, false) {}
|
||||
|
||||
@ -302,11 +278,7 @@ const char* RTCLocalIceCandidateStats::type() const {
|
||||
|
||||
const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate";
|
||||
|
||||
RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCIceCandidateStats(id, timestamp_us, true) {}
|
||||
|
||||
RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string&& id,
|
||||
RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCIceCandidateStats(std::move(id), timestamp_us, true) {}
|
||||
|
||||
@ -325,12 +297,7 @@ WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamStats, RTCStats, "stream",
|
||||
// clang-format on
|
||||
|
||||
DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats(
|
||||
const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: DEPRECATED_RTCMediaStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats(
|
||||
std::string&& id,
|
||||
std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
stream_identifier("streamIdentifier"),
|
||||
@ -372,14 +339,7 @@ WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamTrackStats, RTCStats, "track",
|
||||
// clang-format on
|
||||
|
||||
DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats(
|
||||
const std::string& id,
|
||||
int64_t timestamp_us,
|
||||
const char* kind)
|
||||
: DEPRECATED_RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) {
|
||||
}
|
||||
|
||||
DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats(
|
||||
std::string&& id,
|
||||
std::string id,
|
||||
int64_t timestamp_us,
|
||||
const char* kind)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
@ -424,11 +384,7 @@ WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
|
||||
&data_channels_closed)
|
||||
// clang-format on
|
||||
|
||||
RTCPeerConnectionStats::RTCPeerConnectionStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCPeerConnectionStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCPeerConnectionStats::RTCPeerConnectionStats(std::string&& id,
|
||||
RTCPeerConnectionStats::RTCPeerConnectionStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
data_channels_opened("dataChannelsOpened"),
|
||||
@ -449,11 +405,7 @@ WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp",
|
||||
&media_type)
|
||||
// clang-format on
|
||||
|
||||
RTCRTPStreamStats::RTCRTPStreamStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRTPStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCRTPStreamStats::RTCRTPStreamStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCRTPStreamStats::RTCRTPStreamStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
ssrc("ssrc"),
|
||||
kind("kind"),
|
||||
@ -473,11 +425,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
&packets_lost)
|
||||
// clang-format on
|
||||
|
||||
RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(const std::string&& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCReceivedRtpStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string&& id,
|
||||
RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRTPStreamStats(std::move(id), timestamp_us),
|
||||
jitter("jitter"),
|
||||
@ -495,11 +443,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
&bytes_sent)
|
||||
// clang-format on
|
||||
|
||||
RTCSentRtpStreamStats::RTCSentRtpStreamStats(const std::string&& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCSentRtpStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string&& id,
|
||||
RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRTPStreamStats(std::move(id), timestamp_us),
|
||||
packets_sent("packetsSent"),
|
||||
@ -570,11 +514,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
&min_playout_delay)
|
||||
// clang-format on
|
||||
|
||||
RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCInboundRTPStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id,
|
||||
RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCReceivedRtpStreamStats(std::move(id), timestamp_us),
|
||||
track_identifier("trackIdentifier"),
|
||||
@ -682,11 +622,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
&scalability_mode)
|
||||
// clang-format on
|
||||
|
||||
RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id,
|
||||
RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRTPStreamStats(std::move(id), timestamp_us),
|
||||
media_source_id("mediaSourceId"),
|
||||
@ -740,12 +676,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
// clang-format on
|
||||
|
||||
RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats(
|
||||
const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRemoteInboundRtpStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats(
|
||||
std::string&& id,
|
||||
std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCReceivedRtpStreamStats(std::move(id), timestamp_us),
|
||||
local_id("localId"),
|
||||
@ -772,12 +703,7 @@ WEBRTC_RTCSTATS_IMPL(
|
||||
// clang-format on
|
||||
|
||||
RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats(
|
||||
const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCRemoteOutboundRtpStreamStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats(
|
||||
std::string&& id,
|
||||
std::string id,
|
||||
int64_t timestamp_us)
|
||||
: RTCSentRtpStreamStats(std::move(id), timestamp_us),
|
||||
local_id("localId"),
|
||||
@ -798,11 +724,7 @@ WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source",
|
||||
&kind)
|
||||
// clang-format on
|
||||
|
||||
RTCMediaSourceStats::RTCMediaSourceStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCMediaSourceStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCMediaSourceStats::RTCMediaSourceStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCMediaSourceStats::RTCMediaSourceStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
track_identifier("trackIdentifier"),
|
||||
kind("kind") {}
|
||||
@ -821,11 +743,7 @@ WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source",
|
||||
&echo_return_loss_enhancement)
|
||||
// clang-format on
|
||||
|
||||
RTCAudioSourceStats::RTCAudioSourceStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCAudioSourceStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCAudioSourceStats::RTCAudioSourceStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCAudioSourceStats::RTCAudioSourceStats(std::string id, int64_t timestamp_us)
|
||||
: RTCMediaSourceStats(std::move(id), timestamp_us),
|
||||
audio_level("audioLevel"),
|
||||
total_audio_energy("totalAudioEnergy"),
|
||||
@ -846,11 +764,7 @@ WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source",
|
||||
&frames_per_second)
|
||||
// clang-format on
|
||||
|
||||
RTCVideoSourceStats::RTCVideoSourceStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCVideoSourceStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCVideoSourceStats::RTCVideoSourceStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCVideoSourceStats::RTCVideoSourceStats(std::string id, int64_t timestamp_us)
|
||||
: RTCMediaSourceStats(std::move(id), timestamp_us),
|
||||
width("width"),
|
||||
height("height"),
|
||||
@ -883,11 +797,7 @@ WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
|
||||
&ice_state)
|
||||
// clang-format on
|
||||
|
||||
RTCTransportStats::RTCTransportStats(const std::string& id,
|
||||
int64_t timestamp_us)
|
||||
: RTCTransportStats(std::string(id), timestamp_us) {}
|
||||
|
||||
RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us)
|
||||
RTCTransportStats::RTCTransportStats(std::string id, int64_t timestamp_us)
|
||||
: RTCStats(std::move(id), timestamp_us),
|
||||
bytes_sent("bytesSent"),
|
||||
packets_sent("packetsSent"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user