diff --git a/logging/rtc_event_log/rtc_event_log_impl.cc b/logging/rtc_event_log/rtc_event_log_impl.cc index 2f46e3ede1..c2e46a2fda 100644 --- a/logging/rtc_event_log/rtc_event_log_impl.cc +++ b/logging/rtc_event_log/rtc_event_log_impl.cc @@ -65,8 +65,10 @@ std::unique_ptr CreateEncoder( RtcEventLog::EncodingType type) { switch (type) { case RtcEventLog::EncodingType::Legacy: + RTC_LOG(LS_INFO) << "Creating legacy encoder for RTC event log."; return absl::make_unique(); case RtcEventLog::EncodingType::NewFormat: + RTC_LOG(LS_INFO) << "Creating new format encoder for RTC event log."; return absl::make_unique(); default: RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type) diff --git a/pc/peerconnectionfactory.cc b/pc/peerconnectionfactory.cc index edc13034a3..32b3980e0e 100644 --- a/pc/peerconnectionfactory.cc +++ b/pc/peerconnectionfactory.cc @@ -47,6 +47,7 @@ #include "pc/videocapturertracksource.h" #include "pc/videotrack.h" #include "rtc_base/experiments/congestion_controller_experiment.h" +#include "system_wrappers/include/field_trial.h" namespace webrtc { @@ -445,7 +446,10 @@ rtc::Thread* PeerConnectionFactory::network_thread() { std::unique_ptr PeerConnectionFactory::CreateRtcEventLog_w() { RTC_DCHECK_RUN_ON(worker_thread_); - const auto encoding_type = RtcEventLog::EncodingType::Legacy; + + auto encoding_type = RtcEventLog::EncodingType::Legacy; + if (field_trial::IsEnabled("WebRTC-RtcEventLogNewFormat")) + encoding_type = RtcEventLog::EncodingType::NewFormat; return event_log_factory_ ? event_log_factory_->CreateRtcEventLog(encoding_type) : absl::make_unique();