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}
This commit is contained in:
parent
fe06dbdfa2
commit
6f597bd2ab
@ -318,10 +318,16 @@ if (rtc_enable_protobuf) {
|
||||
|
||||
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",
|
||||
|
||||
@ -37,5 +37,17 @@ class RtcEventAlrState final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -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 @@ class RtcEventAudioNetworkAdaptation final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -39,6 +39,18 @@ class RtcEventAudioPlayout final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -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 @@ class RtcEventAudioReceiveStreamConfig final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -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 @@ class RtcEventAudioSendStreamConfig final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -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 @@ class RtcEventBweUpdateDelayBased final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -45,6 +45,26 @@ class RtcEventBweUpdateLossBased final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -40,6 +40,14 @@ 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_us / 1000; }
|
||||
|
||||
int64_t timestamp_us;
|
||||
DtlsTransportState dtls_transport_state;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_TRANSPORT_STATE_H_
|
||||
|
||||
@ -37,6 +37,17 @@ 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_us / 1000; }
|
||||
|
||||
int64_t timestamp_us;
|
||||
bool writable;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_DTLS_WRITABLE_STATE_H_
|
||||
|
||||
@ -55,6 +55,19 @@ 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_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_
|
||||
|
||||
@ -75,6 +75,26 @@ class RtcEventGenericAckReceived final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -43,6 +43,23 @@ class RtcEventGenericPacketReceived final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -60,6 +60,31 @@ class RtcEventGenericPacketSent final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -54,6 +54,26 @@ class RtcEventIceCandidatePair final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -112,6 +112,22 @@ 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_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_
|
||||
|
||||
@ -48,6 +48,29 @@ class RtcEventProbeClusterCreated final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -48,6 +48,21 @@ class RtcEventProbeResultFailure final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -41,6 +41,21 @@ class RtcEventProbeResultSuccess final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -33,5 +33,16 @@ class RtcEventRemoteEstimate final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -39,5 +39,20 @@ class RtcEventRouteChange final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -40,6 +40,18 @@ class RtcEventVideoReceiveStreamConfig final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -39,6 +39,17 @@ class RtcEventVideoSendStreamConfig final : public RtcEvent {
|
||||
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_
|
||||
|
||||
@ -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 @@ namespace webrtc {
|
||||
// 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 @@ struct LoggedStopEvent {
|
||||
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 @@ struct LoggedIceEvent {
|
||||
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_
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user