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:

committed by
Commit Bot

parent
3b3364ed2e
commit
78ac89b82f
@ -154,7 +154,6 @@ rtc_static_library("rtc_event_log_impl_encoder") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
":ice_log",
|
||||
":rtc_event_audio",
|
||||
":rtc_event_bwe",
|
||||
":rtc_event_log_api",
|
||||
@ -207,7 +206,6 @@ rtc_static_library("rtc_event_log_impl_base") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
":ice_log",
|
||||
":rtc_event_log_api",
|
||||
":rtc_event_log_impl_encoder",
|
||||
":rtc_event_log_impl_output",
|
||||
@ -245,7 +243,6 @@ if (rtc_enable_protobuf) {
|
||||
]
|
||||
|
||||
deps = [
|
||||
":ice_log",
|
||||
":rtc_event_bwe",
|
||||
":rtc_event_log2_proto",
|
||||
":rtc_event_log_api",
|
||||
@ -383,23 +380,6 @@ if (rtc_enable_protobuf) {
|
||||
}
|
||||
}
|
||||
|
||||
rtc_source_set("ice_log") {
|
||||
sources = [
|
||||
"rtc_event_log/events/rtc_event_ice_candidate_pair.cc",
|
||||
"rtc_event_log/events/rtc_event_ice_candidate_pair.h",
|
||||
"rtc_event_log/events/rtc_event_ice_candidate_pair_config.cc",
|
||||
"rtc_event_log/events/rtc_event_ice_candidate_pair_config.h",
|
||||
"rtc_event_log/icelogger.cc",
|
||||
"rtc_event_log/icelogger.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":rtc_event_log_api",
|
||||
"../api:libjingle_logging_api",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
]
|
||||
}
|
||||
|
||||
if (rtc_include_tests) {
|
||||
rtc_source_set("mocks") {
|
||||
testonly = true
|
||||
|
@ -17,8 +17,6 @@
|
||||
#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_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"
|
||||
@ -105,122 +103,6 @@ rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode(RtcpMode rtcp_mode) {
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::VideoReceiveConfig::RTCP_COMPOUND;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairConfig::IceCandidatePairConfigType
|
||||
ConvertIceCandidatePairConfigType(IceCandidatePairEventType type) {
|
||||
switch (type) {
|
||||
case IceCandidatePairEventType::kAdded:
|
||||
return rtclog::IceCandidatePairConfig::ADDED;
|
||||
case IceCandidatePairEventType::kUpdated:
|
||||
return rtclog::IceCandidatePairConfig::UPDATED;
|
||||
case IceCandidatePairEventType::kDestroyed:
|
||||
return rtclog::IceCandidatePairConfig::DESTROYED;
|
||||
case IceCandidatePairEventType::kSelected:
|
||||
return rtclog::IceCandidatePairConfig::SELECTED;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairConfig::ADDED;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairConfig::IceCandidateType ConvertIceCandidateType(
|
||||
IceCandidateType type) {
|
||||
switch (type) {
|
||||
case IceCandidateType::kLocal:
|
||||
return rtclog::IceCandidatePairConfig::LOCAL;
|
||||
case IceCandidateType::kStun:
|
||||
return rtclog::IceCandidatePairConfig::STUN;
|
||||
case IceCandidateType::kPrflx:
|
||||
return rtclog::IceCandidatePairConfig::PRFLX;
|
||||
case IceCandidateType::kRelay:
|
||||
return rtclog::IceCandidatePairConfig::RELAY;
|
||||
case IceCandidateType::kUnknown:
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairConfig::Protocol ConvertIceCandidatePairProtocol(
|
||||
IceCandidatePairProtocol protocol) {
|
||||
switch (protocol) {
|
||||
case IceCandidatePairProtocol::kUdp:
|
||||
return rtclog::IceCandidatePairConfig::UDP;
|
||||
case IceCandidatePairProtocol::kTcp:
|
||||
return rtclog::IceCandidatePairConfig::TCP;
|
||||
case IceCandidatePairProtocol::kSsltcp:
|
||||
return rtclog::IceCandidatePairConfig::SSLTCP;
|
||||
case IceCandidatePairProtocol::kTls:
|
||||
return rtclog::IceCandidatePairConfig::TLS;
|
||||
case IceCandidatePairProtocol::kUnknown:
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairConfig::AddressFamily
|
||||
ConvertIceCandidatePairAddressFamily(
|
||||
IceCandidatePairAddressFamily address_family) {
|
||||
switch (address_family) {
|
||||
case IceCandidatePairAddressFamily::kIpv4:
|
||||
return rtclog::IceCandidatePairConfig::IPV4;
|
||||
case IceCandidatePairAddressFamily::kIpv6:
|
||||
return rtclog::IceCandidatePairConfig::IPV6;
|
||||
case IceCandidatePairAddressFamily::kUnknown:
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairConfig::NetworkType ConvertIceCandidateNetworkType(
|
||||
IceCandidateNetworkType network_type) {
|
||||
switch (network_type) {
|
||||
case IceCandidateNetworkType::kEthernet:
|
||||
return rtclog::IceCandidatePairConfig::ETHERNET;
|
||||
case IceCandidateNetworkType::kLoopback:
|
||||
return rtclog::IceCandidatePairConfig::LOOPBACK;
|
||||
case IceCandidateNetworkType::kWifi:
|
||||
return rtclog::IceCandidatePairConfig::WIFI;
|
||||
case IceCandidateNetworkType::kVpn:
|
||||
return rtclog::IceCandidatePairConfig::VPN;
|
||||
case IceCandidateNetworkType::kCellular:
|
||||
return rtclog::IceCandidatePairConfig::CELLULAR;
|
||||
case IceCandidateNetworkType::kUnknown:
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE;
|
||||
}
|
||||
|
||||
rtclog::IceCandidatePairEvent::IceCandidatePairEventType
|
||||
ConvertIceCandidatePairEventType(IceCandidatePairEventType type) {
|
||||
switch (type) {
|
||||
case IceCandidatePairEventType::kCheckSent:
|
||||
return rtclog::IceCandidatePairEvent::CHECK_SENT;
|
||||
case IceCandidatePairEventType::kCheckReceived:
|
||||
return rtclog::IceCandidatePairEvent::CHECK_RECEIVED;
|
||||
case IceCandidatePairEventType::kCheckResponseSent:
|
||||
return rtclog::IceCandidatePairEvent::CHECK_RESPONSE_SENT;
|
||||
case IceCandidatePairEventType::kCheckResponseReceived:
|
||||
return rtclog::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return rtclog::IceCandidatePairEvent::CHECK_SENT;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
std::string RtcEventLogEncoderLegacy::EncodeLogStart(int64_t timestamp_us) {
|
||||
@ -289,17 +171,6 @@ std::string RtcEventLogEncoderLegacy::Encode(const RtcEvent& event) {
|
||||
return EncodeBweUpdateLossBased(rtc_event);
|
||||
}
|
||||
|
||||
case RtcEvent::Type::IceCandidatePairConfig: {
|
||||
auto& rtc_event =
|
||||
static_cast<const RtcEventIceCandidatePairConfig&>(event);
|
||||
return EncodeIceCandidatePairConfig(rtc_event);
|
||||
}
|
||||
|
||||
case RtcEvent::Type::IceCandidatePairEvent: {
|
||||
auto& rtc_event = static_cast<const RtcEventIceCandidatePair&>(event);
|
||||
return EncodeIceCandidatePairEvent(rtc_event);
|
||||
}
|
||||
|
||||
case RtcEvent::Type::ProbeClusterCreated: {
|
||||
auto& rtc_event = static_cast<const RtcEventProbeClusterCreated&>(event);
|
||||
return EncodeProbeClusterCreated(rtc_event);
|
||||
@ -472,48 +343,6 @@ std::string RtcEventLogEncoderLegacy::EncodeBweUpdateLossBased(
|
||||
return Serialize(&rtclog_event);
|
||||
}
|
||||
|
||||
std::string RtcEventLogEncoderLegacy::EncodeIceCandidatePairConfig(
|
||||
const RtcEventIceCandidatePairConfig& event) {
|
||||
rtclog::Event encoded_rtc_event;
|
||||
encoded_rtc_event.set_timestamp_us(event.timestamp_us_);
|
||||
encoded_rtc_event.set_type(rtclog::Event::ICE_CANDIDATE_PAIR_CONFIG);
|
||||
|
||||
auto encoded_ice_event =
|
||||
encoded_rtc_event.mutable_ice_candidate_pair_config();
|
||||
encoded_ice_event->set_config_type(
|
||||
ConvertIceCandidatePairConfigType(event.type_));
|
||||
encoded_ice_event->set_candidate_pair_id(event.candidate_pair_id_);
|
||||
const auto& desc = event.candidate_pair_desc_;
|
||||
encoded_ice_event->set_local_candidate_type(
|
||||
ConvertIceCandidateType(desc.local_candidate_type));
|
||||
encoded_ice_event->set_local_relay_protocol(
|
||||
ConvertIceCandidatePairProtocol(desc.local_relay_protocol));
|
||||
encoded_ice_event->set_local_network_type(
|
||||
ConvertIceCandidateNetworkType(desc.local_network_type));
|
||||
encoded_ice_event->set_local_address_family(
|
||||
ConvertIceCandidatePairAddressFamily(desc.local_address_family));
|
||||
encoded_ice_event->set_remote_candidate_type(
|
||||
ConvertIceCandidateType(desc.remote_candidate_type));
|
||||
encoded_ice_event->set_remote_address_family(
|
||||
ConvertIceCandidatePairAddressFamily(desc.remote_address_family));
|
||||
encoded_ice_event->set_candidate_pair_protocol(
|
||||
ConvertIceCandidatePairProtocol(desc.candidate_pair_protocol));
|
||||
return Serialize(&encoded_rtc_event);
|
||||
}
|
||||
|
||||
std::string RtcEventLogEncoderLegacy::EncodeIceCandidatePairEvent(
|
||||
const RtcEventIceCandidatePair& event) {
|
||||
rtclog::Event encoded_rtc_event;
|
||||
encoded_rtc_event.set_timestamp_us(event.timestamp_us_);
|
||||
encoded_rtc_event.set_type(rtclog::Event::ICE_CANDIDATE_PAIR_EVENT);
|
||||
|
||||
auto encoded_ice_event = encoded_rtc_event.mutable_ice_candidate_pair_event();
|
||||
encoded_ice_event->set_event_type(
|
||||
ConvertIceCandidatePairEventType(event.type_));
|
||||
encoded_ice_event->set_candidate_pair_id(event.candidate_pair_id_);
|
||||
return Serialize(&encoded_rtc_event);
|
||||
}
|
||||
|
||||
std::string RtcEventLogEncoderLegacy::EncodeProbeClusterCreated(
|
||||
const RtcEventProbeClusterCreated& event) {
|
||||
rtclog::Event rtclog_event;
|
||||
|
@ -32,8 +32,6 @@ class RtcEventAudioReceiveStreamConfig;
|
||||
class RtcEventAudioSendStreamConfig;
|
||||
class RtcEventBweUpdateDelayBased;
|
||||
class RtcEventBweUpdateLossBased;
|
||||
class RtcEventIceCandidatePairConfig;
|
||||
class RtcEventIceCandidatePair;
|
||||
class RtcEventLoggingStarted;
|
||||
class RtcEventLoggingStopped;
|
||||
class RtcEventProbeClusterCreated;
|
||||
@ -73,10 +71,6 @@ class RtcEventLogEncoderLegacy final : public RtcEventLogEncoder {
|
||||
std::string EncodeBweUpdateDelayBased(
|
||||
const RtcEventBweUpdateDelayBased& event);
|
||||
std::string EncodeBweUpdateLossBased(const RtcEventBweUpdateLossBased& event);
|
||||
std::string EncodeIceCandidatePairConfig(
|
||||
const RtcEventIceCandidatePairConfig& event);
|
||||
std::string EncodeIceCandidatePairEvent(
|
||||
const RtcEventIceCandidatePair& event);
|
||||
std::string EncodeProbeClusterCreated(
|
||||
const RtcEventProbeClusterCreated& event);
|
||||
std::string EncodeProbeResultFailure(const RtcEventProbeResultFailure& event);
|
||||
|
@ -37,8 +37,6 @@ class RtcEvent {
|
||||
AudioSendStreamConfig,
|
||||
BweUpdateDelayBased,
|
||||
BweUpdateLossBased,
|
||||
IceCandidatePairConfig,
|
||||
IceCandidatePairEvent,
|
||||
ProbeClusterCreated,
|
||||
ProbeResultFailure,
|
||||
ProbeResultSuccess,
|
||||
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
RtcEventIceCandidatePair::RtcEventIceCandidatePair(
|
||||
IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id)
|
||||
: type_(type), candidate_pair_id_(candidate_pair_id) {}
|
||||
|
||||
RtcEventIceCandidatePair::~RtcEventIceCandidatePair() = default;
|
||||
|
||||
RtcEvent::Type RtcEventIceCandidatePair::GetType() const {
|
||||
return RtcEvent::Type::IceCandidatePairEvent;
|
||||
}
|
||||
|
||||
bool RtcEventIceCandidatePair::IsConfigEvent() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_
|
||||
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
enum class IceCandidatePairEventType {
|
||||
// Config event types for events related to the candiate pair creation and
|
||||
// life-cycle management.
|
||||
kAdded,
|
||||
kUpdated,
|
||||
kDestroyed,
|
||||
kSelected,
|
||||
// Non-config event types.
|
||||
kCheckSent,
|
||||
kCheckReceived,
|
||||
kCheckResponseSent,
|
||||
kCheckResponseReceived,
|
||||
};
|
||||
|
||||
class RtcEventIceCandidatePair final : public RtcEvent {
|
||||
public:
|
||||
RtcEventIceCandidatePair(IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id);
|
||||
|
||||
~RtcEventIceCandidatePair() override;
|
||||
|
||||
Type GetType() const override;
|
||||
|
||||
bool IsConfigEvent() const override;
|
||||
|
||||
const IceCandidatePairEventType type_;
|
||||
const uint32_t candidate_pair_id_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
IceCandidatePairDescription::IceCandidatePairDescription() {
|
||||
local_candidate_type = IceCandidateType::kUnknown;
|
||||
local_relay_protocol = IceCandidatePairProtocol::kUnknown;
|
||||
local_network_type = IceCandidateNetworkType::kUnknown;
|
||||
local_address_family = IceCandidatePairAddressFamily::kUnknown;
|
||||
remote_candidate_type = IceCandidateType::kUnknown;
|
||||
remote_address_family = IceCandidatePairAddressFamily::kUnknown;
|
||||
candidate_pair_protocol = IceCandidatePairProtocol::kUnknown;
|
||||
}
|
||||
|
||||
IceCandidatePairDescription::IceCandidatePairDescription(
|
||||
const IceCandidatePairDescription& other) {
|
||||
local_candidate_type = other.local_candidate_type;
|
||||
local_relay_protocol = other.local_relay_protocol;
|
||||
local_network_type = other.local_network_type;
|
||||
local_address_family = other.local_address_family;
|
||||
remote_candidate_type = other.remote_candidate_type;
|
||||
remote_address_family = other.remote_address_family;
|
||||
candidate_pair_protocol = other.candidate_pair_protocol;
|
||||
}
|
||||
|
||||
IceCandidatePairDescription::~IceCandidatePairDescription() {}
|
||||
|
||||
RtcEventIceCandidatePairConfig::RtcEventIceCandidatePairConfig(
|
||||
IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id,
|
||||
const IceCandidatePairDescription& candidate_pair_desc)
|
||||
: type_(type),
|
||||
candidate_pair_id_(candidate_pair_id),
|
||||
candidate_pair_desc_(candidate_pair_desc) {}
|
||||
|
||||
RtcEventIceCandidatePairConfig::~RtcEventIceCandidatePairConfig() = default;
|
||||
|
||||
RtcEvent::Type RtcEventIceCandidatePairConfig::GetType() const {
|
||||
return RtcEvent::Type::IceCandidatePairConfig;
|
||||
}
|
||||
|
||||
// The ICE candidate pair config event is not equivalent to a RtcEventLog config
|
||||
// event.
|
||||
bool RtcEventIceCandidatePairConfig::IsConfigEvent() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_CONFIG_H_
|
||||
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_CONFIG_H_
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event.h"
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// TODO(qingsi): Change the names of candidate types to "host", "srflx", "prflx"
|
||||
// and "relay" after the naming is spec-compliant in the signaling part
|
||||
enum class IceCandidateType {
|
||||
kLocal,
|
||||
kStun,
|
||||
kPrflx,
|
||||
kRelay,
|
||||
kUnknown,
|
||||
};
|
||||
|
||||
enum class IceCandidatePairProtocol {
|
||||
kUdp,
|
||||
kTcp,
|
||||
kSsltcp,
|
||||
kTls,
|
||||
kUnknown,
|
||||
};
|
||||
|
||||
enum class IceCandidatePairAddressFamily {
|
||||
kIpv4,
|
||||
kIpv6,
|
||||
kUnknown,
|
||||
};
|
||||
|
||||
enum class IceCandidateNetworkType {
|
||||
kEthernet,
|
||||
kLoopback,
|
||||
kWifi,
|
||||
kVpn,
|
||||
kCellular,
|
||||
kUnknown,
|
||||
};
|
||||
|
||||
class IceCandidatePairDescription {
|
||||
public:
|
||||
IceCandidatePairDescription();
|
||||
explicit IceCandidatePairDescription(
|
||||
const IceCandidatePairDescription& other);
|
||||
|
||||
~IceCandidatePairDescription();
|
||||
|
||||
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 RtcEventIceCandidatePairConfig final : public RtcEvent {
|
||||
public:
|
||||
RtcEventIceCandidatePairConfig(
|
||||
IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id,
|
||||
const IceCandidatePairDescription& candidate_pair_desc);
|
||||
|
||||
~RtcEventIceCandidatePairConfig() override;
|
||||
|
||||
Type GetType() const override;
|
||||
|
||||
bool IsConfigEvent() const override;
|
||||
|
||||
const IceCandidatePairEventType type_;
|
||||
const uint32_t candidate_pair_id_;
|
||||
const IceCandidatePairDescription candidate_pair_desc_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_CONFIG_H_
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "logging/rtc_event_log/icelogger.h"
|
||||
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
IceEventLog::IceEventLog() {}
|
||||
IceEventLog::~IceEventLog() {}
|
||||
|
||||
bool IceEventLog::IsIceCandidatePairConfigEvent(
|
||||
IceCandidatePairEventType type) {
|
||||
return (type == IceCandidatePairEventType::kAdded) ||
|
||||
(type == IceCandidatePairEventType::kUpdated) ||
|
||||
(type == IceCandidatePairEventType::kDestroyed) ||
|
||||
(type == IceCandidatePairEventType::kSelected);
|
||||
}
|
||||
|
||||
void IceEventLog::LogCandidatePairEvent(
|
||||
IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id,
|
||||
const IceCandidatePairDescription& candidate_pair_desc) {
|
||||
if (event_log_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (IsIceCandidatePairConfigEvent(type)) {
|
||||
candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc;
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventIceCandidatePairConfig>(
|
||||
type, candidate_pair_id, candidate_pair_desc));
|
||||
return;
|
||||
}
|
||||
event_log_->Log(
|
||||
rtc::MakeUnique<RtcEventIceCandidatePair>(type, candidate_pair_id));
|
||||
}
|
||||
|
||||
void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const {
|
||||
for (const auto& desc_id_pair : candidate_pair_desc_by_id_) {
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventIceCandidatePairConfig>(
|
||||
IceCandidatePairEventType::kUpdated, desc_id_pair.first,
|
||||
desc_id_pair.second));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef LOGGING_RTC_EVENT_LOG_ICELOGGER_H_
|
||||
#define LOGGING_RTC_EVENT_LOG_ICELOGGER_H_
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#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"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class RtcEventLog;
|
||||
|
||||
// IceEventLog wraps RtcEventLog and provides structural logging of ICE-specific
|
||||
// events. The logged events are serialized with other RtcEvent's if protobuf is
|
||||
// enabled in the build.
|
||||
class IceEventLog {
|
||||
public:
|
||||
IceEventLog();
|
||||
~IceEventLog();
|
||||
void set_event_log(RtcEventLog* event_log) { event_log_ = event_log; }
|
||||
void LogCandidatePairEvent(
|
||||
IceCandidatePairEventType type,
|
||||
uint32_t candidate_pair_id,
|
||||
const IceCandidatePairDescription& candidate_pair_desc);
|
||||
// This method constructs a config event for each candidate pair with their
|
||||
// description and logs these config events. It is intended to be called when
|
||||
// logging starts to ensure that we have at least one config for each
|
||||
// candidate pair id.
|
||||
void DumpCandidatePairDescriptionToMemoryAsConfigEvents() const;
|
||||
|
||||
private:
|
||||
bool IsIceCandidatePairConfigEvent(IceCandidatePairEventType type);
|
||||
|
||||
RtcEventLog* event_log_ = nullptr;
|
||||
std::unordered_map<uint32_t, IceCandidatePairDescription>
|
||||
candidate_pair_desc_by_id_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // LOGGING_RTC_EVENT_LOG_ICELOGGER_H_
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
bool RtcEventLogNullImpl::StartLogging(
|
||||
std::unique_ptr<RtcEventLogOutput> output,
|
||||
int64_t output_period_ms) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
@ -41,8 +41,6 @@ message Event {
|
||||
BWE_PROBE_CLUSTER_CREATED_EVENT = 17;
|
||||
BWE_PROBE_RESULT_EVENT = 18;
|
||||
ALR_STATE_EVENT = 19;
|
||||
ICE_CANDIDATE_PAIR_CONFIG = 20;
|
||||
ICE_CANDIDATE_PAIR_EVENT = 21;
|
||||
}
|
||||
|
||||
// required - Indicates the type of this event
|
||||
@ -87,12 +85,6 @@ message Event {
|
||||
|
||||
// required if type == ALR_STATE_EVENT
|
||||
AlrState alr_state = 19;
|
||||
|
||||
// required if type == ICE_CANDIDATE_PAIR_CONFIG
|
||||
IceCandidatePairConfig ice_candidate_pair_config = 20;
|
||||
|
||||
// required if type == ICE_CANDIDATE_PAIR_EVENT
|
||||
IceCandidatePairEvent ice_candidate_pair_event = 21;
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,85 +323,3 @@ message AlrState {
|
||||
// required - If we are in ALR or not.
|
||||
optional bool in_alr = 1;
|
||||
}
|
||||
|
||||
message IceCandidatePairConfig {
|
||||
enum IceCandidatePairConfigType {
|
||||
ADDED = 0;
|
||||
UPDATED = 1;
|
||||
DESTROYED = 2;
|
||||
SELECTED = 3;
|
||||
}
|
||||
|
||||
enum IceCandidateType {
|
||||
LOCAL = 0;
|
||||
STUN = 1;
|
||||
PRFLX = 2;
|
||||
RELAY = 3;
|
||||
UNKNOWN_CANDIDATE_TYPE = 4;
|
||||
}
|
||||
|
||||
enum Protocol {
|
||||
UDP = 0;
|
||||
TCP = 1;
|
||||
SSLTCP = 2;
|
||||
TLS = 3;
|
||||
UNKNOWN_PROTOCOL = 4;
|
||||
}
|
||||
|
||||
enum AddressFamily {
|
||||
IPV4 = 0;
|
||||
IPV6 = 1;
|
||||
UNKNOWN_ADDRESS_FAMILY = 2;
|
||||
}
|
||||
|
||||
enum NetworkType {
|
||||
ETHERNET = 0;
|
||||
LOOPBACK = 1;
|
||||
WIFI = 2;
|
||||
VPN = 3;
|
||||
CELLULAR = 4;
|
||||
UNKNOWN_NETWORK_TYPE = 5;
|
||||
}
|
||||
|
||||
// required
|
||||
optional IceCandidatePairConfigType config_type = 1;
|
||||
|
||||
// required
|
||||
optional uint32 candidate_pair_id = 2;
|
||||
|
||||
// required
|
||||
optional IceCandidateType local_candidate_type = 3;
|
||||
|
||||
// required
|
||||
optional Protocol local_relay_protocol = 4;
|
||||
|
||||
// required
|
||||
optional NetworkType local_network_type = 5;
|
||||
|
||||
// required
|
||||
optional AddressFamily local_address_family = 6;
|
||||
|
||||
// required
|
||||
optional IceCandidateType remote_candidate_type = 7;
|
||||
|
||||
// required
|
||||
optional AddressFamily remote_address_family = 8;
|
||||
|
||||
// required
|
||||
optional Protocol candidate_pair_protocol = 9;
|
||||
}
|
||||
|
||||
message IceCandidatePairEvent {
|
||||
enum IceCandidatePairEventType {
|
||||
CHECK_SENT = 0;
|
||||
CHECK_RECEIVED = 1;
|
||||
CHECK_RESPONSE_SENT = 2;
|
||||
CHECK_RESPONSE_RECEIVED = 3;
|
||||
}
|
||||
|
||||
// required
|
||||
optional IceCandidatePairEventType event_type = 1;
|
||||
|
||||
// required
|
||||
optional uint32 candidate_pair_id = 2;
|
||||
}
|
||||
|
@ -166,10 +166,6 @@ std::string EventTypeToString(webrtc::rtclog::Event::EventType event_type) {
|
||||
return "BWE_PROBE_RESULT";
|
||||
case webrtc::rtclog::Event::ALR_STATE_EVENT:
|
||||
return "ALR_STATE_EVENT";
|
||||
case webrtc::rtclog::Event::ICE_CANDIDATE_PAIR_CONFIG:
|
||||
return "ICE_CANDIDATE_PAIR_CONFIG";
|
||||
case webrtc::rtclog::Event::ICE_CANDIDATE_PAIR_EVENT:
|
||||
return "ICE_CANDIDATE_PAIR_EVENT";
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
return "UNKNOWN_EVENT";
|
||||
|
@ -60,7 +60,6 @@ DEFINE_bool(rtcp, true, "Use --nortcp to exclude RTCP packets.");
|
||||
DEFINE_bool(playout, true, "Use --noplayout to exclude audio playout events.");
|
||||
DEFINE_bool(ana, true, "Use --noana to exclude ANA events.");
|
||||
DEFINE_bool(probe, true, "Use --noprobe to exclude probe events.");
|
||||
DEFINE_bool(ice, true, "Use --noice to exclude ICE events.");
|
||||
|
||||
DEFINE_bool(print_full_packets,
|
||||
false,
|
||||
@ -797,34 +796,6 @@ int main(int argc, char* argv[]) {
|
||||
event_recognized = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case webrtc::ParsedRtcEventLog::ICE_CANDIDATE_PAIR_CONFIG: {
|
||||
if (FLAG_ice) {
|
||||
webrtc::ParsedRtcEventLog::IceCandidatePairConfig ice_cp_config =
|
||||
parsed_stream.GetIceCandidatePairConfig(i);
|
||||
// TODO(qingsi): convert the numeric representation of states to text
|
||||
std::cout << parsed_stream.GetTimestamp(i)
|
||||
<< "\tICE_CANDIDATE_PAIR_CONFIG"
|
||||
<< "\ttype=" << static_cast<int>(ice_cp_config.type)
|
||||
<< std::endl;
|
||||
}
|
||||
event_recognized = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case webrtc::ParsedRtcEventLog::ICE_CANDIDATE_PAIR_EVENT: {
|
||||
if (FLAG_ice) {
|
||||
webrtc::ParsedRtcEventLog::IceCandidatePairEvent ice_cp_event =
|
||||
parsed_stream.GetIceCandidatePairEvent(i);
|
||||
// TODO(qingsi): convert the numeric representation of states to text
|
||||
std::cout << parsed_stream.GetTimestamp(i)
|
||||
<< "\tICE_CANDIDATE_PAIR_EVENT"
|
||||
<< "\ttype=" << static_cast<int>(ice_cp_event.type)
|
||||
<< std::endl;
|
||||
}
|
||||
event_recognized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!event_recognized) {
|
||||
|
@ -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(
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
#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"
|
||||
@ -72,25 +70,6 @@ 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,
|
||||
@ -107,9 +86,7 @@ class ParsedRtcEventLog {
|
||||
AUDIO_NETWORK_ADAPTATION_EVENT = 16,
|
||||
BWE_PROBE_CLUSTER_CREATED_EVENT = 17,
|
||||
BWE_PROBE_RESULT_EVENT = 18,
|
||||
ALR_STATE_EVENT = 19,
|
||||
ICE_CANDIDATE_PAIR_CONFIG = 20,
|
||||
ICE_CANDIDATE_PAIR_EVENT = 21,
|
||||
ALR_STATE_EVENT = 19
|
||||
};
|
||||
|
||||
enum class MediaType { ANY, AUDIO, VIDEO, DATA };
|
||||
@ -211,9 +188,6 @@ 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(
|
||||
|
Reference in New Issue
Block a user