OLD | NEW |
---|---|
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 14 matching lines...) Expand all Loading... | |
25 import subprocess | 25 import subprocess |
26 import sys | 26 import sys |
27 import tempfile | 27 import tempfile |
28 | 28 |
29 | 29 |
30 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | 30 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
31 SRC_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, | 31 SRC_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, |
32 os.pardir)) | 32 os.pardir)) |
33 | 33 |
34 | 34 |
35 def _RunCommand(argv, **kwargs): | 35 def _RunCommand(argv, cwd=SRC_DIR, **kwargs): |
kjellander (google.com)
2017/02/14 12:31:05
The script supports --source_dir flag, which overr
mandermo
2017/02/14 14:21:15
Was useful during the development to provide the s
kjellander_webrtc
2017/02/14 14:36:11
I say we just drop the flag then. It shouldn't be
| |
36 logging.info('Running %r', argv) | 36 logging.info('Running %r', argv) |
37 subprocess.check_call(argv, **kwargs) | 37 subprocess.check_call(argv, cwd=cwd, **kwargs) |
38 | 38 |
39 | 39 |
40 def _ParseArgs(): | 40 def _ParseArgs(): |
41 parser = argparse.ArgumentParser(description='Start loopback video analysis.') | 41 parser = argparse.ArgumentParser(description='Start loopback video analysis.') |
42 parser.add_argument('--source_dir', default=SRC_DIR, | 42 parser.add_argument('--source_dir', default=SRC_DIR, |
43 help='The path to the WebRTC source directory. Default: %(default)s.') | 43 help='The path to the WebRTC source directory. Default: %(default)s.') |
44 parser.add_argument('build_dir_android', | 44 parser.add_argument('build_dir_android', |
45 help='The path to the build directory for Android.') | 45 help='The path to the build directory for Android.') |
46 parser.add_argument('--build_dir_x86', | 46 parser.add_argument('--build_dir_x86', |
47 help='The path to the build directory for building locally.') | 47 help='The path to the build directory for building locally.') |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 '--stats_file_ref', stats_file_ref, | 127 '--stats_file_ref', stats_file_ref, |
128 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer, | 128 '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer, |
129 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path]) | 129 '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path]) |
130 | 130 |
131 shutil.rmtree(temp_dir) | 131 shutil.rmtree(temp_dir) |
132 | 132 |
133 | 133 |
134 if __name__ == '__main__': | 134 if __name__ == '__main__': |
135 sys.exit(main()) | 135 sys.exit(main()) |
136 | 136 |
OLD | NEW |