Revert "Structured ICE logging via RtcEventLog."

This reverts commit eed5aa8904d09179971d3f4e7e10c109d7c62bfc.

Reason for revert: breaks downstream projects.

Original change's description:
> 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}

TBR=phoglund@webrtc.org,deadbeef@webrtc.org,terelius@webrtc.org,stefan@webrtc.org,pthatcher@webrtc.org,qingsi@google.com

Change-Id: I62d5807c636e442bec4ad1b1fdc4380102347be3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/46580
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21822}
This commit is contained in:
Mirko Bonadei
2018-01-31 09:38:28 +00:00
committed by Commit Bot
parent 3b3364ed2e
commit 78ac89b82f
19 changed files with 43 additions and 1128 deletions

View File

@ -76,10 +76,6 @@ ParsedRtcEventLog::EventType GetRuntimeEventType(
return ParsedRtcEventLog::EventType::BWE_PROBE_RESULT_EVENT;
case rtclog::Event::ALR_STATE_EVENT:
return ParsedRtcEventLog::EventType::ALR_STATE_EVENT;
case rtclog::Event::ICE_CANDIDATE_PAIR_CONFIG:
return ParsedRtcEventLog::EventType::ICE_CANDIDATE_PAIR_CONFIG;
case rtclog::Event::ICE_CANDIDATE_PAIR_EVENT:
return ParsedRtcEventLog::EventType::ICE_CANDIDATE_PAIR_EVENT;
}
return ParsedRtcEventLog::EventType::UNKNOWN_EVENT;
}
@ -98,108 +94,6 @@ BandwidthUsage GetRuntimeDetectorState(
return BandwidthUsage::kBwNormal;
}
IceCandidatePairEventType GetRuntimeIceCandidatePairConfigType(
rtclog::IceCandidatePairConfig::IceCandidatePairConfigType type) {
switch (type) {
case rtclog::IceCandidatePairConfig::ADDED:
return IceCandidatePairEventType::kAdded;
case rtclog::IceCandidatePairConfig::UPDATED:
return IceCandidatePairEventType::kUpdated;
case rtclog::IceCandidatePairConfig::DESTROYED:
return IceCandidatePairEventType::kDestroyed;
case rtclog::IceCandidatePairConfig::SELECTED:
return IceCandidatePairEventType::kSelected;
}
RTC_NOTREACHED();
return IceCandidatePairEventType::kAdded;
}
IceCandidateType GetRuntimeIceCandidateType(
rtclog::IceCandidatePairConfig::IceCandidateType type) {
switch (type) {
case rtclog::IceCandidatePairConfig::LOCAL:
return IceCandidateType::kLocal;
case rtclog::IceCandidatePairConfig::STUN:
return IceCandidateType::kStun;
case rtclog::IceCandidatePairConfig::PRFLX:
return IceCandidateType::kPrflx;
case rtclog::IceCandidatePairConfig::RELAY:
return IceCandidateType::kRelay;
case rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE:
return IceCandidateType::kUnknown;
}
RTC_NOTREACHED();
return IceCandidateType::kUnknown;
}
IceCandidatePairProtocol GetRuntimeIceCandidatePairProtocol(
rtclog::IceCandidatePairConfig::Protocol protocol) {
switch (protocol) {
case rtclog::IceCandidatePairConfig::UDP:
return IceCandidatePairProtocol::kUdp;
case rtclog::IceCandidatePairConfig::TCP:
return IceCandidatePairProtocol::kTcp;
case rtclog::IceCandidatePairConfig::SSLTCP:
return IceCandidatePairProtocol::kSsltcp;
case rtclog::IceCandidatePairConfig::TLS:
return IceCandidatePairProtocol::kTls;
case rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL:
return IceCandidatePairProtocol::kUnknown;
}
RTC_NOTREACHED();
return IceCandidatePairProtocol::kUnknown;
}
IceCandidatePairAddressFamily GetRuntimeIceCandidatePairAddressFamily(
rtclog::IceCandidatePairConfig::AddressFamily address_family) {
switch (address_family) {
case rtclog::IceCandidatePairConfig::IPV4:
return IceCandidatePairAddressFamily::kIpv4;
case rtclog::IceCandidatePairConfig::IPV6:
return IceCandidatePairAddressFamily::kIpv6;
case rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY:
return IceCandidatePairAddressFamily::kUnknown;
}
RTC_NOTREACHED();
return IceCandidatePairAddressFamily::kUnknown;
}
IceCandidateNetworkType GetRuntimeIceCandidateNetworkType(
rtclog::IceCandidatePairConfig::NetworkType network_type) {
switch (network_type) {
case rtclog::IceCandidatePairConfig::ETHERNET:
return IceCandidateNetworkType::kEthernet;
case rtclog::IceCandidatePairConfig::LOOPBACK:
return IceCandidateNetworkType::kLoopback;
case rtclog::IceCandidatePairConfig::WIFI:
return IceCandidateNetworkType::kWifi;
case rtclog::IceCandidatePairConfig::VPN:
return IceCandidateNetworkType::kVpn;
case rtclog::IceCandidatePairConfig::CELLULAR:
return IceCandidateNetworkType::kCellular;
case rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE:
return IceCandidateNetworkType::kUnknown;
}
RTC_NOTREACHED();
return IceCandidateNetworkType::kUnknown;
}
IceCandidatePairEventType GetRuntimeIceCandidatePairEventType(
rtclog::IceCandidatePairEvent::IceCandidatePairEventType type) {
switch (type) {
case rtclog::IceCandidatePairEvent::CHECK_SENT:
return IceCandidatePairEventType::kCheckSent;
case rtclog::IceCandidatePairEvent::CHECK_RECEIVED:
return IceCandidatePairEventType::kCheckReceived;
case rtclog::IceCandidatePairEvent::CHECK_RESPONSE_SENT:
return IceCandidatePairEventType::kCheckResponseSent;
case rtclog::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED:
return IceCandidatePairEventType::kCheckResponseReceived;
}
RTC_NOTREACHED();
return IceCandidatePairEventType::kCheckSent;
}
std::pair<uint64_t, bool> ParseVarInt(std::istream& stream) {
uint64_t varint = 0;
for (size_t bytes_read = 0; bytes_read < 10; ++bytes_read) {
@ -776,61 +670,6 @@ ParsedRtcEventLog::AlrStateEvent ParsedRtcEventLog::GetAlrState(
return res;
}
ParsedRtcEventLog::IceCandidatePairConfig
ParsedRtcEventLog::GetIceCandidatePairConfig(size_t index) const {
RTC_CHECK_LT(index, GetNumberOfEvents());
const rtclog::Event& rtc_event = events_[index];
RTC_CHECK(rtc_event.has_type());
RTC_CHECK_EQ(rtc_event.type(), rtclog::Event::ICE_CANDIDATE_PAIR_CONFIG);
IceCandidatePairConfig res;
const rtclog::IceCandidatePairConfig& config =
rtc_event.ice_candidate_pair_config();
res.timestamp = GetTimestamp(index);
RTC_CHECK(config.has_config_type());
res.type = GetRuntimeIceCandidatePairConfigType(config.config_type());
RTC_CHECK(config.has_candidate_pair_id());
res.candidate_pair_id = config.candidate_pair_id();
RTC_CHECK(config.has_local_candidate_type());
res.local_candidate_type =
GetRuntimeIceCandidateType(config.local_candidate_type());
RTC_CHECK(config.has_local_relay_protocol());
res.local_relay_protocol =
GetRuntimeIceCandidatePairProtocol(config.local_relay_protocol());
RTC_CHECK(config.has_local_network_type());
res.local_network_type =
GetRuntimeIceCandidateNetworkType(config.local_network_type());
RTC_CHECK(config.has_local_address_family());
res.local_address_family =
GetRuntimeIceCandidatePairAddressFamily(config.local_address_family());
RTC_CHECK(config.has_remote_candidate_type());
res.remote_candidate_type =
GetRuntimeIceCandidateType(config.remote_candidate_type());
RTC_CHECK(config.has_remote_address_family());
res.remote_address_family =
GetRuntimeIceCandidatePairAddressFamily(config.remote_address_family());
RTC_CHECK(config.has_candidate_pair_protocol());
res.candidate_pair_protocol =
GetRuntimeIceCandidatePairProtocol(config.candidate_pair_protocol());
return res;
}
ParsedRtcEventLog::IceCandidatePairEvent
ParsedRtcEventLog::GetIceCandidatePairEvent(size_t index) const {
RTC_CHECK_LT(index, GetNumberOfEvents());
const rtclog::Event& rtc_event = events_[index];
RTC_CHECK(rtc_event.has_type());
RTC_CHECK_EQ(rtc_event.type(), rtclog::Event::ICE_CANDIDATE_PAIR_EVENT);
IceCandidatePairEvent res;
const rtclog::IceCandidatePairEvent& event =
rtc_event.ice_candidate_pair_event();
res.timestamp = GetTimestamp(index);
RTC_CHECK(event.has_event_type());
res.type = GetRuntimeIceCandidatePairEventType(event.event_type());
RTC_CHECK(event.has_candidate_pair_id());
res.candidate_pair_id = event.candidate_pair_id();
return res;
}
// Returns the MediaType for registered SSRCs. Search from the end to use last
// registered types first.
ParsedRtcEventLog::MediaType ParsedRtcEventLog::GetMediaType(