Move logged types for RTC event log into event headers.
Bug: webrtc:11933
Change-Id: Idf5c85a3b33147b20e8646903de7e704b0cef18c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201203
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32951}
diff --git a/logging/BUILD.gn b/logging/BUILD.gn
index 720cb50..9fccf5c 100644
--- a/logging/BUILD.gn
+++ b/logging/BUILD.gn
@@ -318,10 +318,16 @@
deps = [
":ice_log",
+ ":rtc_event_audio",
":rtc_event_bwe",
+ ":rtc_event_frame_events",
+ ":rtc_event_generic_packet_events",
":rtc_event_log2_proto",
":rtc_event_log_impl_encoder",
":rtc_event_log_proto",
+ ":rtc_event_pacing",
+ ":rtc_event_rtp_rtcp",
+ ":rtc_event_video",
":rtc_stream_config",
"../api:function_view",
"../api:network_state_predictor_api",
diff --git a/logging/rtc_event_log/events/rtc_event_alr_state.h b/logging/rtc_event_log/events/rtc_event_alr_state.h
index 2e265d7..3ad0f00 100644
--- a/logging/rtc_event_log/events/rtc_event_alr_state.h
+++ b/logging/rtc_event_log/events/rtc_event_alr_state.h
@@ -37,5 +37,17 @@
const bool in_alr_;
};
+struct LoggedAlrStateEvent {
+ LoggedAlrStateEvent() = default;
+ LoggedAlrStateEvent(int64_t timestamp_us, bool in_alr)
+ : timestamp_us(timestamp_us), in_alr(in_alr) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ bool in_alr;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ALR_STATE_H_
diff --git a/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h b/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h
index 3fbfa81..2b183bb 100644
--- a/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h
+++ b/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h
@@ -14,6 +14,7 @@
#include <memory>
#include "api/rtc_event_log/rtc_event.h"
+#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
namespace webrtc {
@@ -40,6 +41,19 @@
const std::unique_ptr<const AudioEncoderRuntimeConfig> config_;
};
+struct LoggedAudioNetworkAdaptationEvent {
+ LoggedAudioNetworkAdaptationEvent() = default;
+ LoggedAudioNetworkAdaptationEvent(int64_t timestamp_us,
+ const AudioEncoderRuntimeConfig& config)
+ : timestamp_us(timestamp_us), config(config) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ AudioEncoderRuntimeConfig config;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_NETWORK_ADAPTATION_H_
diff --git a/logging/rtc_event_log/events/rtc_event_audio_playout.h b/logging/rtc_event_log/events/rtc_event_audio_playout.h
index ab7f7a8..8382521 100644
--- a/logging/rtc_event_log/events/rtc_event_audio_playout.h
+++ b/logging/rtc_event_log/events/rtc_event_audio_playout.h
@@ -39,6 +39,18 @@
const uint32_t ssrc_;
};
+struct LoggedAudioPlayoutEvent {
+ LoggedAudioPlayoutEvent() = default;
+ LoggedAudioPlayoutEvent(int64_t timestamp_us, uint32_t ssrc)
+ : timestamp_us(timestamp_us), ssrc(ssrc) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ uint32_t ssrc;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_PLAYOUT_H_
diff --git a/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h b/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h
index 8204024..1edd8e1 100644
--- a/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h
@@ -14,13 +14,10 @@
#include <memory>
#include "api/rtc_event_log/rtc_event.h"
+#include "logging/rtc_event_log/rtc_stream_config.h"
namespace webrtc {
-namespace rtclog {
-struct StreamConfig;
-} // namespace rtclog
-
class RtcEventAudioReceiveStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::AudioReceiveStreamConfig;
@@ -43,6 +40,18 @@
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
+struct LoggedAudioRecvConfig {
+ LoggedAudioRecvConfig() = default;
+ LoggedAudioRecvConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
+ : timestamp_us(timestamp_us), config(config) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ rtclog::StreamConfig config;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_RECEIVE_STREAM_CONFIG_H_
diff --git a/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h b/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h
index 477ebaa..d3c6068 100644
--- a/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h
@@ -14,13 +14,10 @@
#include <memory>
#include "api/rtc_event_log/rtc_event.h"
+#include "logging/rtc_event_log/rtc_stream_config.h"
namespace webrtc {
-namespace rtclog {
-struct StreamConfig;
-} // namespace rtclog
-
class RtcEventAudioSendStreamConfig final : public RtcEvent {
public:
static constexpr Type kType = Type::AudioSendStreamConfig;
@@ -42,6 +39,17 @@
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
+struct LoggedAudioSendConfig {
+ LoggedAudioSendConfig() = default;
+ LoggedAudioSendConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
+ : timestamp_us(timestamp_us), config(config) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ rtclog::StreamConfig config;
+};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_AUDIO_SEND_STREAM_CONFIG_H_
diff --git a/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h b/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
index a0a407a..a83ea8b 100644
--- a/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
+++ b/logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h
@@ -15,12 +15,11 @@
#include <memory>
+#include "api/network_state_predictor.h"
#include "api/rtc_event_log/rtc_event.h"
namespace webrtc {
-enum class BandwidthUsage;
-
class RtcEventBweUpdateDelayBased final : public RtcEvent {
public:
static constexpr Type kType = Type::BweUpdateDelayBased;
@@ -44,6 +43,23 @@
const BandwidthUsage detector_state_;
};
+struct LoggedBweDelayBasedUpdate {
+ LoggedBweDelayBasedUpdate() = default;
+ LoggedBweDelayBasedUpdate(int64_t timestamp_us,
+ int32_t bitrate_bps,
+ BandwidthUsage detector_state)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ int32_t bitrate_bps;
+ BandwidthUsage detector_state;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_BWE_UPDATE_DELAY_BASED_H_
diff --git a/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h b/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
index 039de71..b638f1a 100644
--- a/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
+++ b/logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h
@@ -45,6 +45,26 @@
const int32_t total_packets_;
};
+struct LoggedBweLossBasedUpdate {
+ LoggedBweLossBasedUpdate() = default;
+ LoggedBweLossBasedUpdate(int64_t timestamp_us,
+ int32_t bitrate_bps,
+ uint8_t fraction_lost,
+ int32_t expected_packets)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h b/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h
index d660de2..af35a3f 100644
--- a/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h
+++ b/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h
@@ -40,6 +40,14 @@
const DtlsTransportState dtls_transport_state_;
};
+struct LoggedDtlsTransportState {
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ DtlsTransportState dtls_transport_state;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_TRANSPORT_STATE_H_
diff --git a/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h b/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h
index 0423df8..c3ecce0 100644
--- a/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h
+++ b/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h
@@ -37,6 +37,17 @@
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_us / 1000; }
+
+ int64_t timestamp_us;
+ bool writable;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_WRITABLE_STATE_H_
diff --git a/logging/rtc_event_log/events/rtc_event_frame_decoded.h b/logging/rtc_event_log/events/rtc_event_frame_decoded.h
index 67e9c57..c549aa883 100644
--- a/logging/rtc_event_log/events/rtc_event_frame_decoded.h
+++ b/logging/rtc_event_log/events/rtc_event_frame_decoded.h
@@ -55,6 +55,19 @@
const uint8_t qp_;
};
+struct LoggedFrameDecoded {
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_generic_ack_received.h b/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
index 3c5eb15..76e3cc2 100644
--- a/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
+++ b/logging/rtc_event_log/events/rtc_event_generic_ack_received.h
@@ -75,6 +75,26 @@
const absl::optional<int64_t> receive_acked_packet_time_ms_;
};
+struct LoggedGenericAckReceived {
+ LoggedGenericAckReceived() = default;
+ LoggedGenericAckReceived(int64_t timestamp_us,
+ int64_t packet_number,
+ int64_t acked_packet_number,
+ absl::optional<int64_t> receive_acked_packet_time_ms)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_generic_packet_received.h b/logging/rtc_event_log/events/rtc_event_generic_packet_received.h
index 7223313..45e5e4c 100644
--- a/logging/rtc_event_log/events/rtc_event_generic_packet_received.h
+++ b/logging/rtc_event_log/events/rtc_event_generic_packet_received.h
@@ -43,6 +43,23 @@
const size_t packet_length_;
};
+struct LoggedGenericPacketReceived {
+ LoggedGenericPacketReceived() = default;
+ LoggedGenericPacketReceived(int64_t timestamp_us,
+ int64_t packet_number,
+ int packet_length)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ int64_t packet_number;
+ int packet_length;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_GENERIC_PACKET_RECEIVED_H_
diff --git a/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h b/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
index 713a474..9ebafbe 100644
--- a/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
+++ b/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
@@ -60,6 +60,31 @@
const size_t padding_length_;
};
+struct LoggedGenericPacketSent {
+ LoggedGenericPacketSent() = default;
+ LoggedGenericPacketSent(int64_t timestamp_us,
+ int64_t packet_number,
+ size_t overhead_length,
+ size_t payload_length,
+ size_t padding_length)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ size_t packet_length() const {
+ return payload_length + padding_length + overhead_length;
+ }
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
index 5bb3803..717ddf3 100644
--- a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
+++ b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h
@@ -54,6 +54,26 @@
const uint32_t transaction_id_;
};
+struct LoggedIceCandidatePairEvent {
+ LoggedIceCandidatePairEvent() = default;
+ LoggedIceCandidatePairEvent(int64_t timestamp_us,
+ IceCandidatePairEventType type,
+ uint32_t candidate_pair_id,
+ uint32_t transaction_id)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
index c9a8199..ab2eaf2 100644
--- a/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
+++ b/logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h
@@ -112,6 +112,22 @@
const IceCandidatePairDescription candidate_pair_desc_;
};
+struct LoggedIceCandidatePairConfig {
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
index 2cab9c8..f3221b9 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
@@ -48,6 +48,29 @@
const uint32_t min_bytes_;
};
+struct LoggedBweProbeClusterCreatedEvent {
+ LoggedBweProbeClusterCreatedEvent() = default;
+ LoggedBweProbeClusterCreatedEvent(int64_t timestamp_us,
+ int32_t id,
+ int32_t bitrate_bps,
+ uint32_t min_packets,
+ uint32_t min_bytes)
+ : timestamp_us(timestamp_us),
+ 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_us / 1000; }
+
+ int64_t timestamp_us;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
index 5d24f76..868c30b 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
@@ -48,6 +48,21 @@
const ProbeFailureReason failure_reason_;
};
+struct LoggedBweProbeFailureEvent {
+ LoggedBweProbeFailureEvent() = default;
+ LoggedBweProbeFailureEvent(int64_t timestamp_us,
+ int32_t id,
+ ProbeFailureReason failure_reason)
+ : timestamp_us(timestamp_us), id(id), failure_reason(failure_reason) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ int32_t id;
+ ProbeFailureReason failure_reason;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_success.h b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
index c715ca6..e374668 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_success.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
@@ -41,6 +41,21 @@
const int32_t bitrate_bps_;
};
+struct LoggedBweProbeSuccessEvent {
+ LoggedBweProbeSuccessEvent() = default;
+ LoggedBweProbeSuccessEvent(int64_t timestamp_us,
+ int32_t id,
+ int32_t bitrate_bps)
+ : timestamp_us(timestamp_us), id(id), bitrate_bps(bitrate_bps) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ int32_t id;
+ int32_t bitrate_bps;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_SUCCESS_H_
diff --git a/logging/rtc_event_log/events/rtc_event_remote_estimate.h b/logging/rtc_event_log/events/rtc_event_remote_estimate.h
index ea1f752..29b0c47 100644
--- a/logging/rtc_event_log/events/rtc_event_remote_estimate.h
+++ b/logging/rtc_event_log/events/rtc_event_remote_estimate.h
@@ -33,5 +33,16 @@
const DataRate link_capacity_lower_;
const DataRate link_capacity_upper_;
};
+
+struct LoggedRemoteEstimateEvent {
+ LoggedRemoteEstimateEvent() = default;
+
+ int64_t log_time_us() const { return timestamp_ms * 1000; }
+ int64_t log_time_ms() const { return timestamp_ms; }
+
+ int64_t timestamp_ms;
+ 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_
diff --git a/logging/rtc_event_log/events/rtc_event_route_change.h b/logging/rtc_event_log/events/rtc_event_route_change.h
index a364dd7..455a832 100644
--- a/logging/rtc_event_log/events/rtc_event_route_change.h
+++ b/logging/rtc_event_log/events/rtc_event_route_change.h
@@ -39,5 +39,20 @@
const uint32_t overhead_;
};
+struct LoggedRouteChangeEvent {
+ LoggedRouteChangeEvent() = default;
+ LoggedRouteChangeEvent(int64_t timestamp_ms,
+ bool connected,
+ uint32_t overhead)
+ : timestamp_ms(timestamp_ms), connected(connected), overhead(overhead) {}
+
+ int64_t log_time_us() const { return timestamp_ms * 1000; }
+ int64_t log_time_ms() const { return timestamp_ms; }
+
+ int64_t timestamp_ms;
+ bool connected;
+ uint32_t overhead;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ROUTE_CHANGE_H_
diff --git a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
index 8e9841f..2bf5247 100644
--- a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
@@ -40,6 +40,18 @@
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
+struct LoggedVideoRecvConfig {
+ LoggedVideoRecvConfig() = default;
+ LoggedVideoRecvConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
+ : timestamp_us(timestamp_us), config(config) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ rtclog::StreamConfig config;
+};
+
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_VIDEO_RECEIVE_STREAM_CONFIG_H_
diff --git a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
index c06f783..cf95afc 100644
--- a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
@@ -39,6 +39,17 @@
const std::unique_ptr<const rtclog::StreamConfig> config_;
};
+struct LoggedVideoSendConfig {
+ LoggedVideoSendConfig() = default;
+ LoggedVideoSendConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
+ : timestamp_us(timestamp_us), config(config) {}
+
+ int64_t log_time_us() const { return timestamp_us; }
+ int64_t log_time_ms() const { return timestamp_us / 1000; }
+
+ int64_t timestamp_us;
+ rtclog::StreamConfig config;
+};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_VIDEO_SEND_STREAM_CONFIG_H_
diff --git a/logging/rtc_event_log/logged_events.h b/logging/rtc_event_log/logged_events.h
index 7821215..1ed21be 100644
--- a/logging/rtc_event_log/logged_events.h
+++ b/logging/rtc_event_log/logged_events.h
@@ -14,18 +14,9 @@
#include <vector>
#include "absl/types/optional.h"
-#include "api/network_state_predictor.h"
#include "api/rtp_headers.h"
-#include "api/units/data_rate.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
-#include "api/video/video_codec_type.h"
-#include "logging/rtc_event_log/events/rtc_event_dtls_transport_state.h"
-#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
-#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
-#include "logging/rtc_event_log/events/rtc_event_probe_result_failure.h"
-#include "logging/rtc_event_log/rtc_stream_config.h"
-#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
#include "modules/rtp_rtcp/source/rtcp_packet/extended_reports.h"
#include "modules/rtp_rtcp/source/rtcp_packet/fir.h"
#include "modules/rtp_rtcp/source/rtcp_packet/loss_notification.h"
@@ -43,226 +34,6 @@
// possible by having a base class (containing e.g. the log time) are not
// considered to outweigh the added memory and runtime overhead incurred by
// adding a vptr.
-struct LoggedAlrStateEvent {
- LoggedAlrStateEvent() = default;
- LoggedAlrStateEvent(int64_t timestamp_us, bool in_alr)
- : timestamp_us(timestamp_us), in_alr(in_alr) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- bool in_alr;
-};
-
-struct LoggedAudioPlayoutEvent {
- LoggedAudioPlayoutEvent() = default;
- LoggedAudioPlayoutEvent(int64_t timestamp_us, uint32_t ssrc)
- : timestamp_us(timestamp_us), ssrc(ssrc) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- uint32_t ssrc;
-};
-
-struct LoggedAudioNetworkAdaptationEvent {
- LoggedAudioNetworkAdaptationEvent() = default;
- LoggedAudioNetworkAdaptationEvent(int64_t timestamp_us,
- const AudioEncoderRuntimeConfig& config)
- : timestamp_us(timestamp_us), config(config) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- AudioEncoderRuntimeConfig config;
-};
-
-struct LoggedBweDelayBasedUpdate {
- LoggedBweDelayBasedUpdate() = default;
- LoggedBweDelayBasedUpdate(int64_t timestamp_us,
- int32_t bitrate_bps,
- BandwidthUsage detector_state)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- int32_t bitrate_bps;
- BandwidthUsage detector_state;
-};
-
-struct LoggedBweLossBasedUpdate {
- LoggedBweLossBasedUpdate() = default;
- LoggedBweLossBasedUpdate(int64_t timestamp_us,
- int32_t bitrate_bps,
- uint8_t fraction_lost,
- int32_t expected_packets)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- int32_t bitrate_bps;
- uint8_t fraction_lost;
- int32_t expected_packets;
-};
-
-struct LoggedDtlsTransportState {
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- DtlsTransportState dtls_transport_state;
-};
-
-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_us / 1000; }
-
- int64_t timestamp_us;
- bool writable;
-};
-
-struct LoggedBweProbeClusterCreatedEvent {
- LoggedBweProbeClusterCreatedEvent() = default;
- LoggedBweProbeClusterCreatedEvent(int64_t timestamp_us,
- int32_t id,
- int32_t bitrate_bps,
- uint32_t min_packets,
- uint32_t min_bytes)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- int32_t id;
- int32_t bitrate_bps;
- uint32_t min_packets;
- uint32_t min_bytes;
-};
-
-struct LoggedBweProbeSuccessEvent {
- LoggedBweProbeSuccessEvent() = default;
- LoggedBweProbeSuccessEvent(int64_t timestamp_us,
- int32_t id,
- int32_t bitrate_bps)
- : timestamp_us(timestamp_us), id(id), bitrate_bps(bitrate_bps) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- int32_t id;
- int32_t bitrate_bps;
-};
-
-struct LoggedBweProbeFailureEvent {
- LoggedBweProbeFailureEvent() = default;
- LoggedBweProbeFailureEvent(int64_t timestamp_us,
- int32_t id,
- ProbeFailureReason failure_reason)
- : timestamp_us(timestamp_us), id(id), failure_reason(failure_reason) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- int32_t id;
- ProbeFailureReason failure_reason;
-};
-
-struct LoggedFrameDecoded {
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- int64_t render_time_ms;
- uint32_t ssrc;
- int width;
- int height;
- VideoCodecType codec;
- uint8_t qp;
-};
-
-struct LoggedIceCandidatePairConfig {
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- 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;
-};
-
-struct LoggedIceCandidatePairEvent {
- LoggedIceCandidatePairEvent() = default;
- LoggedIceCandidatePairEvent(int64_t timestamp_us,
- IceCandidatePairEventType type,
- uint32_t candidate_pair_id,
- uint32_t transaction_id)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- IceCandidatePairEventType type;
- uint32_t candidate_pair_id;
- uint32_t transaction_id;
-};
-
-struct LoggedRouteChangeEvent {
- LoggedRouteChangeEvent() = default;
- LoggedRouteChangeEvent(int64_t timestamp_ms,
- bool connected,
- uint32_t overhead)
- : timestamp_ms(timestamp_ms), connected(connected), overhead(overhead) {}
-
- int64_t log_time_us() const { return timestamp_ms * 1000; }
- int64_t log_time_ms() const { return timestamp_ms; }
-
- int64_t timestamp_ms;
- bool connected;
- uint32_t overhead;
-};
-
-struct LoggedRemoteEstimateEvent {
- LoggedRemoteEstimateEvent() = default;
-
- int64_t log_time_us() const { return timestamp_ms * 1000; }
- int64_t log_time_ms() const { return timestamp_ms; }
-
- int64_t timestamp_ms;
- absl::optional<DataRate> link_capacity_lower;
- absl::optional<DataRate> link_capacity_upper;
-};
struct LoggedRtpPacket {
LoggedRtpPacket(int64_t timestamp_us,
@@ -480,54 +251,6 @@
int64_t timestamp_us;
};
-struct LoggedAudioRecvConfig {
- LoggedAudioRecvConfig() = default;
- LoggedAudioRecvConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
- : timestamp_us(timestamp_us), config(config) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- rtclog::StreamConfig config;
-};
-
-struct LoggedAudioSendConfig {
- LoggedAudioSendConfig() = default;
- LoggedAudioSendConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
- : timestamp_us(timestamp_us), config(config) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- rtclog::StreamConfig config;
-};
-
-struct LoggedVideoRecvConfig {
- LoggedVideoRecvConfig() = default;
- LoggedVideoRecvConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
- : timestamp_us(timestamp_us), config(config) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- rtclog::StreamConfig config;
-};
-
-struct LoggedVideoSendConfig {
- LoggedVideoSendConfig() = default;
- LoggedVideoSendConfig(int64_t timestamp_us, const rtclog::StreamConfig config)
- : timestamp_us(timestamp_us), config(config) {}
-
- int64_t log_time_us() const { return timestamp_us; }
- int64_t log_time_ms() const { return timestamp_us / 1000; }
-
- int64_t timestamp_us;
- rtclog::StreamConfig config;
-};
-
struct InferredRouteChangeEvent {
int64_t log_time_ms() const { return log_time.ms(); }
int64_t log_time_us() const { return log_time.us(); }
@@ -602,68 +325,9 @@
LoggedIceEventType event_type;
};
-struct LoggedGenericPacketSent {
- LoggedGenericPacketSent() = default;
- LoggedGenericPacketSent(int64_t timestamp_us,
- int64_t packet_number,
- size_t overhead_length,
- size_t payload_length,
- size_t padding_length)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
- size_t packet_length() const {
- return payload_length + padding_length + overhead_length;
- }
- int64_t timestamp_us;
- int64_t packet_number;
- size_t overhead_length;
- size_t payload_length;
- size_t padding_length;
-};
-struct LoggedGenericPacketReceived {
- LoggedGenericPacketReceived() = default;
- LoggedGenericPacketReceived(int64_t timestamp_us,
- int64_t packet_number,
- int packet_length)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- int64_t packet_number;
- int packet_length;
-};
-
-struct LoggedGenericAckReceived {
- LoggedGenericAckReceived() = default;
- LoggedGenericAckReceived(int64_t timestamp_us,
- int64_t packet_number,
- int64_t acked_packet_number,
- absl::optional<int64_t> receive_acked_packet_time_ms)
- : timestamp_us(timestamp_us),
- 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_us / 1000; }
-
- int64_t timestamp_us;
- 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_LOGGED_EVENTS_H_
diff --git a/logging/rtc_event_log/rtc_event_log_parser.h b/logging/rtc_event_log/rtc_event_log_parser.h
index dce075a..d890792 100644
--- a/logging/rtc_event_log/rtc_event_log_parser.h
+++ b/logging/rtc_event_log/rtc_event_log_parser.h
@@ -22,6 +22,28 @@
#include "api/rtc_event_log/rtc_event_log.h"
#include "call/video_receive_stream.h"
#include "call/video_send_stream.h"
+#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
+#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
+#include "logging/rtc_event_log/events/rtc_event_audio_playout.h"
+#include "logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h"
+#include "logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h"
+#include "logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h"
+#include "logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h"
+#include "logging/rtc_event_log/events/rtc_event_dtls_transport_state.h"
+#include "logging/rtc_event_log/events/rtc_event_dtls_writable_state.h"
+#include "logging/rtc_event_log/events/rtc_event_frame_decoded.h"
+#include "logging/rtc_event_log/events/rtc_event_generic_ack_received.h"
+#include "logging/rtc_event_log/events/rtc_event_generic_packet_received.h"
+#include "logging/rtc_event_log/events/rtc_event_generic_packet_sent.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
+#include "logging/rtc_event_log/events/rtc_event_probe_cluster_created.h"
+#include "logging/rtc_event_log/events/rtc_event_probe_result_failure.h"
+#include "logging/rtc_event_log/events/rtc_event_probe_result_success.h"
+#include "logging/rtc_event_log/events/rtc_event_remote_estimate.h"
+#include "logging/rtc_event_log/events/rtc_event_route_change.h"
+#include "logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h"
+#include "logging/rtc_event_log/events/rtc_event_video_send_stream_config.h"
#include "logging/rtc_event_log/logged_events.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"