From 42e7d9c929efeba364a455639baa5e41c52ffef3 Mon Sep 17 00:00:00 2001 From: Ilya Nikolaevskiy Date: Fri, 2 Nov 2018 13:14:37 +0100 Subject: [PATCH] Enable rtc event log in *_loopback tools running with renderers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: none Change-Id: I6debe89fa972474be8862c568a23e491b678833d Reviewed-on: https://webrtc-review.googlesource.com/c/109004 Commit-Queue: Ilya Nikolaevskiy Reviewed-by: Erik Språng Reviewed-by: Björn Terelius Cr-Commit-Position: refs/heads/master@{#25485} --- video/video_quality_test.cc | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc index 4800fafe8b..08d5d1fde0 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc @@ -1243,7 +1243,28 @@ void VideoQualityTest::RunWithRenderers(const Params& params) { std::unique_ptr recv_transport; std::unique_ptr local_preview; std::vector> loopback_renderers; - RtcEventLogNullImpl null_event_log; + + if (!params.logging.rtc_event_log_name.empty()) { + send_event_log_ = RtcEventLog::Create(RtcEventLog::EncodingType::Legacy); + recv_event_log_ = RtcEventLog::Create(RtcEventLog::EncodingType::Legacy); + std::unique_ptr send_output( + absl::make_unique( + params.logging.rtc_event_log_name + "_send", + RtcEventLog::kUnlimitedOutput)); + std::unique_ptr recv_output( + absl::make_unique( + params.logging.rtc_event_log_name + "_recv", + RtcEventLog::kUnlimitedOutput)); + bool event_log_started = + send_event_log_->StartLogging(std::move(send_output), + /*output_period_ms=*/5000) && + recv_event_log_->StartLogging(std::move(recv_output), + /*output_period_ms=*/5000); + RTC_DCHECK(event_log_started); + } else { + send_event_log_ = RtcEventLog::CreateNull(); + recv_event_log_ = RtcEventLog::CreateNull(); + } task_queue_.SendTask([&]() { params_ = params; @@ -1251,9 +1272,9 @@ void VideoQualityTest::RunWithRenderers(const Params& params) { // TODO(ivica): Remove bitrate_config and use the default Call::Config(), to // match the full stack tests. - Call::Config send_call_config(&null_event_log); + Call::Config send_call_config(send_event_log_.get()); send_call_config.bitrate_config = params_.call.call_bitrate_config; - Call::Config recv_call_config(&null_event_log); + Call::Config recv_call_config(recv_event_log_.get()); if (params_.audio.enabled) InitializeAudioDevice(