X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fasdcp-wrap.cpp;h=66f291acc1be342fbbd253ea49ea70277bd88dd6;hb=9e269bd45830f54551722a65b0d7aa8f327e17dc;hp=a7045521a5ae2736c2cf2e65aee0088225f47538;hpb=e511dc66f4a9c9278964d89a85662fcd9bfb18ac;p=asdcplib.git diff --git a/src/asdcp-wrap.cpp b/src/asdcp-wrap.cpp index a704552..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,10 +26,10 @@ 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) in t an AS-DCP + This program wraps d-cinema essence (picture, sound or text) into an AS-DCP MXF file. For more information about asdcplib, please refer to the header file AS_DCP.h @@ -48,6 +49,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include #include #include @@ -56,6 +58,13 @@ using namespace ASDCP; const ui32_t FRAME_BUFFER_SIZE = 4 * Kumu::Megabyte; +const byte_t P_HFR_UL_2K[16] = { + 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, + 0x0e, 0x16, 0x02, 0x02, 0x03, 0x01, 0x01, 0x03 +}; + +const ASDCP::Dictionary *g_dict = 0; + //------------------------------------------------------------------------------------------ // // command line option parser class @@ -71,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"; @@ -90,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", @@ -112,37 +130,52 @@ USAGE: %s [-h|-help] [-V]\n\ \n\ %s [-3] [-a ] [-b ] [-C
    ] [-d ]\n\ [-e|-E] [-f ] [-j ] [-k ]\n\ - [-l