X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fasdcp-wrap.cpp;h=66f291acc1be342fbbd253ea49ea70277bd88dd6;hb=HEAD;hp=bbff82a6c6eaae1e962d818f146d39b9f43f6a5d;hpb=9998b893b47f111f41c4f0fcf1067efe5b7a62f3;p=asdcplib.git diff --git a/src/asdcp-wrap.cpp b/src/asdcp-wrap.cpp index bbff82a..66f291a 100755 --- a/src/asdcp-wrap.cpp +++ b/src/asdcp-wrap.cpp @@ -1,5 +1,6 @@ /* -Copyright (c) 2003-2012, John Hurst +Copyright (c) 2003-2018 +, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file asdcp-wrap.cpp - \version $Id$ + \version $Id$ \brief AS-DCP file manipulation utility This program wraps d-cinema essence (picture, sound or text) into an AS-DCP @@ -48,6 +49,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include #include #include @@ -61,6 +63,8 @@ const byte_t P_HFR_UL_2K[16] = { 0x0e, 0x16, 0x02, 0x02, 0x03, 0x01, 0x01, 0x03 }; +const ASDCP::Dictionary *g_dict = 0; + //------------------------------------------------------------------------------------------ // // command line option parser class @@ -76,7 +80,7 @@ public: 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"; @@ -95,13 +99,22 @@ public: return; \ } +// +static void +create_random_uuid(byte_t* uuidbuf) +{ + Kumu::UUID tmp_id; + GenRandomValue(tmp_id); + memcpy(uuidbuf, tmp_id.Value(), tmp_id.Size()); +} + // void banner(FILE* stream = stdout) { fprintf(stream, "\n\ %s (asdcplib %s)\n\n\ -Copyright (c) 2003-2012 John Hurst\n\n\ +Copyright (c) 2003-2018 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", @@ -117,38 +130,52 @@ USAGE: %s [-h|-help] [-V]\n\ \n\ %s [-3] [-a ] [-b ] [-C
    ] [-d ]\n\ [-e|-E] [-f ] [-j ] [-k ]\n\ - [-l