
The barcode encoder generates barcodes as PNG files, than converts them to YUV files, then stitches these into one YUV video file and finaly overlays this video over the base video to produce a YUV video of the base with encoded barcodes in the upper part of the video. The decoder gets a YUV video with overlaid barcodes and first splits it into PNG files, than decodes every file, and finally generates a stats file. The encoder and decoder use Zxing and its Java command-line tools for the encoding and decoding. They also use ffmpeg for the conversion between PNG and YUV and vice versa. BUG= TEST= The tools could be used from trunk as: ./tools/barcode_tools/barcode_encoder.py --barcode_height=32 --base_frame_width=352 --base_frame_height=288 --base_yuv=<path_nad_name_to_base_file> --output_yuv=<path_nad_name_to_output_file> ./tools/barcode_tools/barcode_decoder.py --yuv_file=<path_and_name_to_yuv_file> --yuv_frame_width=352 --yuv=frame_height=288 --barcode_height=32 --stats_file=<path_and_name_of_stats_file> By default the width of the barcodes is the same as the width of the base YUV frames. This could be changes with the command-line option --barcode_width Review URL: https://webrtc-codereview.appspot.com/679010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2612 4adac7df-926f-26a2-2b94-8c16560cd09d
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the LICENSE file in the root of the source
|
|
# tree. An additional intellectual property rights grant can be found
|
|
# in the file PATENTS. All contributing project authors may
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
{
|
|
'targets': [
|
|
{
|
|
'target_name': 'zxing',
|
|
'message': 'build zxing barcode tool',
|
|
'type': 'none',
|
|
'actions': [
|
|
{
|
|
'action_name': 'build_zxing_core',
|
|
'inputs': [
|
|
'<(DEPTH)/third_party/zxing/core/build.xml',
|
|
],
|
|
'outputs': [
|
|
'<(DEPTH)/third_party/zxing/core/core.jar',
|
|
],
|
|
'action': [
|
|
'ant',
|
|
'-buildfile',
|
|
'<(DEPTH)/third_party/zxing/core/build.xml',
|
|
]
|
|
},
|
|
{
|
|
'action_name': 'build_zxing_javase',
|
|
'inputs': [
|
|
'<(DEPTH)/third_party/zxing/javase/build.xml',
|
|
],
|
|
'outputs': [
|
|
'<(DEPTH)/third_party/zxing/javase/javase.jar',
|
|
],
|
|
'action': [
|
|
'ant',
|
|
'-buildfile',
|
|
'<(DEPTH)/third_party/zxing/javase/build.xml',
|
|
]
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|