Refactor RtcEvent log events.

Bug: webrtc:11933
Change-Id: I1700f4b75c3608985c9027f7d6a866fef97ec38f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246203
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35784}
This commit is contained in:
Björn Terelius
2022-01-25 10:48:33 +01:00
committed by WebRTC LUCI CQ
parent 8ad0be0ab1
commit d2a370f1c9
21 changed files with 318 additions and 314 deletions

View File

@ -19,6 +19,19 @@
namespace webrtc {
struct LoggedAudioNetworkAdaptationEvent {
LoggedAudioNetworkAdaptationEvent() = default;
LoggedAudioNetworkAdaptationEvent(Timestamp timestamp,
const AudioEncoderRuntimeConfig& config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
AudioEncoderRuntimeConfig config;
};
struct AudioEncoderRuntimeConfig;
class RtcEventAudioNetworkAdaptation final : public RtcEvent {
@ -42,19 +55,6 @@ class RtcEventAudioNetworkAdaptation final : public RtcEvent {
const std::unique_ptr<const AudioEncoderRuntimeConfig> config_;
};
struct LoggedAudioNetworkAdaptationEvent {
LoggedAudioNetworkAdaptationEvent() = default;
LoggedAudioNetworkAdaptationEvent(Timestamp timestamp,
const AudioEncoderRuntimeConfig& config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
AudioEncoderRuntimeConfig config;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_NETWORK_ADAPTATION_H_

View File

@ -20,6 +20,18 @@
namespace webrtc {
struct LoggedAudioPlayoutEvent {
LoggedAudioPlayoutEvent() = default;
LoggedAudioPlayoutEvent(Timestamp timestamp, uint32_t ssrc)
: timestamp(timestamp), ssrc(ssrc) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
uint32_t ssrc;
};
class RtcEventAudioPlayout final : public RtcEvent {
public:
static constexpr Type kType = Type::AudioPlayout;
@ -40,18 +52,6 @@ class RtcEventAudioPlayout final : public RtcEvent {
const uint32_t ssrc_;
};
struct LoggedAudioPlayoutEvent {
LoggedAudioPlayoutEvent() = default;
LoggedAudioPlayoutEvent(Timestamp timestamp, uint32_t ssrc)
: timestamp(timestamp), ssrc(ssrc) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
uint32_t ssrc;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_PLAYOUT_H_

View File

@ -19,6 +19,18 @@
namespace webrtc {
struct LoggedAudioRecvConfig {
LoggedAudioRecvConfig() = default;
LoggedAudioRecvConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
class RtcEventAudioReceiveStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::AudioReceiveStreamConfig;
@ -41,18 +53,6 @@ class RtcEventAudioReceiveStreamConfig final : public RtcEvent {
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
struct LoggedAudioRecvConfig {
LoggedAudioRecvConfig() = default;
LoggedAudioRecvConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_RECEIVE_STREAM_CONFIG_H_

View File

@ -18,6 +18,18 @@
namespace webrtc {
struct LoggedAudioSendConfig {
LoggedAudioSendConfig() = default;
LoggedAudioSendConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
class RtcEventAudioSendStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::AudioSendStreamConfig;
@ -39,17 +51,6 @@ class RtcEventAudioSendStreamConfig final : public RtcEvent {
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
struct LoggedAudioSendConfig {
LoggedAudioSendConfig() = default;
LoggedAudioSendConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_SEND_STREAM_CONFIG_H_

View File

@ -21,6 +21,23 @@
namespace webrtc {
struct LoggedBweDelayBasedUpdate {
LoggedBweDelayBasedUpdate() = default;
LoggedBweDelayBasedUpdate(Timestamp timestamp,
int32_t bitrate_bps,
BandwidthUsage detector_state)
: timestamp(timestamp),
bitrate_bps(bitrate_bps),
detector_state(detector_state) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t bitrate_bps;
BandwidthUsage detector_state;
};
class RtcEventBweUpdateDelayBased final : public RtcEvent {
public:
static constexpr Type kType = Type::BweUpdateDelayBased;
@ -44,23 +61,6 @@ class RtcEventBweUpdateDelayBased final : public RtcEvent {
const BandwidthUsage detector_state_;
};
struct LoggedBweDelayBasedUpdate {
LoggedBweDelayBasedUpdate() = default;
LoggedBweDelayBasedUpdate(Timestamp timestamp,
int32_t bitrate_bps,
BandwidthUsage detector_state)
: timestamp(timestamp),
bitrate_bps(bitrate_bps),
detector_state(detector_state) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t bitrate_bps;
BandwidthUsage detector_state;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_DELAY_BASED_H_

View File

@ -20,6 +20,26 @@
namespace webrtc {
struct LoggedBweLossBasedUpdate {
LoggedBweLossBasedUpdate() = default;
LoggedBweLossBasedUpdate(Timestamp timestamp,
int32_t bitrate_bps,
uint8_t fraction_lost,
int32_t expected_packets)
: timestamp(timestamp),
bitrate_bps(bitrate_bps),
fraction_lost(fraction_lost),
expected_packets(expected_packets) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t bitrate_bps;
uint8_t fraction_lost;
int32_t expected_packets;
};
class RtcEventBweUpdateLossBased final : public RtcEvent {
public:
static constexpr Type kType = Type::BweUpdateLossBased;
@ -46,26 +66,6 @@ class RtcEventBweUpdateLossBased final : public RtcEvent {
const int32_t total_packets_;
};
struct LoggedBweLossBasedUpdate {
LoggedBweLossBasedUpdate() = default;
LoggedBweLossBasedUpdate(Timestamp timestamp,
int32_t bitrate_bps,
uint8_t fraction_lost,
int32_t expected_packets)
: timestamp(timestamp),
bitrate_bps(bitrate_bps),
fraction_lost(fraction_lost),
expected_packets(expected_packets) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t bitrate_bps;
uint8_t fraction_lost;
int32_t expected_packets;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_LOSS_BASED_H_

View File

@ -19,6 +19,14 @@
namespace webrtc {
struct LoggedDtlsTransportState {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
DtlsTransportState dtls_transport_state;
};
class RtcEventDtlsTransportState : public RtcEvent {
public:
static constexpr Type kType = Type::DtlsTransportState;
@ -41,14 +49,6 @@ class RtcEventDtlsTransportState : public RtcEvent {
const DtlsTransportState dtls_transport_state_;
};
struct LoggedDtlsTransportState {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
DtlsTransportState dtls_transport_state;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_TRANSPORT_STATE_H_

View File

@ -18,6 +18,17 @@
namespace webrtc {
struct LoggedDtlsWritableState {
LoggedDtlsWritableState() = default;
explicit LoggedDtlsWritableState(bool writable) : writable(writable) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
bool writable;
};
class RtcEventDtlsWritableState : public RtcEvent {
public:
static constexpr Type kType = Type::DtlsWritableState;
@ -38,17 +49,6 @@ class RtcEventDtlsWritableState : public RtcEvent {
const bool writable_;
};
struct LoggedDtlsWritableState {
LoggedDtlsWritableState() = default;
explicit LoggedDtlsWritableState(bool writable) : writable(writable) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
bool writable;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_WRITABLE_STATE_H_

View File

@ -21,6 +21,19 @@
namespace webrtc {
struct LoggedFrameDecoded {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t render_time_ms;
uint32_t ssrc;
int width;
int height;
VideoCodecType codec;
uint8_t qp;
};
class RtcEventFrameDecoded final : public RtcEvent {
public:
static constexpr Type kType = Type::FrameDecoded;
@ -56,19 +69,6 @@ class RtcEventFrameDecoded final : public RtcEvent {
const uint8_t qp_;
};
struct LoggedFrameDecoded {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t render_time_ms;
uint32_t ssrc;
int width;
int height;
VideoCodecType codec;
uint8_t qp;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_FRAME_DECODED_H_

View File

@ -20,6 +20,26 @@
namespace webrtc {
struct LoggedGenericAckReceived {
LoggedGenericAckReceived() = default;
LoggedGenericAckReceived(Timestamp timestamp,
int64_t packet_number,
int64_t acked_packet_number,
absl::optional<int64_t> receive_acked_packet_time_ms)
: timestamp(timestamp),
packet_number(packet_number),
acked_packet_number(acked_packet_number),
receive_acked_packet_time_ms(receive_acked_packet_time_ms) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
int64_t acked_packet_number;
absl::optional<int64_t> receive_acked_packet_time_ms;
};
struct AckedPacket {
// The packet number that was acked.
int64_t packet_number;
@ -76,26 +96,6 @@ class RtcEventGenericAckReceived final : public RtcEvent {
const absl::optional<int64_t> receive_acked_packet_time_ms_;
};
struct LoggedGenericAckReceived {
LoggedGenericAckReceived() = default;
LoggedGenericAckReceived(Timestamp timestamp,
int64_t packet_number,
int64_t acked_packet_number,
absl::optional<int64_t> receive_acked_packet_time_ms)
: timestamp(timestamp),
packet_number(packet_number),
acked_packet_number(acked_packet_number),
receive_acked_packet_time_ms(receive_acked_packet_time_ms) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
int64_t acked_packet_number;
absl::optional<int64_t> receive_acked_packet_time_ms;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_ACK_RECEIVED_H_

View File

@ -18,6 +18,23 @@
namespace webrtc {
struct LoggedGenericPacketReceived {
LoggedGenericPacketReceived() = default;
LoggedGenericPacketReceived(Timestamp timestamp,
int64_t packet_number,
int packet_length)
: timestamp(timestamp),
packet_number(packet_number),
packet_length(packet_length) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
int packet_length;
};
class RtcEventGenericPacketReceived final : public RtcEvent {
public:
static constexpr Type kType = Type::GenericPacketReceived;
@ -44,23 +61,6 @@ class RtcEventGenericPacketReceived final : public RtcEvent {
const size_t packet_length_;
};
struct LoggedGenericPacketReceived {
LoggedGenericPacketReceived() = default;
LoggedGenericPacketReceived(Timestamp timestamp,
int64_t packet_number,
int packet_length)
: timestamp(timestamp),
packet_number(packet_number),
packet_length(packet_length) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
int packet_length;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_PACKET_RECEIVED_H_

View File

@ -18,6 +18,32 @@
namespace webrtc {
struct LoggedGenericPacketSent {
LoggedGenericPacketSent() = default;
LoggedGenericPacketSent(Timestamp timestamp,
int64_t packet_number,
size_t overhead_length,
size_t payload_length,
size_t padding_length)
: timestamp(timestamp),
packet_number(packet_number),
overhead_length(overhead_length),
payload_length(payload_length),
padding_length(padding_length) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
size_t packet_length() const {
return payload_length + padding_length + overhead_length;
}
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
size_t overhead_length;
size_t payload_length;
size_t padding_length;
};
class RtcEventGenericPacketSent final : public RtcEvent {
public:
static constexpr Type kType = Type::GenericPacketSent;
@ -61,31 +87,6 @@ class RtcEventGenericPacketSent final : public RtcEvent {
const size_t padding_length_;
};
struct LoggedGenericPacketSent {
LoggedGenericPacketSent() = default;
LoggedGenericPacketSent(Timestamp timestamp,
int64_t packet_number,
size_t overhead_length,
size_t payload_length,
size_t padding_length)
: timestamp(timestamp),
packet_number(packet_number),
overhead_length(overhead_length),
payload_length(payload_length),
padding_length(padding_length) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
size_t packet_length() const {
return payload_length + padding_length + overhead_length;
}
Timestamp timestamp = Timestamp::MinusInfinity();
int64_t packet_number;
size_t overhead_length;
size_t payload_length;
size_t padding_length;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_PACKET_SENT_H_

View File

@ -28,6 +28,26 @@ enum class IceCandidatePairEventType {
kNumValues,
};
struct LoggedIceCandidatePairEvent {
LoggedIceCandidatePairEvent() = default;
LoggedIceCandidatePairEvent(Timestamp timestamp,
IceCandidatePairEventType type,
uint32_t candidate_pair_id,
uint32_t transaction_id)
: timestamp(timestamp),
type(type),
candidate_pair_id(candidate_pair_id),
transaction_id(transaction_id) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
IceCandidatePairEventType type;
uint32_t candidate_pair_id;
uint32_t transaction_id;
};
class RtcEventIceCandidatePair final : public RtcEvent {
public:
static constexpr Type kType = Type::IceCandidatePairEvent;
@ -55,26 +75,6 @@ class RtcEventIceCandidatePair final : public RtcEvent {
const uint32_t transaction_id_;
};
struct LoggedIceCandidatePairEvent {
LoggedIceCandidatePairEvent() = default;
LoggedIceCandidatePairEvent(Timestamp timestamp,
IceCandidatePairEventType type,
uint32_t candidate_pair_id,
uint32_t transaction_id)
: timestamp(timestamp),
type(type),
candidate_pair_id(candidate_pair_id),
transaction_id(transaction_id) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
IceCandidatePairEventType type;
uint32_t candidate_pair_id;
uint32_t transaction_id;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_

View File

@ -65,6 +65,22 @@ enum class IceCandidateNetworkType {
kNumValues,
};
struct LoggedIceCandidatePairConfig {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
IceCandidatePairConfigType type;
uint32_t candidate_pair_id;
IceCandidateType local_candidate_type;
IceCandidatePairProtocol local_relay_protocol;
IceCandidateNetworkType local_network_type;
IceCandidatePairAddressFamily local_address_family;
IceCandidateType remote_candidate_type;
IceCandidatePairAddressFamily remote_address_family;
IceCandidatePairProtocol candidate_pair_protocol;
};
class IceCandidatePairDescription {
public:
IceCandidatePairDescription();
@ -113,22 +129,6 @@ class RtcEventIceCandidatePairConfig final : public RtcEvent {
const IceCandidatePairDescription candidate_pair_desc_;
};
struct LoggedIceCandidatePairConfig {
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
IceCandidatePairConfigType type;
uint32_t candidate_pair_id;
IceCandidateType local_candidate_type;
IceCandidatePairProtocol local_relay_protocol;
IceCandidateNetworkType local_network_type;
IceCandidatePairAddressFamily local_address_family;
IceCandidateType remote_candidate_type;
IceCandidatePairAddressFamily remote_address_family;
IceCandidatePairProtocol candidate_pair_protocol;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_CONFIG_H_

View File

@ -20,6 +20,29 @@
namespace webrtc {
struct LoggedBweProbeClusterCreatedEvent {
LoggedBweProbeClusterCreatedEvent() = default;
LoggedBweProbeClusterCreatedEvent(Timestamp timestamp,
int32_t id,
int32_t bitrate_bps,
uint32_t min_packets,
uint32_t min_bytes)
: timestamp(timestamp),
id(id),
bitrate_bps(bitrate_bps),
min_packets(min_packets),
min_bytes(min_bytes) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
int32_t bitrate_bps;
uint32_t min_packets;
uint32_t min_bytes;
};
class RtcEventProbeClusterCreated final : public RtcEvent {
public:
static constexpr Type kType = Type::ProbeClusterCreated;
@ -49,29 +72,6 @@ class RtcEventProbeClusterCreated final : public RtcEvent {
const uint32_t min_bytes_;
};
struct LoggedBweProbeClusterCreatedEvent {
LoggedBweProbeClusterCreatedEvent() = default;
LoggedBweProbeClusterCreatedEvent(Timestamp timestamp,
int32_t id,
int32_t bitrate_bps,
uint32_t min_packets,
uint32_t min_bytes)
: timestamp(timestamp),
id(id),
bitrate_bps(bitrate_bps),
min_packets(min_packets),
min_bytes(min_bytes) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
int32_t bitrate_bps;
uint32_t min_packets;
uint32_t min_bytes;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_CLUSTER_CREATED_H_

View File

@ -27,6 +27,21 @@ enum class ProbeFailureReason {
kLast
};
struct LoggedBweProbeFailureEvent {
LoggedBweProbeFailureEvent() = default;
LoggedBweProbeFailureEvent(Timestamp timestamp,
int32_t id,
ProbeFailureReason failure_reason)
: timestamp(timestamp), id(id), failure_reason(failure_reason) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
ProbeFailureReason failure_reason;
};
class RtcEventProbeResultFailure final : public RtcEvent {
public:
static constexpr Type kType = Type::ProbeResultFailure;
@ -49,21 +64,6 @@ class RtcEventProbeResultFailure final : public RtcEvent {
const ProbeFailureReason failure_reason_;
};
struct LoggedBweProbeFailureEvent {
LoggedBweProbeFailureEvent() = default;
LoggedBweProbeFailureEvent(Timestamp timestamp,
int32_t id,
ProbeFailureReason failure_reason)
: timestamp(timestamp), id(id), failure_reason(failure_reason) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
ProbeFailureReason failure_reason;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_

View File

@ -20,6 +20,21 @@
namespace webrtc {
struct LoggedBweProbeSuccessEvent {
LoggedBweProbeSuccessEvent() = default;
LoggedBweProbeSuccessEvent(Timestamp timestamp,
int32_t id,
int32_t bitrate_bps)
: timestamp(timestamp), id(id), bitrate_bps(bitrate_bps) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
int32_t bitrate_bps;
};
class RtcEventProbeResultSuccess final : public RtcEvent {
public:
static constexpr Type kType = Type::ProbeResultSuccess;
@ -42,21 +57,6 @@ class RtcEventProbeResultSuccess final : public RtcEvent {
const int32_t bitrate_bps_;
};
struct LoggedBweProbeSuccessEvent {
LoggedBweProbeSuccessEvent() = default;
LoggedBweProbeSuccessEvent(Timestamp timestamp,
int32_t id,
int32_t bitrate_bps)
: timestamp(timestamp), id(id), bitrate_bps(bitrate_bps) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
int32_t id;
int32_t bitrate_bps;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_SUCCESS_H_

View File

@ -19,6 +19,17 @@
namespace webrtc {
struct LoggedRemoteEstimateEvent {
LoggedRemoteEstimateEvent() = default;
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
absl::optional<DataRate> link_capacity_lower;
absl::optional<DataRate> link_capacity_upper;
};
class RtcEventRemoteEstimate final : public RtcEvent {
public:
static constexpr Type kType = Type::RemoteEstimateEvent;
@ -35,15 +46,5 @@ class RtcEventRemoteEstimate final : public RtcEvent {
const DataRate link_capacity_upper_;
};
struct LoggedRemoteEstimateEvent {
LoggedRemoteEstimateEvent() = default;
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
absl::optional<DataRate> link_capacity_lower;
absl::optional<DataRate> link_capacity_upper;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_REMOTE_ESTIMATE_H_

View File

@ -18,6 +18,19 @@
namespace webrtc {
struct LoggedRouteChangeEvent {
LoggedRouteChangeEvent() = default;
LoggedRouteChangeEvent(Timestamp timestamp, bool connected, uint32_t overhead)
: timestamp(timestamp), connected(connected), overhead(overhead) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
bool connected;
uint32_t overhead;
};
class RtcEventRouteChange final : public RtcEvent {
public:
static constexpr Type kType = Type::RouteChangeEvent;
@ -40,18 +53,5 @@ class RtcEventRouteChange final : public RtcEvent {
const uint32_t overhead_;
};
struct LoggedRouteChangeEvent {
LoggedRouteChangeEvent() = default;
LoggedRouteChangeEvent(Timestamp timestamp, bool connected, uint32_t overhead)
: timestamp(timestamp), connected(connected), overhead(overhead) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
bool connected;
uint32_t overhead;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ROUTE_CHANGE_H_

View File

@ -19,6 +19,18 @@
namespace webrtc {
struct LoggedVideoRecvConfig {
LoggedVideoRecvConfig() = default;
LoggedVideoRecvConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
class RtcEventVideoReceiveStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::VideoReceiveStreamConfig;
@ -41,18 +53,6 @@ class RtcEventVideoReceiveStreamConfig final : public RtcEvent {
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
struct LoggedVideoRecvConfig {
LoggedVideoRecvConfig() = default;
LoggedVideoRecvConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_VIDEO_RECEIVE_STREAM_CONFIG_H_

View File

@ -19,6 +19,18 @@
namespace webrtc {
struct LoggedVideoSendConfig {
LoggedVideoSendConfig() = default;
LoggedVideoSendConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
class RtcEventVideoSendStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::VideoSendStreamConfig;
@ -40,17 +52,6 @@ class RtcEventVideoSendStreamConfig final : public RtcEvent {
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
struct LoggedVideoSendConfig {
LoggedVideoSendConfig() = default;
LoggedVideoSendConfig(Timestamp timestamp, const rtclog::StreamConfig config)
: timestamp(timestamp), config(config) {}
int64_t log_time_us() const { return timestamp.us(); }
int64_t log_time_ms() const { return timestamp.ms(); }
Timestamp timestamp = Timestamp::MinusInfinity();
rtclog::StreamConfig config;
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_VIDEO_SEND_STREAM_CONFIG_H_