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

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

Issue 2736233003: PyLint fixes for tools-webrtc and webrtc/tools (Closed)
Patch Set: Fix alignment 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 _RunCommand([sys.executable, test_script]) 82 _RunCommand([sys.executable, test_script])
83 83
84 # Pull the output video. 84 # Pull the output video.
85 test_video = os.path.join(temp_dir, 'test_video.y4m') 85 test_video = os.path.join(temp_dir, 'test_video.y4m')
86 _RunCommand(['adb', 'pull', '/sdcard/output.y4m', test_video]) 86 _RunCommand(['adb', 'pull', '/sdcard/output.y4m', test_video])
87 87
88 test_video_yuv = os.path.join(temp_dir, 'test_video.yuv') 88 test_video_yuv = os.path.join(temp_dir, 'test_video.yuv')
89 89
90 ffmpeg_path = os.path.join(toolchain_dir, 'linux', 'ffmpeg') 90 ffmpeg_path = os.path.join(toolchain_dir, 'linux', 'ffmpeg')
91 91
92 def convert_video(input_video, output_video): 92 def ConvertVideo(input_video, output_video):
93 _RunCommand([ffmpeg_path, '-y', '-i', input_video, output_video]) 93 _RunCommand([ffmpeg_path, '-y', '-i', input_video, output_video])
94 94
95 convert_video(test_video, test_video_yuv) 95 ConvertVideo(test_video, test_video_yuv)
96 96
97 reference_video = os.path.join(SRC_DIR, 97 reference_video = os.path.join(SRC_DIR,
98 'resources', 'reference_video_640x360_30fps.y4m') 98 'resources', 'reference_video_640x360_30fps.y4m')
99 99
100 reference_video_yuv = os.path.join(temp_dir, 100 reference_video_yuv = os.path.join(temp_dir,
101 'reference_video_640x360_30fps.yuv') 101 'reference_video_640x360_30fps.yuv')
102 102
103 convert_video(reference_video, reference_video_yuv) 103 ConvertVideo(reference_video, reference_video_yuv)
104 104
105 # Run compare script. 105 # Run compare script.
106 compare_script = os.path.join(SRC_DIR, 'webrtc', 'tools', 106 compare_script = os.path.join(SRC_DIR, 'webrtc', 'tools',
107 'compare_videos.py') 107 'compare_videos.py')
108 zxing_path = os.path.join(toolchain_dir, 'linux', 'zxing') 108 zxing_path = os.path.join(toolchain_dir, 'linux', 'zxing')
109 109
110 # The frame_analyzer binary should be built for local computer and not for 110 # The frame_analyzer binary should be built for local computer and not for
111 # Android 111 # Android
112 frame_analyzer = os.path.join(build_dir_x86, 'frame_analyzer') 112 frame_analyzer = os.path.join(build_dir_x86, 'frame_analyzer')
113 113
(...skipping 10 matching lines...) Expand all
124 '--stats_file_ref', stats_file_ref, 124 '--stats_file_ref', stats_file_ref,
125 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer, 125 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer,
126 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path]) 126 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path])
127 127
128 shutil.rmtree(temp_dir) 128 shutil.rmtree(temp_dir)
129 129
130 130
131 if __name__ == '__main__': 131 if __name__ == '__main__':
132 sys.exit(main()) 132 sys.exit(main())
133 133
OLDNEW
« no previous file with comments | « tools-webrtc/network_emulator/network_emulator.py ('k') | webrtc/tools/barcode_tools/barcode_decoder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698