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

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

Issue 2968683002: Fix android video_quality_loopback_test (Closed)
Patch Set: Fix presubmit. Created 3 years, 5 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 | « no previous file | webrtc/rtc_tools/video_analysis.py » ('j') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 _RunCommand(['gn', 'gen', build_dir_x86]) 99 _RunCommand(['gn', 'gen', build_dir_x86])
100 _RunCommand(['ninja', '-C', build_dir_x86, 'frame_analyzer']) 100 _RunCommand(['ninja', '-C', build_dir_x86, 'frame_analyzer'])
101 101
102 tools_dir = os.path.join(SRC_DIR, 'tools_webrtc') 102 tools_dir = os.path.join(SRC_DIR, 'tools_webrtc')
103 toolchain_dir = os.path.join(tools_dir, 'video_quality_toolchain') 103 toolchain_dir = os.path.join(tools_dir, 'video_quality_toolchain')
104 104
105 # Download ffmpeg and zxing. 105 # Download ffmpeg and zxing.
106 download_tools_script = os.path.join(tools_dir, 'download_tools.py') 106 download_tools_script = os.path.join(tools_dir, 'download_tools.py')
107 _RunCommand([sys.executable, download_tools_script, toolchain_dir]) 107 _RunCommand([sys.executable, download_tools_script, toolchain_dir])
108 108
109 testing_tools_dir = os.path.join(SRC_DIR, 'webrtc', 'tools', 'testing') 109 testing_tools_dir = os.path.join(SRC_DIR, 'webrtc', 'rtc_tools', 'testing')
110 110
111 # Download, extract and build AppRTC. 111 # Download, extract and build AppRTC.
112 setup_apprtc_script = os.path.join(testing_tools_dir, 'setup_apprtc.py') 112 setup_apprtc_script = os.path.join(testing_tools_dir, 'setup_apprtc.py')
113 _RunCommand([sys.executable, setup_apprtc_script, temp_dir]) 113 _RunCommand([sys.executable, setup_apprtc_script, temp_dir])
114 114
115 # Select an Android device in case multiple are connected 115 # Select an Android device in case multiple are connected
116 try: 116 try:
117 with open(BAD_DEVICES_JSON) as bad_devices_file: 117 with open(BAD_DEVICES_JSON) as bad_devices_file:
118 bad_devices = json.load(bad_devices_file) 118 bad_devices = json.load(bad_devices_file)
119 except IOError: 119 except IOError:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 reference_video = os.path.join(SRC_DIR, 175 reference_video = os.path.join(SRC_DIR,
176 'resources', 'reference_video_640x360_30fps.y4m') 176 'resources', 'reference_video_640x360_30fps.y4m')
177 177
178 reference_video_yuv = os.path.join(temp_dir, 178 reference_video_yuv = os.path.join(temp_dir,
179 'reference_video_640x360_30fps.yuv') 179 'reference_video_640x360_30fps.yuv')
180 180
181 ConvertVideo(reference_video, reference_video_yuv) 181 ConvertVideo(reference_video, reference_video_yuv)
182 182
183 # Run compare script. 183 # Run compare script.
184 compare_script = os.path.join(SRC_DIR, 'webrtc', 'tools', 184 compare_script = os.path.join(SRC_DIR, 'webrtc', 'rtc_tools',
185 'compare_videos.py') 185 'compare_videos.py')
186 zxing_path = os.path.join(toolchain_dir, 'linux', 'zxing') 186 zxing_path = os.path.join(toolchain_dir, 'linux', 'zxing')
187 187
188 # The frame_analyzer binary should be built for local computer and not for 188 # The frame_analyzer binary should be built for local computer and not for
189 # Android 189 # Android
190 frame_analyzer = os.path.join(build_dir_x86, 'frame_analyzer') 190 frame_analyzer = os.path.join(build_dir_x86, 'frame_analyzer')
191 191
192 frame_width = 640 192 frame_width = 640
193 frame_height = 360 193 frame_height = 360
194 194
(...skipping 14 matching lines...) Expand all
209 if process: 209 if process:
210 process.terminate() 210 process.terminate()
211 process.wait() 211 process.wait()
212 212
213 shutil.rmtree(temp_dir) 213 shutil.rmtree(temp_dir)
214 214
215 215
216 if __name__ == '__main__': 216 if __name__ == '__main__':
217 sys.exit(main()) 217 sys.exit(main())
218 218
OLDNEW
« no previous file with comments | « no previous file | webrtc/rtc_tools/video_analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698