Structured ICE logging via RtcEventLog.

This change list contains the structured logging module for ICE using
the RtcEventLog infrastructure, and also extension to the log parser and
analyzer.

Bug: None
Change-Id: I6539cf282155c2cde4d3161c53500c0746671a02
Reviewed-on: https://webrtc-review.googlesource.com/34622
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21816}
This commit is contained in:
Qingsi Wang
2018-01-30 16:54:15 -08:00
committed by Commit Bot
parent 3518e7bea4
commit eed5aa8904
19 changed files with 1128 additions and 43 deletions

View File

@ -17,6 +17,8 @@
#include "call/video_receive_stream.h"
#include "call/video_send_stream.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_event_log.h"
#include "logging/rtc_event_log/rtc_stream_config.h"
@ -70,6 +72,25 @@ class ParsedRtcEventLog {
bool in_alr;
};
struct IceCandidatePairConfig {
uint64_t timestamp;
IceCandidatePairEventType 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 IceCandidatePairEvent {
uint64_t timestamp;
IceCandidatePairEventType type;
uint32_t candidate_pair_id;
};
enum EventType {
UNKNOWN_EVENT = 0,
LOG_START = 1,
@ -86,7 +107,9 @@ class ParsedRtcEventLog {
AUDIO_NETWORK_ADAPTATION_EVENT = 16,
BWE_PROBE_CLUSTER_CREATED_EVENT = 17,
BWE_PROBE_RESULT_EVENT = 18,
ALR_STATE_EVENT = 19
ALR_STATE_EVENT = 19,
ICE_CANDIDATE_PAIR_CONFIG = 20,
ICE_CANDIDATE_PAIR_EVENT = 21,
};
enum class MediaType { ANY, AUDIO, VIDEO, DATA };
@ -188,6 +211,9 @@ class ParsedRtcEventLog {
AlrStateEvent GetAlrState(size_t index) const;
IceCandidatePairConfig GetIceCandidatePairConfig(size_t index) const;
IceCandidatePairEvent GetIceCandidatePairEvent(size_t index) const;
private:
rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const;
std::vector<rtclog::StreamConfig> GetVideoSendConfig(