diff --git a/video/BUILD.gn b/video/BUILD.gn index d18f3342e1..b00ea13425 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -188,6 +188,7 @@ if (rtc_include_tests) { deps = [ ":video_quality_test", "../modules/pacing:pacing", + "../rtc_base:rtc_base_approved", "../rtc_base/experiments:alr_experiment", "../test:field_trial", "../test:test_common", diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc index 2317020c58..61346a9e3f 100644 --- a/video/full_stack_tests.cc +++ b/video/full_stack_tests.cc @@ -10,10 +10,37 @@ #include #include "rtc_base/experiments/alr_experiment.h" +#include "rtc_base/flags.h" #include "test/field_trial.h" #include "test/gtest.h" #include "video/video_quality_test.h" +namespace webrtc { +namespace flags { + +DEFINE_bool(logs, false, "print logs to stderr"); + +DEFINE_string(rtc_event_log_name, + "", + "Filename for rtc event log. Two files " + "with \"_send\" and \"_recv\" suffixes will be created."); +std::string RtcEventLogName() { + return static_cast(FLAG_rtc_event_log_name); +} +DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream."); +std::string RtpDumpName() { + return static_cast(FLAG_rtp_dump_name); +} +DEFINE_string(encoded_frame_path, + "", + "The base path for encoded frame logs. Created files will have " + "the form ..(recv|send.).ivf"); +std::string EncodedFramePath() { + return static_cast(FLAG_encoded_frame_path); +} +} // namespace flags +} // namespace webrtc + namespace webrtc { namespace { @@ -22,7 +49,9 @@ static const int kFullStackTestDurationSecs = 45; class FullStackTest : public VideoQualityTest { public: - void RunTest(const VideoQualityTest::Params ¶ms) { + void RunTest(VideoQualityTest::Params params) { + params.logging = {flags::FLAG_logs, flags::RtcEventLogName(), + flags::RtpDumpName(), flags::EncodedFramePath()}; RunWithAnalyzer(params); }