| 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 import glob | 10 import glob |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 401 |
| 402 # Need to return these so they can be used by other parts. | 402 # Need to return these so they can be used by other parts. |
| 403 cropped_recordings = { | 403 cropped_recordings = { |
| 404 'cropped_test_file' : cropped_test_file, | 404 'cropped_test_file' : cropped_test_file, |
| 405 'cropped_ref_file' : cropped_ref_file | 405 'cropped_ref_file' : cropped_ref_file |
| 406 } | 406 } |
| 407 return cropped_recordings | 407 return cropped_recordings |
| 408 | 408 |
| 409 | 409 |
| 410 def CompareVideos(options, cropped_ref_file, cropped_test_file): | 410 def CompareVideos(options, cropped_ref_file, cropped_test_file): |
| 411 """Runs the compare_video.py script from webrtc/rtc_tools using the file path. | 411 """Runs the compare_video.py script from src/webrtc/rtc_tools using path. |
| 412 | 412 |
| 413 Uses the path from recording_result and writes the output to a file named | 413 Uses the path from recording_result and writes the output to a file named |
| 414 <options.app_name + '_' + CURRENT_TIME + '_result.txt> in the reference video | 414 <options.app_name + '_' + CURRENT_TIME + '_result.txt> in the reference video |
| 415 recording folder taken from recording_result. | 415 recording folder taken from recording_result. |
| 416 | 416 |
| 417 Args: | 417 Args: |
| 418 options(object): Contains all the provided command line options. | 418 options(object): Contains all the provided command line options. |
| 419 cropped_ref_file(string): Path to cropped reference video file. | 419 cropped_ref_file(string): Path to cropped reference video file. |
| 420 cropped_test_file(string): Path to cropped test video file. | 420 cropped_test_file(string): Path to cropped test video file. |
| 421 | 421 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 if options.compare_videos_script: | 501 if options.compare_videos_script: |
| 502 CompareVideos(options, recording_result['cropped_ref_file'], | 502 CompareVideos(options, recording_result['cropped_ref_file'], |
| 503 recording_result['cropped_test_file']) | 503 recording_result['cropped_test_file']) |
| 504 else: | 504 else: |
| 505 print ('Skipping compare videos step due to compare_videos flag were not ' | 505 print ('Skipping compare videos step due to compare_videos flag were not ' |
| 506 'passed.') | 506 'passed.') |
| 507 | 507 |
| 508 | 508 |
| 509 if __name__ == '__main__': | 509 if __name__ == '__main__': |
| 510 sys.exit(main()) | 510 sys.exit(main()) |
| OLD | NEW |