Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(995)

Side by Side Diff: webrtc/examples/androidtests/video_quality_loopback_test.py

Issue 2715933003: Add PESQ precompiled tool for audio quality testing (Closed)
Patch Set: Clarify the purpose of the script for downloading tools Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools-webrtc/video_quality_toolchain/download.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """ 10 """
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 temp_dir = tempfile.mkdtemp() 66 temp_dir = tempfile.mkdtemp()
67 else: 67 else:
68 if not os.path.exists(temp_dir): 68 if not os.path.exists(temp_dir):
69 os.makedirs(temp_dir) 69 os.makedirs(temp_dir)
70 70
71 if not build_dir_x86: 71 if not build_dir_x86:
72 build_dir_x86 = os.path.join(temp_dir, 'LocalBuild') 72 build_dir_x86 = os.path.join(temp_dir, 'LocalBuild')
73 _RunCommand(['gn', 'gen', build_dir_x86]) 73 _RunCommand(['gn', 'gen', build_dir_x86])
74 _RunCommand(['ninja', '-C', build_dir_x86, 'frame_analyzer']) 74 _RunCommand(['ninja', '-C', build_dir_x86, 'frame_analyzer'])
75 75
76 toolchain_dir = os.path.join(SRC_DIR, 'tools-webrtc', 76 tools_dir = os.path.join(SRC_DIR, 'tools-webrtc')
77 'video_quality_toolchain') 77 toolchain_dir = os.path.join(tools_dir, 'video_quality_toolchain')
78 78
79 # Download ffmpeg and zxing. 79 # Download ffmpeg and zxing.
80 download_script = os.path.join(toolchain_dir, 'download.py') 80 download_script = os.path.join(tools_dir, 'download_tools.py')
81 _RunCommand([sys.executable, download_script]) 81 _RunCommand([sys.executable, download_script, toolchain_dir])
82 82
83 # Run the Espresso code. 83 # Run the Espresso code.
84 test_script = os.path.join(build_dir_android, 84 test_script = os.path.join(build_dir_android,
85 'bin', 'run_AppRTCMobileTestStubbedVideoIO') 85 'bin', 'run_AppRTCMobileTestStubbedVideoIO')
86 _RunCommand([sys.executable, test_script]) 86 _RunCommand([sys.executable, test_script])
87 87
88 # Pull the output video. 88 # Pull the output video.
89 test_video = os.path.join(temp_dir, 'test_video.y4m') 89 test_video = os.path.join(temp_dir, 'test_video.y4m')
90 _RunCommand(['adb', 'pull', '/sdcard/output.y4m', test_video]) 90 _RunCommand(['adb', 'pull', '/sdcard/output.y4m', test_video])
91 91
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 '--stats_file_ref', stats_file_ref, 128 '--stats_file_ref', stats_file_ref,
129 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer, 129 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer,
130 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path]) 130 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path])
131 131
132 shutil.rmtree(temp_dir) 132 shutil.rmtree(temp_dir)
133 133
134 134
135 if __name__ == '__main__': 135 if __name__ == '__main__':
136 sys.exit(main()) 136 sys.exit(main())
137 137
OLDNEW
« no previous file with comments | « tools-webrtc/video_quality_toolchain/download.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698