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

Side by Side Diff: webrtc/rtc_tools/barcode_tools/barcode_encoder.py

Issue 2965593002: Move webrtc/{tools => rtc_tools} (Closed)
Patch Set: Adding back root changes Created 3 years, 5 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) 2012 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2012 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 help=('Path to the Zxing barcodes library. ' 317 help=('Path to the Zxing barcodes library. '
318 'Default: %default')) 318 'Default: %default'))
319 options = parser.parse_args()[0] 319 options = parser.parse_args()[0]
320 return options 320 return options
321 321
322 322
323 def main(): 323 def main():
324 """The main function. 324 """The main function.
325 325
326 A simple invocation will be: 326 A simple invocation will be:
327 ./webrtc/tools/barcode_tools/barcode_encoder.py --barcode_height=32 327 ./webrtc/rtc_tools/barcode_tools/barcode_encoder.py --barcode_height=32
328 --base_frame_width=352 --base_frame_height=288 328 --base_frame_width=352 --base_frame_height=288
329 --base_yuv=<path_and_name_of_base_file> 329 --base_yuv=<path_and_name_of_base_file>
330 --output_yuv=<path and name_of_output_file> 330 --output_yuv=<path and name_of_output_file>
331 """ 331 """
332 options = _ParseArgs() 332 options = _ParseArgs()
333 # The barcodes with will be different than the base frame width only if 333 # The barcodes with will be different than the base frame width only if
334 # explicitly specified at the command line. 334 # explicitly specified at the command line.
335 if options.barcode_width == _DEFAULT_BARCODE_WIDTH: 335 if options.barcode_width == _DEFAULT_BARCODE_WIDTH:
336 options.barcode_width = options.base_frame_width 336 options.barcode_width = options.base_frame_width
337 # If the user provides a value for the barcodes YUV video file, we will keep 337 # If the user provides a value for the barcodes YUV video file, we will keep
(...skipping 25 matching lines...) Expand all
363 options.base_frame_width, options.base_frame_height, 363 options.base_frame_width, options.base_frame_height,
364 options.barcodes_yuv, options.base_yuv, options.output_yuv) 364 options.barcodes_yuv, options.base_yuv, options.output_yuv)
365 365
366 if not keep_barcodes_yuv_file: 366 if not keep_barcodes_yuv_file:
367 # Remove the temporary barcodes YUV file 367 # Remove the temporary barcodes YUV file
368 os.remove(options.barcodes_yuv) 368 os.remove(options.barcodes_yuv)
369 369
370 370
371 if __name__ == '__main__': 371 if __name__ == '__main__':
372 sys.exit(main()) 372 sys.exit(main())
OLDNEW
« no previous file with comments | « webrtc/rtc_tools/barcode_tools/barcode_decoder.py ('k') | webrtc/rtc_tools/barcode_tools/build_zxing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698