Commit 16380601 authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Stop passing deprecated flags to WebRTC's compare_videos.py.

Some compare_videos.py flags will be removed by [1]. They were already
deprecated and not used.

[1] - https://webrtc-review.googlesource.com/c/src/+/143788

Bug: None
Change-Id: Id37735b18ce5573468b8583e9f14392bc1b12128
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1675671Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672127}
parent e3803a78
...@@ -58,8 +58,6 @@ static const base::FilePath::CharType kCapturedYuvFileName[] = ...@@ -58,8 +58,6 @@ static const base::FilePath::CharType kCapturedYuvFileName[] =
FILE_PATH_LITERAL("captured_video.yuv"); FILE_PATH_LITERAL("captured_video.yuv");
static const base::FilePath::CharType kCapturedWebmFileName[] = static const base::FilePath::CharType kCapturedWebmFileName[] =
FILE_PATH_LITERAL("captured_video.webm"); FILE_PATH_LITERAL("captured_video.webm");
static const base::FilePath::CharType kStatsFileName[] =
FILE_PATH_LITERAL("stats.txt");
static const char kMainWebrtcTestHtmlPage[] = static const char kMainWebrtcTestHtmlPage[] =
"/webrtc/webrtc_jsep01_test.html"; "/webrtc/webrtc_jsep01_test.html";
static const char kCapturingWebrtcHtmlPage[] = static const char kCapturingWebrtcHtmlPage[] =
...@@ -91,11 +89,6 @@ static const struct VideoQualityTestConfig { ...@@ -91,11 +89,6 @@ static const struct VideoQualityTestConfig {
// You must also compile the frame_analyzer target before you run this // You must also compile the frame_analyzer target before you run this
// test to get all the tools built. // test to get all the tools built.
// //
// The external compare_videos.py script also depends on two external
// executables which must be located in the PATH when running this test.
// * zxing (see the CPP version at https://code.google.com/p/zxing)
// * ffmpeg 0.11.1 or compatible version (see http://www.ffmpeg.org)
//
// The test runs several custom binaries - rgba_to_i420 converter and // The test runs several custom binaries - rgba_to_i420 converter and
// frame_analyzer. Both tools can be found under third_party/webrtc/rtc_tools. // frame_analyzer. Both tools can be found under third_party/webrtc/rtc_tools.
// The test also runs a stand alone Python implementation of a WebSocket server // The test also runs a stand alone Python implementation of a WebSocket server
...@@ -179,18 +172,15 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase, ...@@ -179,18 +172,15 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase,
// Compares the |captured_video_filename| with the |reference_video_filename|. // Compares the |captured_video_filename| with the |reference_video_filename|.
// //
// The barcode decoder decodes the captured video containing barcodes overlaid // The barcode decoder decodes the captured video containing barcodes overlaid
// into every frame of the video. It produces a set of PNG images and a // into every frame of the video. It produces a set of PNG images.
// |stats_file| that maps each captured frame to a frame in the reference // The frames should be of size |width| x |height|.
// video. The frames should be of size |width| x |height|.
// All measurements calculated are printed as perf parsable numbers to stdout. // All measurements calculated are printed as perf parsable numbers to stdout.
bool CompareVideosAndPrintResult( bool CompareVideosAndPrintResult(
const std::string& test_label, const std::string& test_label,
int width, int width,
int height, int height,
const base::FilePath& captured_video_filename, const base::FilePath& captured_video_filename,
const base::FilePath& reference_video_filename, const base::FilePath& reference_video_filename) {
const base::FilePath& stats_file) {
base::FilePath path_to_analyzer = base::MakeAbsoluteFilePath( base::FilePath path_to_analyzer = base::MakeAbsoluteFilePath(
GetBrowserDir().Append(kFrameAnalyzerExecutable)); GetBrowserDir().Append(kFrameAnalyzerExecutable));
base::FilePath path_to_compare_script = GetSourceDir().Append( base::FilePath path_to_compare_script = GetSourceDir().Append(
...@@ -208,17 +198,6 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase, ...@@ -208,17 +198,6 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase,
return false; return false;
} }
base::FilePath path_to_zxing = test::GetToolForPlatform("zxing");
if (!base::PathExists(path_to_zxing)) {
LOG(ERROR) << "Missing zxing: should be in " << path_to_zxing.value();
return false;
}
base::FilePath path_to_ffmpeg = test::GetToolForPlatform("ffmpeg");
if (!base::PathExists(path_to_ffmpeg)) {
LOG(ERROR) << "Missing ffmpeg: should be in " << path_to_ffmpeg.value();
return false;
}
// Note: don't append switches to this command since it will mess up the // Note: don't append switches to this command since it will mess up the
// -u in the python invocation! // -u in the python invocation!
base::CommandLine compare_command(base::CommandLine::NO_PROGRAM); base::CommandLine compare_command(base::CommandLine::NO_PROGRAM);
...@@ -236,12 +215,6 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase, ...@@ -236,12 +215,6 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase,
compare_command.AppendArg(base::NumberToString(width)); compare_command.AppendArg(base::NumberToString(width));
compare_command.AppendArg("--yuv_frame_height"); compare_command.AppendArg("--yuv_frame_height");
compare_command.AppendArg(base::NumberToString(height)); compare_command.AppendArg(base::NumberToString(height));
compare_command.AppendArg("--zxing_path");
compare_command.AppendArgPath(path_to_zxing);
compare_command.AppendArg("--ffmpeg_path");
compare_command.AppendArgPath(path_to_ffmpeg);
compare_command.AppendArg("--stats_file");
compare_command.AppendArgPath(stats_file);
DVLOG(0) << "Running " << compare_command.GetCommandLineString(); DVLOG(0) << "Running " << compare_command.GetCommandLineString();
std::string output; std::string output;
...@@ -312,8 +285,7 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase, ...@@ -312,8 +285,7 @@ class WebRtcVideoQualityBrowserTest : public WebRtcTestBase,
test_config_.height, GetWorkingDir().Append(kCapturedYuvFileName), test_config_.height, GetWorkingDir().Append(kCapturedYuvFileName),
test::GetReferenceFilesDir() test::GetReferenceFilesDir()
.Append(test_config_.reference_video) .Append(test_config_.reference_video)
.AddExtension(test::kYuvFileExtension), .AddExtension(test::kYuvFileExtension)));
GetWorkingDir().Append(kStatsFileName)));
} }
protected: protected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment