From e04eced93da1907e803c065a953ffe0d6540e1cb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 16 Jan 2016 15:58:56 +0000 Subject: Use asdclib-cth rather than in-tree copy. --- asdcplib/src/asdcp-wrap.cpp | 1151 ------------------------------------------- 1 file changed, 1151 deletions(-) delete mode 100755 asdcplib/src/asdcp-wrap.cpp (limited to 'asdcplib/src/asdcp-wrap.cpp') diff --git a/asdcplib/src/asdcp-wrap.cpp b/asdcplib/src/asdcp-wrap.cpp deleted file mode 100755 index e1182ae..0000000 --- a/asdcplib/src/asdcp-wrap.cpp +++ /dev/null @@ -1,1151 +0,0 @@ -/* -Copyright (c) 2003-2012, John Hurst -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*! \file asdcp-wrap.cpp - \version $Id: asdcp-wrap.cpp,v 1.5 2012/03/07 18:47:02 mikey Exp $ - \brief AS-DCP file manipulation utility - - This program wraps d-cinema essence (picture, sound or text) in t an AS-DCP - MXF file. - - For more information about asdcplib, please refer to the header file AS_DCP.h - - WARNING: While the asdcplib library attempts to provide a complete and secure - implementation of the cryptographic features of the AS-DCP file formats, this - unit test program is NOT secure and is therefore NOT SUITABLE FOR USE in a - production environment without some modification. - - In particular, this program uses weak IV generation and externally generated - plaintext keys. These shortcomings exist because cryptographic-quality - random number generation and key management are outside the scope of the - asdcplib library. Developers using asdcplib for commercial implementations - claiming SMPTE conformance are expected to provide proper implementations of - these features. -*/ - -#include -#include -#include -#include -#include - -using namespace ASDCP; - -const ui32_t FRAME_BUFFER_SIZE = 4 * Kumu::Megabyte; - -//------------------------------------------------------------------------------------------ -// -// command line option parser class - -static const char* PROGRAM_NAME = "asdcp-wrap"; // program name for messages - -// local program identification info written to file headers -class MyInfo : public WriterInfo -{ -public: - MyInfo() - { - static byte_t default_ProductUUID_Data[UUIDlen] = - { 0x7d, 0x83, 0x6e, 0x16, 0x37, 0xc7, 0x4c, 0x22, - 0xb2, 0xe0, 0x46, 0xa7, 0x17, 0xe8, 0x4f, 0x42 }; - - memcpy(ProductUUID, default_ProductUUID_Data, UUIDlen); - CompanyName = "WidgetCo"; - ProductName = "asdcp-wrap"; - ProductVersion = ASDCP::Version(); - } -} s_MyInfo; - - - -// Increment the iterator, test for an additional non-option command line argument. -// Causes the caller to return if there are no remaining arguments or if the next -// argument begins with '-'. -#define TEST_EXTRA_ARG(i,c) \ - if ( ++i >= argc || argv[(i)][0] == '-' ) { \ - fprintf(stderr, "Argument not found for option -%c.\n", (c)); \ - return; \ - } - -// -void -banner(FILE* stream = stdout) -{ - fprintf(stream, "\n\ -%s (asdcplib %s)\n\n\ -Copyright (c) 2003-2012 John Hurst\n\n\ -asdcplib may be copied only under the terms of the license found at\n\ -the top of every file in the asdcplib distribution kit.\n\n\ -Specify the -h (help) option for further information about %s\n\n", - PROGRAM_NAME, ASDCP::Version(), PROGRAM_NAME); -} - -// -void -usage(FILE* stream = stdout) -{ - fprintf(stream, "\ -USAGE: %s [-h|-help] [-V]\n\ -\n\ - %s [-3] [-a ] [-b ] [-C
    ] [-d ]\n\ - [-e|-E] [-f ] [-j ] [-k ]\n\ - [-l