Revert "Remove deprecated barcode scanning functionality"

This reverts commit ff292f30d9a4b7a56aea872fe488d342f47202a3.

Reason for revert: issues with downstream projects

Original change's description:
> Remove deprecated barcode scanning functionality
> 
> This code is not used anymore, but it's not possible to land this CL
> until issue webrtc:9665 is fixed.
> 
> Bug: webrtc:9642,webrtc:9665
> Change-Id: Idb68e9bdf51b4239788cd6869dcb44dae87d7c56
> Reviewed-on: https://webrtc-review.googlesource.com/c/95951
> Reviewed-by: Paulina Hensman <phensman@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25289}

TBR=phoglund@webrtc.org,mbonadei@webrtc.org,magjed@webrtc.org,phensman@webrtc.org

Change-Id: I440025777a17d8580526289d4198da1fc3f7d62e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9642, webrtc:9665
Reviewed-on: https://webrtc-review.googlesource.com/c/107348
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25291}
This commit is contained in:
Alessio Bazzica
2018-10-22 13:00:29 +00:00
committed by Commit Bot
parent 67b011d22c
commit 38a34198a3
14 changed files with 1077 additions and 6 deletions

View File

@ -79,7 +79,7 @@ def _ParseArgs():
help='Path to the frame analyzer executable.'
'Default: %default')
parser.add_option('--zxing_path', type='string',
help='DEPRECATED.')
help='Path to the zebra xing barcode analyzer.')
parser.add_option('--ref_rec_dir', type='string', default='ref',
help='Path to where reference recordings will be created.'
'Ideally keep the ref and test directories on separate'
@ -118,6 +118,8 @@ def _ParseArgs():
'generated!')
if not os.path.isfile(options.frame_analyzer):
parser.warning('Cannot find frame_analyzer, no metrics will be generated!')
if not os.path.isfile(options.zxing_path):
parser.warning('Cannot find Zebra Xing, no metrics will be generated!')
return options
@ -440,6 +442,12 @@ def CompareVideos(options, cropped_ref_file, cropped_test_file):
'--ref_video=%s' % cropped_ref_file,
'--test_video=%s' % cropped_test_file,
'--frame_analyzer=%s' % os.path.abspath(options.frame_analyzer),
'--zxing_path=%s' % options.zxing_path,
'--ffmpeg_path=%s' % options.ffmpeg,
'--stats_file_ref=%s_stats.txt' %
os.path.join(os.path.dirname(cropped_ref_file), cropped_ref_file),
'--stats_file_test=%s_stats.txt' %
os.path.join(os.path.dirname(cropped_test_file), cropped_test_file),
'--yuv_frame_height=%d' % crop_height,
'--yuv_frame_width=%d' % crop_width
]
@ -464,6 +472,7 @@ def main():
--app_name AppRTCMobile \
--ffmpeg ./ffmpeg --ref_video_device=/dev/video0 \
--test_video_device=/dev/video1 \
--zxing_path ./zxing \
--test_crop_parameters 'crop=950:420:130:56' \
--ref_crop_parameters 'hflip, crop=950:420:130:56' \
--ref_rec_dir /tmp/ref \