| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2013 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 import optparse | 10 import optparse |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 shutil.rmtree(png_working_directory) | 118 shutil.rmtree(png_working_directory) |
| 119 if barcode_decoder.returncode != 0: | 119 if barcode_decoder.returncode != 0: |
| 120 print 'Failed to run barcode decoder script.' | 120 print 'Failed to run barcode decoder script.' |
| 121 return 1 | 121 return 1 |
| 122 return 0 | 122 return 0 |
| 123 | 123 |
| 124 def main(): | 124 def main(): |
| 125 """The main function. | 125 """The main function. |
| 126 | 126 |
| 127 A simple invocation is: | 127 A simple invocation is: |
| 128 ./webrtc/tools/barcode_tools/compare_videos.py | 128 ./webrtc/rtc_tools/barcode_tools/compare_videos.py |
| 129 --ref_video=<path_and_name_of_reference_video> | 129 --ref_video=<path_and_name_of_reference_video> |
| 130 --test_video=<path_and_name_of_test_video> | 130 --test_video=<path_and_name_of_test_video> |
| 131 --frame_analyzer=<path_and_name_of_the_frame_analyzer_executable> | 131 --frame_analyzer=<path_and_name_of_the_frame_analyzer_executable> |
| 132 | 132 |
| 133 Notice that the prerequisites for barcode_decoder.py also applies to this | 133 Notice that the prerequisites for barcode_decoder.py also applies to this |
| 134 script. The means the following executables have to be available in the PATH: | 134 script. The means the following executables have to be available in the PATH: |
| 135 * zxing | 135 * zxing |
| 136 * ffmpeg | 136 * ffmpeg |
| 137 """ | 137 """ |
| 138 options = _ParseArgs() | 138 options = _ParseArgs() |
| (...skipping 26 matching lines...) Expand all Loading... |
| 165 stdout=sys.stdout, stderr=sys.stderr) | 165 stdout=sys.stdout, stderr=sys.stderr) |
| 166 frame_analyzer.wait() | 166 frame_analyzer.wait() |
| 167 if frame_analyzer.returncode != 0: | 167 if frame_analyzer.returncode != 0: |
| 168 print 'Failed to run frame analyzer.' | 168 print 'Failed to run frame analyzer.' |
| 169 return 1 | 169 return 1 |
| 170 | 170 |
| 171 return 0 | 171 return 0 |
| 172 | 172 |
| 173 if __name__ == '__main__': | 173 if __name__ == '__main__': |
| 174 sys.exit(main()) | 174 sys.exit(main()) |
| OLD | NEW |