diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-04 16:19:04 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-04 16:19:04 +0000 |
| commit | f4802823b481b47a240002d086a5caefee3e4b61 (patch) | |
| tree | 06f7eedc862fd9cc1b083da91b753bded5fd8914 | |
| parent | fba3fceee2203833b74631a951ec1364521630be (diff) | |
Fix new asdcplib to build.
| -rwxr-xr-x | asdcplib/src/AS_DCP.h | 27 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_JP2K.cpp | 140 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_MPEG2.cpp | 11 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_PCM.cpp | 24 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_internal.h | 22 | ||||
| -rwxr-xr-x | asdcplib/src/JP2K_Codestream_Parser.cpp | 39 | ||||
| -rw-r--r-- | asdcplib/src/KM_fileio.cpp | 432 | ||||
| -rwxr-xr-x | asdcplib/src/KM_fileio.h | 41 | ||||
| -rwxr-xr-x | asdcplib/src/KM_log.cpp | 9 | ||||
| -rwxr-xr-x | asdcplib/src/KM_prng.cpp | 48 | ||||
| -rwxr-xr-x | asdcplib/src/KM_prng.h | 3 | ||||
| -rw-r--r-- | asdcplib/src/KM_tai.cpp | 1 | ||||
| -rwxr-xr-x | asdcplib/src/KM_util.cpp | 48 | ||||
| -rwxr-xr-x | asdcplib/src/KM_util.h | 27 | ||||
| -rw-r--r-- | asdcplib/src/KM_xml.cpp | 26 | ||||
| -rw-r--r-- | asdcplib/src/MDD.cpp | 484 | ||||
| -rwxr-xr-x | asdcplib/src/MPEG2_Parser.cpp | 39 | ||||
| -rwxr-xr-x | asdcplib/src/MXF.cpp | 35 | ||||
| -rwxr-xr-x | asdcplib/src/MXFTypes.cpp | 12 | ||||
| -rwxr-xr-x | asdcplib/src/MXFTypes.h | 20 | ||||
| -rwxr-xr-x | asdcplib/src/h__Reader.cpp | 10 | ||||
| -rwxr-xr-x | asdcplib/src/h__Writer.cpp | 27 | ||||
| -rw-r--r-- | asdcplib/src/wscript | 91 | ||||
| -rw-r--r-- | asdcplib/wscript | 23 |
24 files changed, 926 insertions, 713 deletions
diff --git a/asdcplib/src/AS_DCP.h b/asdcplib/src/AS_DCP.h index 9e9702fc..a9f8e557 100755 --- a/asdcplib/src/AS_DCP.h +++ b/asdcplib/src/AS_DCP.h @@ -204,7 +204,7 @@ namespace ASDCP { enum EssenceType_t { ESS_UNKNOWN, // the file is not a supported AS-DCP of AS-02 essence container - // + // ESS_MPEG2_VES, // the file contains an MPEG-2 video elementary stream // d-cinema essence types @@ -1142,6 +1142,8 @@ namespace ASDCP { // encrypted headers. Result_t OpenReadFrame(const std::string& filename, FrameBuffer&) const; + Result_t OpenReadFrame(const unsigned char * data, unsigned int size, FrameBuffer&) const; + // Fill a PictureDescriptor struct with the values from the file's codestream. // Returns RESULT_INIT if the file is not open. Result_t FillPictureDescriptor(PictureDescriptor&) const; @@ -1215,20 +1217,26 @@ namespace ASDCP { virtual MXF::OPAtomIndexFooter& OPAtomIndexFooter(); virtual MXF::RIP& RIP(); - // Open the file for writing. The file must not exist. Returns error if + // Open the file for writing. The file must not exist unless overwrite is true. Returns error if // the operation cannot be completed or if nonsensical data is discovered // in the essence descriptor. Result_t OpenWrite(const std::string& filename, const WriterInfo&, - const PictureDescriptor&, ui32_t HeaderSize = 16384); + const PictureDescriptor&, ui32_t HeaderSize, bool overwrite); // Writes a frame of essence to the MXF file. If the optional AESEncContext // argument is present, the essence is encrypted prior to writing. + // A MD5 hash of the data that we write is written to hash if it is not 0 // Fails if the file is not open, is finalized, or an operating system // error occurs. - Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0); + Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0); + + Result_t FakeWriteFrame(int size); // Closes the MXF file, writing the index and revised header. Result_t Finalize(); + + // Return the current file offset in the MXF file that we are writing + ui64_t Tell() const; }; // @@ -1320,11 +1328,11 @@ namespace ASDCP { virtual MXF::OPAtomIndexFooter& OPAtomIndexFooter(); virtual MXF::RIP& RIP(); - // Open the file for writing. The file must not exist. Returns error if + // Open the file for writing. The file must not exist unless overwrite is true. Returns error if // the operation cannot be completed or if nonsensical data is discovered // in the essence descriptor. Result_t OpenWrite(const std::string& filename, const WriterInfo&, - const PictureDescriptor&, ui32_t HeaderSize = 16384); + const PictureDescriptor&, ui32_t HeaderSize, bool overwrite); // Writes a pair of frames of essence to the MXF file. If the optional AESEncContext // argument is present, the essence is encrypted prior to writing. @@ -1339,11 +1347,16 @@ namespace ASDCP { // RESULT_SPHASE will be returned if phase is reversed. The first frame // written must be left eye. Result_t WriteFrame(const FrameBuffer&, StereoscopicPhase_t phase, - AESEncContext* = 0, HMACContext* = 0); + AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0); + + Result_t FakeWriteFrame(int size, StereoscopicPhase_t phase); // Closes the MXF file, writing the index and revised header. Returns // RESULT_SPHASE if WriteFrame was called an odd number of times. Result_t Finalize(); + + // Return the current file offset in the MXF file that we are writing + ui64_t Tell() const; }; // diff --git a/asdcplib/src/AS_DCP_JP2K.cpp b/asdcplib/src/AS_DCP_JP2K.cpp index 58781d61..1b392346 100755 --- a/asdcplib/src/AS_DCP_JP2K.cpp +++ b/asdcplib/src/AS_DCP_JP2K.cpp @@ -1,3 +1,5 @@ +/* -*- c-basic-offset: 2; -*- */ + /* Copyright (c) 2004-2014, John Hurst All rights reserved. @@ -162,7 +164,7 @@ ASDCP::JP2K::PictureDescriptorDump(const PictureDescriptor& PDesc, FILE* stream) PDesc.ImageComponents[i].YRsize ); } - + fprintf(stream, " Scod: %hhu\n", PDesc.CodingStyleDefault.Scod); fprintf(stream, " ProgressionOrder: %hhu\n", PDesc.CodingStyleDefault.SGcod.ProgressionOrder); fprintf(stream, " NumberOfLayers: %hd\n", @@ -207,7 +209,7 @@ static const byte_t s_PixelLayoutXYZ[PixelLayoutSize] = { 0xd8, 0x0c, 0xd9, 0x0c // ASDCP::Result_t ASDCP::JP2K_PDesc_to_MD(const JP2K::PictureDescriptor& PDesc, - const ASDCP::Dictionary& dict, + const ASDCP::Dictionary&, ASDCP::MXF::GenericPictureEssenceDescriptor& EssenceDescriptor, ASDCP::MXF::JPEG2000PictureSubDescriptor& EssenceSubDescriptor) { @@ -232,7 +234,8 @@ ASDCP::JP2K_PDesc_to_MD(const JP2K::PictureDescriptor& PDesc, const ui32_t tmp_buffer_len = 1024; byte_t tmp_buffer[tmp_buffer_len]; - *(ui32_t*)tmp_buffer = KM_i32_BE(MaxComponents); // three components + ui32_t* tmp_buffer_ui32 = (ui32_t*) tmp_buffer; + *tmp_buffer_ui32 = KM_i32_BE(MaxComponents); // three components *(ui32_t*)(tmp_buffer+4) = KM_i32_BE(sizeof(ASDCP::JP2K::ImageComponent_t)); memcpy(tmp_buffer + 8, &PDesc.ImageComponents, sizeof(ASDCP::JP2K::ImageComponent_t) * MaxComponents); @@ -310,7 +313,7 @@ ASDCP::MD_to_JP2K_PDesc(const ASDCP::MXF::GenericPictureEssenceDescriptor& Esse memcpy(&PDesc.QuantizationDefault, EssenceSubDescriptor.QuantizationDefault.const_get().RoData(), EssenceSubDescriptor.QuantizationDefault.const_get().Length()); - + PDesc.QuantizationDefault.SPqcdLength = EssenceSubDescriptor.QuantizationDefault.const_get().Length() - 1; return RESULT_OK; } @@ -391,7 +394,7 @@ lh__Reader::OpenRead(const std::string& filename, EssenceType_t type) { DefaultLogSink().Warn("EditRate and SampleRate do not match (%.03f, %.03f).\n", m_EditRate.Quotient(), m_SampleRate.Quotient()); - + if ( ( m_EditRate == EditRate_24 && m_SampleRate == EditRate_48 ) || ( m_EditRate == EditRate_25 && m_SampleRate == EditRate_50 ) || ( m_EditRate == EditRate_30 && m_SampleRate == EditRate_60 ) @@ -512,7 +515,7 @@ ASDCP::JP2K::FrameBuffer::Dump(FILE* stream, ui32_t dump_len) const stream = stderr; fprintf(stream, "Frame: %06u, %7u bytes", m_FrameNumber, m_Size); - + fputc('\n', stream); if ( dump_len > 0 ) @@ -692,7 +695,7 @@ public: Result_t result = RESULT_OK; if ( phase == SP_LEFT ) - { + { if ( FilePosition != m_LastPosition ) { m_LastPosition = FilePosition; @@ -928,22 +931,29 @@ public: virtual ~lh__Writer(){} - Result_t OpenWrite(const std::string&, EssenceType_t type, ui32_t HeaderSize); + Result_t OpenWrite(const std::string&, EssenceType_t type, ui32_t HeaderSize, bool); Result_t SetSourceStream(const PictureDescriptor&, const std::string& label, ASDCP::Rational LocalEditRate = ASDCP::Rational(0,0)); - Result_t WriteFrame(const JP2K::FrameBuffer&, bool add_index, AESEncContext*, HMACContext*); + Result_t WriteFrame(const JP2K::FrameBuffer&, bool add_index, AESEncContext*, HMACContext*, std::string* hash = 0); + Result_t FakeWriteFrame(int size, bool add_index); Result_t Finalize(); }; -// Open the file for writing. The file must not exist. Returns error if +// Open the file for writing. The file must not exist unless overwrite is true. Returns error if // the operation cannot be completed. ASDCP::Result_t -lh__Writer::OpenWrite(const std::string& filename, EssenceType_t type, ui32_t HeaderSize) +lh__Writer::OpenWrite(const std::string& filename, EssenceType_t type, ui32_t HeaderSize, bool overwrite) { if ( ! m_State.Test_BEGIN() ) return RESULT_STATE; - Result_t result = m_File.OpenWrite(filename); + Result_t result = RESULT_OK; + if (overwrite) { + result = m_File.OpenModify(filename); + m_File.Seek(0); + } else { + result = m_File.OpenWrite(filename); + } if ( ASDCP_SUCCESS(result) ) { @@ -1027,20 +1037,20 @@ lh__Writer::SetSourceStream(const PictureDescriptor& PDesc, const std::string& l // ASDCP::Result_t lh__Writer::WriteFrame(const JP2K::FrameBuffer& FrameBuf, bool add_index, - AESEncContext* Ctx, HMACContext* HMAC) + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) { Result_t result = RESULT_OK; if ( m_State.Test_READY() ) result = m_State.Goto_RUNNING(); // first time through - + ui64_t StreamOffset = m_StreamOffset; if ( ASDCP_SUCCESS(result) ) - result = WriteEKLVPacket(FrameBuf, m_EssenceUL, Ctx, HMAC); + result = WriteEKLVPacket(FrameBuf, m_EssenceUL, Ctx, HMAC, hash); if ( ASDCP_SUCCESS(result) && add_index ) - { + { IndexTableSegment::IndexEntry Entry; Entry.StreamOffset = StreamOffset; m_FooterPart.PushIndexEntry(Entry); @@ -1050,6 +1060,31 @@ lh__Writer::WriteFrame(const JP2K::FrameBuffer& FrameBuf, bool add_index, return result; } +Result_t +lh__Writer::FakeWriteFrame(int size, bool add_index) +{ + Result_t result = RESULT_OK; + + if ( m_State.Test_READY() ) + result = m_State.Goto_RUNNING(); + + ui64_t StreamOffset = m_StreamOffset; + + if ( ASDCP_SUCCESS(result) ) + result = FakeWriteEKLVPacket(size); + + if ( ASDCP_SUCCESS(result) && add_index ) + { + IndexTableSegment::IndexEntry Entry; + Entry.StreamOffset = StreamOffset; + m_FooterPart.PushIndexEntry(Entry); + } + + m_FramesWritten++; + return result; +} + + // Closes the MXF file, writing the index and other closing information. // @@ -1133,11 +1168,11 @@ ASDCP::JP2K::MXFWriter::RIP() return m_Writer->m_RIP; } -// Open the file for writing. The file must not exist. Returns error if +// Open the file for writing. The file must not exist unless overwrite is true. Returns error if // the operation cannot be completed. ASDCP::Result_t ASDCP::JP2K::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo& Info, - const PictureDescriptor& PDesc, ui32_t HeaderSize) + const PictureDescriptor& PDesc, ui32_t HeaderSize, bool overwrite) { if ( Info.LabelSetType == LS_MXF_SMPTE ) m_Writer = new h__Writer(DefaultSMPTEDict()); @@ -1146,7 +1181,7 @@ ASDCP::JP2K::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo& m_Writer->m_Info = Info; - Result_t result = m_Writer->OpenWrite(filename, ASDCP::ESS_JPEG_2000, HeaderSize); + Result_t result = m_Writer->OpenWrite(filename, ASDCP::ESS_JPEG_2000, HeaderSize, overwrite); if ( ASDCP_SUCCESS(result) ) result = m_Writer->SetSourceStream(PDesc, JP2K_PACKAGE_LABEL); @@ -1163,14 +1198,24 @@ ASDCP::JP2K::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo& // Fails if the file is not open, is finalized, or an operating system // error occurs. ASDCP::Result_t -ASDCP::JP2K::MXFWriter::WriteFrame(const FrameBuffer& FrameBuf, AESEncContext* Ctx, HMACContext* HMAC) +ASDCP::JP2K::MXFWriter::WriteFrame(const FrameBuffer& FrameBuf, AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) { if ( m_Writer.empty() ) return RESULT_INIT; - return m_Writer->WriteFrame(FrameBuf, true, Ctx, HMAC); + return m_Writer->WriteFrame(FrameBuf, true, Ctx, HMAC, hash); } +ASDCP::Result_t +ASDCP::JP2K::MXFWriter::FakeWriteFrame(int size) +{ + if ( m_Writer.empty() ) + return RESULT_INIT; + + return m_Writer->FakeWriteFrame(size, true); +} + + // Closes the MXF file, writing the index and other closing information. ASDCP::Result_t ASDCP::JP2K::MXFWriter::Finalize() @@ -1181,6 +1226,11 @@ ASDCP::JP2K::MXFWriter::Finalize() return m_Writer->Finalize(); } +ui64_t +ASDCP::JP2K::MXFWriter::Tell() const +{ + return m_Writer->m_File.Tell(); +} //------------------------------------------------------------------------------------------ // @@ -1197,7 +1247,22 @@ public: // Result_t WriteFrame(const FrameBuffer& FrameBuf, StereoscopicPhase_t phase, - AESEncContext* Ctx, HMACContext* HMAC) + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) + { + if ( m_NextPhase != phase ) + return RESULT_SPHASE; + + if ( phase == SP_LEFT ) + { + m_NextPhase = SP_RIGHT; + return lh__Writer::WriteFrame(FrameBuf, true, Ctx, HMAC, hash); + } + + m_NextPhase = SP_LEFT; + return lh__Writer::WriteFrame(FrameBuf, false, Ctx, HMAC, hash); + } + + Result_t FakeWriteFrame(int size, StereoscopicPhase_t phase) { if ( m_NextPhase != phase ) return RESULT_SPHASE; @@ -1205,11 +1270,11 @@ public: if ( phase == SP_LEFT ) { m_NextPhase = SP_RIGHT; - return lh__Writer::WriteFrame(FrameBuf, true, Ctx, HMAC); + return lh__Writer::FakeWriteFrame(size, true); } m_NextPhase = SP_LEFT; - return lh__Writer::WriteFrame(FrameBuf, false, Ctx, HMAC); + return lh__Writer::FakeWriteFrame(size, true); } // @@ -1283,7 +1348,7 @@ ASDCP::JP2K::MXFSWriter::RIP() // the operation cannot be completed. ASDCP::Result_t ASDCP::JP2K::MXFSWriter::OpenWrite(const std::string& filename, const WriterInfo& Info, - const PictureDescriptor& PDesc, ui32_t HeaderSize) + const PictureDescriptor& PDesc, ui32_t HeaderSize, bool overwrite) { if ( Info.LabelSetType == LS_MXF_SMPTE ) m_Writer = new h__SWriter(DefaultSMPTEDict()); @@ -1306,7 +1371,7 @@ ASDCP::JP2K::MXFSWriter::OpenWrite(const std::string& filename, const WriterInfo m_Writer->m_Info = Info; - Result_t result = m_Writer->OpenWrite(filename, ASDCP::ESS_JPEG_2000_S, HeaderSize); + Result_t result = m_Writer->OpenWrite(filename, ASDCP::ESS_JPEG_2000_S, HeaderSize, overwrite); if ( ASDCP_SUCCESS(result) ) { @@ -1345,10 +1410,10 @@ ASDCP::JP2K::MXFSWriter::WriteFrame(const SFrameBuffer& FrameBuf, AESEncContext* if ( m_Writer.empty() ) return RESULT_INIT; - Result_t result = m_Writer->WriteFrame(FrameBuf.Left, SP_LEFT, Ctx, HMAC); + Result_t result = m_Writer->WriteFrame(FrameBuf.Left, SP_LEFT, Ctx, HMAC, 0); if ( ASDCP_SUCCESS(result) ) - result = m_Writer->WriteFrame(FrameBuf.Right, SP_RIGHT, Ctx, HMAC); + result = m_Writer->WriteFrame(FrameBuf.Right, SP_RIGHT, Ctx, HMAC, 0); return result; } @@ -1359,12 +1424,21 @@ ASDCP::JP2K::MXFSWriter::WriteFrame(const SFrameBuffer& FrameBuf, AESEncContext* // error occurs. ASDCP::Result_t ASDCP::JP2K::MXFSWriter::WriteFrame(const FrameBuffer& FrameBuf, StereoscopicPhase_t phase, - AESEncContext* Ctx, HMACContext* HMAC) + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) +{ + if ( m_Writer.empty() ) + return RESULT_INIT; + + return m_Writer->WriteFrame(FrameBuf, phase, Ctx, HMAC, hash); +} + +ASDCP::Result_t +ASDCP::JP2K::MXFSWriter::FakeWriteFrame(int size, StereoscopicPhase_t phase) { if ( m_Writer.empty() ) return RESULT_INIT; - return m_Writer->WriteFrame(FrameBuf, phase, Ctx, HMAC); + return m_Writer->FakeWriteFrame(size, phase); } // Closes the MXF file, writing the index and other closing information. @@ -1377,6 +1451,12 @@ ASDCP::JP2K::MXFSWriter::Finalize() return m_Writer->Finalize(); } +ui64_t +ASDCP::JP2K::MXFSWriter::Tell() const +{ + return m_Writer->m_File.Tell(); +} + // // end AS_DCP_JP2K.cpp // diff --git a/asdcplib/src/AS_DCP_MPEG2.cpp b/asdcplib/src/AS_DCP_MPEG2.cpp index 92228887..bd3b5de3 100755 --- a/asdcplib/src/AS_DCP_MPEG2.cpp +++ b/asdcplib/src/AS_DCP_MPEG2.cpp @@ -25,7 +25,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file AS_DCP_MPEG2.cpp - \version $Id: AS_DCP_MPEG2.cpp,v 1.44 2015/10/07 16:41:23 jhurst Exp $ + \version $Id: AS_DCP_MPEG2.cpp,v 1.44 2015/10/07 16:41:23 jhurst Exp $ \brief AS-DCP library, MPEG2 essence reader and writer implementation */ @@ -313,7 +313,7 @@ ASDCP::MPEG2::FrameBuffer::Dump(FILE* stream, ui32_t dump_len) const if ( m_GOPStart ) fprintf(stream, " (start %s GOP)", ( m_ClosedGOP ? "closed" : "open")); - + fputc('\n', stream); if ( dump_len > 0 ) @@ -568,7 +568,7 @@ ASDCP::MPEG2::MXFWriter::h__Writer::SetSourceStream(const VideoDescriptor& VDesc { m_FooterPart.SetDeltaParams(IndexTableSegment::DeltaEntry(-1, 0, 0)); - result = WriteASDCPHeader(MPEG_PACKAGE_LABEL, UL(m_Dict->ul(MDD_MPEG2_VESWrappingFrame)), + result = WriteASDCPHeader(MPEG_PACKAGE_LABEL, UL(m_Dict->ul(MDD_MPEG2_VESWrappingFrame)), PICT_DEF_LABEL, UL(m_EssenceUL), UL(m_Dict->ul(MDD_PictureDataDef)), m_VDesc.EditRate, derive_timecode_rate_from_edit_rate(m_VDesc.EditRate)); } @@ -607,6 +607,9 @@ ASDCP::MPEG2::MXFWriter::h__Writer::WriteFrame(const FrameBuffer& FrameBuf, AESE case FRAME_I: Flags = 0x00; break; case FRAME_P: Flags = 0x22; break; case FRAME_B: Flags = 0x33; break; + default: + /* Keep GCC quiet */ + break; } if ( FrameBuf.GOPStart() ) @@ -720,7 +723,7 @@ ASDCP::MPEG2::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo m_Writer = new h__Writer(DefaultInteropDict()); m_Writer->m_Info = Info; - + Result_t result = m_Writer->OpenWrite(filename, HeaderSize); if ( ASDCP_SUCCESS(result) ) diff --git a/asdcplib/src/AS_DCP_PCM.cpp b/asdcplib/src/AS_DCP_PCM.cpp index 73ef4efd..9493f096 100755 --- a/asdcplib/src/AS_DCP_PCM.cpp +++ b/asdcplib/src/AS_DCP_PCM.cpp @@ -25,7 +25,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file AS_DCP_PCM.cpp - \version $Id: AS_DCP_PCM.cpp,v 1.47 2014/10/02 21:02:24 jhurst Exp $ + \version $Id: AS_DCP_PCM.cpp,v 1.47 2014/10/02 21:02:24 jhurst Exp $ \brief AS-DCP library, PCM essence reader and writer implementation */ @@ -81,6 +81,10 @@ ASDCP::PCM_ADesc_to_MD(PCM::AudioDescriptor& ADesc, MXF::WaveAudioDescriptor* AD case PCM::CF_CFG_6: ADescObj->ChannelAssignment = DefaultSMPTEDict().Type(MDD_DCAudioChannelCfg_MCA).ul; break; + + default: + /* Keep GCC quiet */ + break; } return RESULT_OK; @@ -282,6 +286,10 @@ ASDCP::PCM::MXFReader::h__Reader::OpenRead(const std::string& filename) return RESULT_FORMAT; } + /* This check has been removed so that DCP-o-matic can use any edit rate + it wants. + */ +#if 0 // check for sample/frame rate sanity if ( ASDCP_SUCCESS(result) && m_ADesc.EditRate != EditRate_24 @@ -305,7 +313,7 @@ ASDCP::PCM::MXFReader::h__Reader::OpenRead(const std::string& filename) // oh, they gave us the audio sampling rate instead, assume 24/1 if ( m_ADesc.EditRate == SampleRate_48k || m_ADesc.EditRate == SampleRate_96k ) { - DefaultLogSink().Warn("adjusting EditRate to 24/1\n"); + DefaultLogSink().Warn("adjusting EditRate to 24/1\n"); m_ADesc.EditRate = EditRate_24; } else @@ -315,6 +323,7 @@ ASDCP::PCM::MXFReader::h__Reader::OpenRead(const std::string& filename) return RESULT_FORMAT; } } +#endif // TODO: test file for sane CBR index BytesPerEditUnit @@ -515,7 +524,7 @@ class ASDCP::PCM::MXFWriter::h__Writer : public ASDCP::h__ASDCPWriter public: AudioDescriptor m_ADesc; byte_t m_EssenceUL[SMPTE_UL_LENGTH]; - + h__Writer(const Dictionary& d) : ASDCP::h__ASDCPWriter(d) { memset(m_EssenceUL, 0, SMPTE_UL_LENGTH); } @@ -558,6 +567,10 @@ ASDCP::PCM::MXFWriter::h__Writer::SetSourceStream(const AudioDescriptor& ADesc) if ( ! m_State.Test_INIT() ) return RESULT_STATE; + /* This check has been removed so that DCP-o-matic can use any edit rate + it wants. + */ + #if 0 if ( ADesc.EditRate != EditRate_24 && ADesc.EditRate != EditRate_25 && ADesc.EditRate != EditRate_30 @@ -577,6 +590,7 @@ ASDCP::PCM::MXFWriter::h__Writer::SetSourceStream(const AudioDescriptor& ADesc) ADesc.EditRate.Numerator, ADesc.EditRate.Denominator); return RESULT_RAW_FORMAT; } +#endif if ( ADesc.AudioSamplingRate != SampleRate_48k && ADesc.AudioSamplingRate != SampleRate_96k ) { @@ -589,7 +603,7 @@ ASDCP::PCM::MXFWriter::h__Writer::SetSourceStream(const AudioDescriptor& ADesc) m_ADesc = ADesc; Result_t result = PCM_ADesc_to_MD(m_ADesc, (WaveAudioDescriptor*)m_EssenceDescriptor); - + if ( ASDCP_SUCCESS(result) ) { memcpy(m_EssenceUL, m_Dict->ul(MDD_WAVEssence), SMPTE_UL_LENGTH); @@ -713,7 +727,7 @@ ASDCP::PCM::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo& m_Writer = new h__Writer(DefaultInteropDict()); m_Writer->m_Info = Info; - + Result_t result = m_Writer->OpenWrite(filename, HeaderSize); if ( ASDCP_SUCCESS(result) ) diff --git a/asdcplib/src/AS_DCP_internal.h b/asdcplib/src/AS_DCP_internal.h index a52bd75b..8bc4bce8 100755 --- a/asdcplib/src/AS_DCP_internal.h +++ b/asdcplib/src/AS_DCP_internal.h @@ -157,7 +157,7 @@ namespace ASDCP Result_t Write_EKLV_Packet(Kumu::FileWriter& File, const ASDCP::Dictionary& Dict, const MXF::OP1aHeader& HeaderPart, const ASDCP::WriterInfo& Info, ASDCP::FrameBuffer& CtFrameBuf, ui32_t& FramesWritten, ui64_t & StreamOffset, const ASDCP::FrameBuffer& FrameBuf, const byte_t* EssenceUL, - AESEncContext* Ctx, HMACContext* HMAC); + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash = 0); // class KLReader : public ASDCP::KLVPacket @@ -170,8 +170,8 @@ namespace ASDCP ~KLReader() {} inline const byte_t* Key() { return m_KeyBuf; } - inline const ui64_t Length() { return m_ValueLength; } - inline const ui64_t KLLength() { return m_KLLength; } + inline ui64_t Length() { return m_ValueLength; } + inline ui64_t KLLength() { return m_KLLength; } Result_t ReadKLFromFile(Kumu::FileReader& Reader); }; @@ -200,7 +200,7 @@ namespace ASDCP Kumu::fpos_t m_LastPosition; TrackFileReader(const Dictionary& d) : - m_HeaderPart(m_Dict), m_IndexAccess(m_Dict), m_RIP(m_Dict), m_Dict(&d) + m_Dict(&d), m_HeaderPart(m_Dict), m_IndexAccess(m_Dict), m_RIP(m_Dict) { default_md_object_init(); } @@ -223,7 +223,6 @@ namespace ASDCP if ( ASDCP_SUCCESS(result) ) { result = m_RIP.InitFromFile(m_File); - ui32_t test_s = m_RIP.PairArray.size(); if ( ASDCP_FAILURE(result) ) { @@ -371,7 +370,7 @@ namespace ASDCP streamOffset = body_offset + TmpEntry.StreamOffset; temporalOffset = TmpEntry.TemporalOffset; keyFrameOffset = TmpEntry.KeyFrameOffset; - + return RESULT_OK; } @@ -381,7 +380,7 @@ namespace ASDCP m_File.Close(); } }; - + //------------------------------------------------------------------------------------------ // @@ -622,7 +621,7 @@ namespace ASDCP MPTrack.Clip->Duration.set_has_value(); m_DurationUpdateList.push_back(&(MPTrack.Clip->Duration.get())); - + // // File (Source) Package // @@ -728,7 +727,7 @@ namespace ASDCP m_DurationUpdateList.push_back(&(MPTrack.Clip->Duration)); - + // // File (Source) Package // @@ -815,7 +814,7 @@ namespace ASDCP } }; - + }/// namespace MXF //------------------------------------------------------------------------------------------ @@ -861,7 +860,8 @@ namespace ASDCP Result_t CreateBodyPart(const MXF::Rational& EditRate, ui32_t BytesPerEditUnit = 0); Result_t WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,const byte_t* EssenceUL, - AESEncContext* Ctx, HMACContext* HMAC); + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash = 0); + Result_t FakeWriteEKLVPacket(int size); Result_t WriteASDCPFooter(); }; diff --git a/asdcplib/src/JP2K_Codestream_Parser.cpp b/asdcplib/src/JP2K_Codestream_Parser.cpp index 0513d2f6..7d8596cd 100755 --- a/asdcplib/src/JP2K_Codestream_Parser.cpp +++ b/asdcplib/src/JP2K_Codestream_Parser.cpp @@ -90,6 +90,26 @@ public: return result; } + + Result_t OpenReadFrame(const unsigned char * data, unsigned int size, FrameBuffer& FB) + { + if ( FB.Capacity() < size ) + { + DefaultLogSink().Error("FrameBuf.Capacity: %u frame length: %u\n", FB.Capacity(), (ui32_t) size); + return RESULT_SMALLBUF; + } + + memcpy (FB.Data(), data, size); + FB.Size(size); + + byte_t start_of_data = 0; // out param + const Result_t result = ParseMetadataIntoDesc(FB, m_PDesc, &start_of_data); + + if ( ASDCP_SUCCESS(result) ) + FB.PlaintextOffset(start_of_data); + + return result; + } }; ASDCP::Result_t @@ -142,7 +162,7 @@ ASDCP::JP2K::ParseMetadataIntoDesc(const FrameBuffer& FB, PictureDescriptor& PDe DefaultLogSink().Error("Unexpected number of components: %u\n", PDesc.Csize); return RESULT_RAW_FORMAT; } - + for ( i = 0; i < PDesc.Csize; i++ ) SIZ_.ReadComponent(i, PDesc.ImageComponents[i]); } @@ -156,7 +176,7 @@ ASDCP::JP2K::ParseMetadataIntoDesc(const FrameBuffer& FB, PictureDescriptor& PDe DefaultLogSink().Error("Unexpectedly large CodingStyle data: %u\n", NextMarker.m_DataSize); return RESULT_RAW_FORMAT; } - + memcpy(&PDesc.CodingStyleDefault, NextMarker.m_Data, NextMarker.m_DataSize); break; @@ -168,7 +188,7 @@ ASDCP::JP2K::ParseMetadataIntoDesc(const FrameBuffer& FB, PictureDescriptor& PDe DefaultLogSink().Error("No quantization signaled. QCD size=%s.\n", NextMarker.m_DataSize); return RESULT_RAW_FORMAT; } - + if ( NextMarker.m_DataSize > MaxDefaults ) { DefaultLogSink().Error("Quantization Default length exceeds maximum %d\n", NextMarker.m_DataSize); @@ -178,6 +198,10 @@ ASDCP::JP2K::ParseMetadataIntoDesc(const FrameBuffer& FB, PictureDescriptor& PDe memcpy(&PDesc.QuantizationDefault, NextMarker.m_Data, NextMarker.m_DataSize); PDesc.QuantizationDefault.SPqcdLength = NextMarker.m_DataSize - 1; break; + + default: + /* Keep GCC quiet */ + break; } } @@ -203,6 +227,15 @@ ASDCP::JP2K::CodestreamParser::OpenReadFrame(const std::string& filename, FrameB return m_Parser->OpenReadFrame(filename, FB); } +// Opens the stream for reading, parses enough data to provide a complete +// set of stream metadata for the MXFWriter below. +ASDCP::Result_t +ASDCP::JP2K::CodestreamParser::OpenReadFrame(const unsigned char* data, unsigned int size, FrameBuffer& FB) const +{ + const_cast<ASDCP::JP2K::CodestreamParser*>(this)->m_Parser = new h__CodestreamParser; + return m_Parser->OpenReadFrame(data, size, FB); +} + // ASDCP::Result_t ASDCP::JP2K::CodestreamParser::FillPictureDescriptor(PictureDescriptor& PDesc) const diff --git a/asdcplib/src/KM_fileio.cpp b/asdcplib/src/KM_fileio.cpp index 459a08d9..f130dc4f 100644 --- a/asdcplib/src/KM_fileio.cpp +++ b/asdcplib/src/KM_fileio.cpp @@ -32,6 +32,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <KM_fileio.h> #include <KM_log.h> #include <fcntl.h> +#include <sstream> +#include <iomanip> #include <assert.h> @@ -88,9 +90,18 @@ do_stat(const char* path, fstat_t* stat_info) #ifdef KM_WIN32 UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - if ( _stati64(path, stat_info) == (__int64)-1 ) + int const wn = MultiByteToWideChar (CP_UTF8, 0, path, -1, 0, 0); + wchar_t* buffer = new wchar_t[wn]; + if (MultiByteToWideChar (CP_UTF8, 0, path, -1, buffer, wn) == 0) { + delete[] buffer; + return Kumu::RESULT_FAIL; + } + + if ( _wstati64(buffer, stat_info) == (__int64)-1 ) result = Kumu::RESULT_FILEOPEN; + delete[] buffer; + ::SetErrorMode( prev ); #else if ( stat(path, stat_info) == -1L ) @@ -400,7 +411,7 @@ std::string Kumu::PathGetExtension(const std::string& Path) { std::string Basename = PathBasename(Path); - const char* p = strrchr(Basename.c_str(), '.'); + const char* p = strrchr(Basename.c_str(), '.'); if ( p++ == 0 ) return ""; @@ -413,7 +424,7 @@ std::string Kumu::PathSetExtension(const std::string& Path, const std::string& Extension) // empty extension removes { std::string Basename = PathBasename(Path); - const char* p = strrchr(Basename.c_str(), '.'); + const char* p = strrchr(Basename.c_str(), '.'); if ( p != 0 ) Basename = Basename.substr(0, p - Basename.c_str()); @@ -475,7 +486,7 @@ Kumu::PathResolveLinks(const std::string& link_path, std::string& resolved_path, DefaultLogSink().Error("%s: readlink: %s\n", next_link.c_str(), strerror(errno)); return false; } - + assert(link_size < MaxFilePath); link_buf[link_size] = 0; std::string tmp_path; @@ -543,7 +554,7 @@ Kumu::FindInPath(const IPathMatch& Pattern, const std::string& SearchDir, if ( PathIsDirectory(tmp_path.c_str()) ) FindInPath(Pattern, tmp_path, FoundPaths, one_shot, separator); - + else if ( Pattern.Match(name_buf) ) { FoundPaths.push_back(SearchDir + separator + name_buf); @@ -717,7 +728,9 @@ Kumu::FileReader::Size() const // these are declared here instead of in the header file // because we have a mem_ptr that is managing a hidden class -Kumu::FileWriter::FileWriter() {} +Kumu::FileWriter::FileWriter() + : m_Hashing (false) +{} Kumu::FileWriter::~FileWriter() {} // @@ -742,6 +755,38 @@ Kumu::FileWriter::Writev(const byte_t* buf, ui32_t buf_len) return RESULT_OK; } +void +Kumu::FileWriter::StartHashing() +{ + m_Hashing = true; + MD5_Init (&m_MD5Context); +} + +void +Kumu::FileWriter::MaybeHash(void const * data, int size) +{ + if (m_Hashing) { + MD5_Update (&m_MD5Context, data, size); + } +} + +std::string +Kumu::FileWriter::StopHashing() +{ + m_Hashing = false; + + unsigned char digest[MD5_DIGEST_LENGTH]; + MD5_Final (digest, &m_MD5Context); + + std::stringstream s; + for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) { + s << std::hex << std::setfill('0') << std::setw(2) << ((int) digest[i]); + } + + return s.str (); +} + + #ifdef KM_WIN32 //------------------------------------------------------------------------------------------ @@ -751,11 +796,17 @@ Kumu::Result_t Kumu::FileReader::OpenRead(const std::string& filename) const { const_cast<FileReader*>(this)->m_Filename = filename; - + // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - const_cast<FileReader*>(this)->m_Handle = ::CreateFileA(filename.c_str(), + int const wn = MultiByteToWideChar (CP_UTF8, 0, filename, -1, 0, 0); + wchar_t* buffer = new wchar_t[wn]; + if (MultiByteToWideChar (CP_UTF8, 0, filename, -1, buffer, wn) == 0) { + delete[] buffer; + return Kumu::RESULT_FAIL; + } + const_cast<FileReader*>(this)->m_Handle = ::CreateFileW(buffer, (GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -764,6 +815,8 @@ Kumu::FileReader::OpenRead(const std::string& filename) const NULL // no template file ); + delete[] buffer; + ::SetErrorMode(prev); return ( m_Handle == INVALID_HANDLE_VALUE ) ? @@ -804,7 +857,7 @@ Kumu::FileReader::Seek(Kumu::fpos_t position, SeekPos_t whence) const && (in.LowPart == INVALID_SET_FILE_POINTER || in.LowPart == ERROR_NEGATIVE_SEEK )) ) return Kumu::RESULT_READFAIL; - + return Kumu::RESULT_OK; } @@ -849,7 +902,7 @@ Kumu::FileReader::Read(byte_t* buf, ui32_t buf_len, ui32_t* read_count) const if ( m_Handle == INVALID_HANDLE_VALUE ) return Kumu::RESULT_FILEOPEN; - + UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); if ( ::ReadFile(m_Handle, buf, buf_len, &tmp_count, NULL) == 0 ) result = Kumu::RESULT_READFAIL; @@ -875,11 +928,18 @@ Kumu::Result_t Kumu::FileWriter::OpenWrite(const std::string& filename) { m_Filename = filename; - + // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - m_Handle = ::CreateFileA(filename.c_str(), + int const wn = MultiByteToWideChar (CP_UTF8, 0, filename, -1, 0, 0); + wchar_t* buffer = new wchar_t[wn]; + if (MultiByteToWideChar (CP_UTF8, 0, filename, -1, buffer, wn) == 0) { + delete[] buffer; + return Kumu::RESULT_FAIL; + } + + m_Handle = ::CreateFileW(buffer, (GENERIC_WRITE|GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -888,11 +948,50 @@ Kumu::FileWriter::OpenWrite(const std::string& filename) NULL // no template file ); + delete[] buffer; + + ::SetErrorMode(prev); + + if ( m_Handle == INVALID_HANDLE_VALUE ) + return Kumu::RESULT_FILEOPEN; + + m_IOVec = new h__iovec; + return Kumu::RESULT_OK; +} + +/** @param filename File name (UTF-8 encoded) */ +Kumu::Result_t +Kumu::FileWriter::OpenModify(const char* filename) +{ + KM_TEST_NULL_STR_L(filename); + m_Filename = filename; + + // suppress popup window on error + UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); + + int const wn = MultiByteToWideChar (CP_UTF8, 0, filename, -1, 0, 0); + wchar_t* buffer = new wchar_t[wn]; + if (MultiByteToWideChar (CP_UTF8, 0, filename, -1, buffer, wn) == 0) { + delete[] buffer; + return Kumu::RESULT_FAIL; + } + + m_Handle = ::CreateFileW(buffer, + (GENERIC_WRITE|GENERIC_READ), // open for reading + FILE_SHARE_READ, // share for reading + NULL, // no security + OPEN_ALWAYS, // don't truncate existing + FILE_ATTRIBUTE_NORMAL, // normal file + NULL // no template file + ); + + delete[] buffer; + ::SetErrorMode(prev); if ( m_Handle == INVALID_HANDLE_VALUE ) return Kumu::RESULT_FILEOPEN; - + m_IOVec = new h__iovec; return Kumu::RESULT_OK; } @@ -931,6 +1030,7 @@ Kumu::FileWriter::Writev(ui32_t* bytes_written) break; } + MaybeHash (iov->m_iovec[i].iov_base, iov->m_iovec[i].iov_len); *bytes_written += tmp_count; } @@ -961,6 +1061,8 @@ Kumu::FileWriter::Write(const byte_t* buf, ui32_t buf_len, ui32_t* bytes_written if ( result == 0 || *bytes_written != buf_len ) return Kumu::RESULT_WRITEFAIL; + MaybeHash (buf, buf_len); + return Kumu::RESULT_OK; } @@ -1100,12 +1202,16 @@ Kumu::FileWriter::Writev(ui32_t* bytes_written) total_size += iov->m_iovec[i].iov_len; int write_size = writev(m_Handle, iov->m_iovec, iov->m_Count); - + if ( write_size == -1L || write_size != total_size ) return RESULT_WRITEFAIL; + for (int i = 0; i < iov->m_Count; ++i) { + MaybeHash (iov->m_iovec[i].iov_base, iov->m_iovec[i].iov_len); + } + iov->m_Count = 0; - *bytes_written = write_size; + *bytes_written = write_size; return RESULT_OK; } @@ -1123,6 +1229,7 @@ Kumu::FileWriter::Write(const byte_t* buf, ui32_t buf_len, ui32_t* bytes_written return RESULT_STATE; int write_size = write(m_Handle, buf, buf_len); + MaybeHash (buf, buf_len); if ( write_size == -1L || (ui32_t)write_size != buf_len ) return RESULT_WRITEFAIL; @@ -1197,7 +1304,7 @@ Kumu::WriteStringIntoFile(const std::string& filename, const std::string& inStri // Kumu::Result_t -Kumu::ReadFileIntoObject(const std::string& Filename, Kumu::IArchive& Object, ui32_t max_size) +Kumu::ReadFileIntoObject(const std::string& Filename, Kumu::IArchive& Object, ui32_t) { ByteString Buffer; ui32_t file_size = static_cast<ui32_t>(FileSize(Filename)); @@ -1212,7 +1319,7 @@ Kumu::ReadFileIntoObject(const std::string& Filename, Kumu::IArchive& Object, ui if ( KM_SUCCESS(result) ) result = Reader.Read(Buffer.Data(), file_size, &read_count); - + if ( KM_SUCCESS(result) ) { assert(file_size == read_count); @@ -1258,7 +1365,7 @@ Kumu::WriteObjectIntoFile(const Kumu::IArchive& Object, const std::string& Filen // Result_t -Kumu::ReadFileIntoBuffer(const std::string& Filename, Kumu::ByteString& Buffer, ui32_t max_size) +Kumu::ReadFileIntoBuffer(const std::string& Filename, Kumu::ByteString& Buffer, ui32_t) { ui32_t file_size = FileSize(Filename); Result_t result = Buffer.Capacity(file_size); @@ -1272,16 +1379,16 @@ Kumu::ReadFileIntoBuffer(const std::string& Filename, Kumu::ByteString& Buffer, if ( KM_SUCCESS(result) ) result = Reader.Read(Buffer.Data(), file_size, &read_count); - + if ( KM_SUCCESS(result) ) { - if ( file_size != read_count) + if ( file_size != read_count) return RESULT_READFAIL; Buffer.Length(read_count); } } - + return result; } @@ -1297,7 +1404,7 @@ Kumu::WriteBufferIntoFile(const Kumu::ByteString& Buffer, const std::string& Fil if ( KM_SUCCESS(result) ) result = Writer.Write(Buffer.RoData(), Buffer.Length(), &write_count); - if ( KM_SUCCESS(result) && Buffer.Length() != write_count) + if ( KM_SUCCESS(result) && Buffer.Length() != write_count) return RESULT_WRITEFAIL; return result; @@ -1307,285 +1414,38 @@ Kumu::WriteBufferIntoFile(const Kumu::ByteString& Buffer, const std::string& Fil // -// Win32 directory scanner -// -#ifdef KM_WIN32 - -// -Kumu::DirScanner::DirScanner(void) : m_Handle(-1) {} - -// -// -Result_t -Kumu::DirScanner::Open(const std::string& filename) +Kumu::DirScanner::DirScanner() { - // we need to append a '*' to read the entire directory - ui32_t fn_len = filename.size(); - char* tmp_file = (char*)malloc(fn_len + 8); - - if ( tmp_file == 0 ) - return RESULT_ALLOC; - - strcpy(tmp_file, filename.c_str()); - char* p = &tmp_file[fn_len] - 1; - - if ( *p != '/' && *p != '\\' ) - { - p++; - *p++ = '/'; - } - - *p++ = '*'; - *p = 0; - // whew... - - m_Handle = _findfirsti64(tmp_file, &m_FileInfo); - Result_t result = RESULT_OK; - if ( m_Handle == -1 ) - result = RESULT_NOT_FOUND; - - return result; } - -// -// Result_t -Kumu::DirScanner::Close() +Kumu::DirScanner::Open(const std::string& filename) { - if ( m_Handle == -1 ) - return RESULT_FILEOPEN; - - if ( _findclose((long)m_Handle) == -1 ) - return RESULT_FAIL; + if (!boost::filesystem::is_directory(filename)) { + return RESULT_NOT_FOUND; + } - m_Handle = -1; + _iterator = boost::filesystem::directory_iterator (filename); return RESULT_OK; } - -// This sets filename param to the same per-instance buffer every time, so -// the value will change on the next call Result_t -Kumu::DirScanner::GetNext(char* filename) +Kumu::DirScanner::GetNext (char* filename) { - KM_TEST_NULL_L(filename); - - if ( m_Handle == -1 ) - return RESULT_FILEOPEN; - - if ( m_FileInfo.name[0] == '\0' ) + if (_iterator == boost::filesystem::directory_iterator()) { return RESULT_ENDOFFILE; - - strncpy(filename, m_FileInfo.name, MaxFilePath); - Result_t result = RESULT_OK; - - if ( _findnexti64((long)m_Handle, &m_FileInfo) == -1 ) - { - m_FileInfo.name[0] = '\0'; - - if ( errno != ENOENT ) - result = RESULT_FAIL; - } - - return result; -} - - -#else // KM_WIN32 - -// POSIX directory scanner - -// -Kumu::DirScanner::DirScanner(void) : m_Handle(NULL) {} - -// -Result_t -Kumu::DirScanner::Open(const std::string& dirname) -{ - Result_t result = RESULT_OK; - - if ( ( m_Handle = opendir(dirname.c_str()) ) == NULL ) - { - switch ( errno ) - { - case ENOENT: - case ENOTDIR: - result = RESULT_NOTAFILE; - case EACCES: - result = RESULT_NO_PERM; - case ELOOP: - case ENAMETOOLONG: - result = RESULT_PARAM; - case EMFILE: - case ENFILE: - result = RESULT_STATE; - default: - DefaultLogSink().Error("DirScanner::Open(%s): %s\n", dirname.c_str(), strerror(errno)); - result = RESULT_FAIL; - } - } - - return result; -} - - -// -Result_t -Kumu::DirScanner::Close() -{ - if ( m_Handle == NULL ) - return RESULT_FILEOPEN; - - if ( closedir(m_Handle) == -1 ) { - switch ( errno ) - { - case EBADF: - case EINTR: - return RESULT_STATE; - default: - DefaultLogSink().Error("DirScanner::Close(): %s\n", strerror(errno)); - return RESULT_FAIL; - } } - - m_Handle = NULL; - return RESULT_OK; -} - - -// -Result_t -Kumu::DirScanner::GetNext(char* filename) -{ - KM_TEST_NULL_L(filename); - - if ( m_Handle == NULL ) - return RESULT_FILEOPEN; - - struct dirent* entry; - - for (;;) - { - if ( ( entry = readdir(m_Handle)) == NULL ) - return RESULT_ENDOFFILE; - - break; - } - - strncpy(filename, entry->d_name, MaxFilePath); - return RESULT_OK; -} - - -// -Kumu::DirScannerEx::DirScannerEx() : m_Handle(0) {} - -// -Result_t -Kumu::DirScannerEx::Open(const std::string& dirname) -{ - Result_t result = RESULT_OK; - - if ( ( m_Handle = opendir(dirname.c_str()) ) == 0 ) - { - switch ( errno ) - { - case ENOENT: - case ENOTDIR: - result = RESULT_NOTAFILE; - case EACCES: - result = RESULT_NO_PERM; - case ELOOP: - case ENAMETOOLONG: - result = RESULT_PARAM; - case EMFILE: - case ENFILE: - result = RESULT_STATE; - default: - DefaultLogSink().Error("DirScanner::Open(%s): %s\n", dirname.c_str(), strerror(errno)); - result = RESULT_FAIL; - } - } - - if ( KM_SUCCESS(result) ) - m_Dirname = dirname; - - KM_RESULT_STATE_TEST_IMPLICIT(); - return result; -} - -// -Result_t -Kumu::DirScannerEx::Close() -{ - if ( m_Handle == NULL ) - return RESULT_FILEOPEN; - - if ( closedir(m_Handle) == -1 ) - { - switch ( errno ) - { - case EBADF: - case EINTR: - KM_RESULT_STATE_HERE(); - return RESULT_STATE; - - default: - DefaultLogSink().Error("DirScanner::Close(): %s\n", strerror(errno)); - return RESULT_FAIL; - } - } - - m_Handle = 0; - return RESULT_OK; -} - -// -Result_t -Kumu::DirScannerEx::GetNext(std::string& next_item_name, DirectoryEntryType_t& next_item_type) -{ - if ( m_Handle == 0 ) - return RESULT_FILEOPEN; - - struct dirent* entry; - - for (;;) - { - if ( ( entry = readdir(m_Handle) ) == 0 ) - return RESULT_ENDOFFILE; - - break; - } - - next_item_name.assign(entry->d_name, strlen(entry->d_name)); - - switch ( entry->d_type ) - { - case DT_DIR: - next_item_type = DET_DIR; - break; - - case DT_REG: - next_item_type = DET_FILE; - break; - - case DT_LNK: - next_item_type = DET_LINK; - break; - - default: - next_item_type = DET_DEV; - } - +#if BOOST_FILESYSTEM_VERSION == 3 + std::string f = boost::filesystem::path(*_iterator).filename().generic_string(); +#else + std::string f = boost::filesystem::path(*_iterator).filename(); +#endif + strncpy (filename, f.c_str(), MaxFilePath); + ++_iterator; return RESULT_OK; } - -#endif // KM_WIN32 - - //------------------------------------------------------------------------------------------ // @@ -1676,7 +1536,7 @@ h__DeletePath(const std::string& pathname) { if ( next_file[1] == 0 ) continue; // don't delete 'this' - + if ( next_file[1] == '.' && next_file[2] == 0 ) continue; // don't delete 'this' parent } @@ -1796,7 +1656,7 @@ Kumu::FreeSpaceForPath(const std::string& path, Kumu::fsize_t& free_space, Kumu: DefaultLogSink().Error("FreeSpaceForPath statfs %s: %s\n", path.c_str(), strerror(errno)); return RESULT_FAIL; #endif // KM_WIN32 -} +} // diff --git a/asdcplib/src/KM_fileio.h b/asdcplib/src/KM_fileio.h index dd4d2ca1..e8333ee4 100755 --- a/asdcplib/src/KM_fileio.h +++ b/asdcplib/src/KM_fileio.h @@ -34,6 +34,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <KM_util.h> #include <string> +#include <boost/filesystem.hpp> +#include <openssl/md5.h> #ifdef KM_WIN32 # include <io.h> @@ -51,27 +53,18 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Kumu { - // class DirScanner - { - public: -#ifdef KM_WIN32 - __int64 m_Handle; - struct _finddatai64_t m_FileInfo; -#else - DIR* m_Handle; -#endif - - DirScanner(void); - ~DirScanner() { Close(); } - - Result_t Open(const std::string&); - Result_t Close(); - Result_t GetNext(char*); - }; - + { + public: + DirScanner(); + Result_t Open(const std::string &); + Result_t GetNext(char *); + Result_t Close(); + private: + boost::filesystem::directory_iterator _iterator; + }; - // + // enum DirectoryEntryType_t { DET_FILE, DET_DIR, @@ -93,7 +86,7 @@ namespace Kumu KM_NO_COPY_CONSTRUCT(DirScannerEx); public: - + DirScannerEx(); ~DirScannerEx() { Close(); } @@ -142,7 +135,7 @@ namespace Kumu // // error: 'void Kumu::compile_time_size_checker() [with bool sizecheck = false]' previously declared here // - // This is happening because the equality being tested below is false. The reason for this + // This is happening because the equality being tested below is false. The reason for this // will depend on your OS, but on Linux it is probably because you have not used -D_FILE_OFFSET_BITS=64 // Adding this magic macro to your CFLAGS will get you going again. If you are on a system that // does not support 64-bit files, you can disable this check by using -DKM_SMALL_FILES_OK. You @@ -351,6 +344,8 @@ namespace Kumu class h__iovec; mem_ptr<h__iovec> m_IOVec; KM_NO_COPY_CONSTRUCT(FileWriter); + bool m_Hashing; + MD5_CTX m_MD5Context; public: FileWriter(); @@ -370,6 +365,10 @@ namespace Kumu // the iovec list will be written to disk before the given buffer,as though // you had called Writev() first. Result_t Write(const byte_t*, ui32_t, ui32_t* = 0); // write buffer to disk + + void StartHashing(); + void MaybeHash(void const *, int); + std::string StopHashing(); }; Result_t CreateDirectoriesInPath(const std::string& Path); diff --git a/asdcplib/src/KM_log.cpp b/asdcplib/src/KM_log.cpp index dc7bf3f2..89cf10ab 100755 --- a/asdcplib/src/KM_log.cpp +++ b/asdcplib/src/KM_log.cpp @@ -202,6 +202,9 @@ Kumu::SyslogLogSink::WriteEntry(const LogEntry& Entry) case Kumu::LOG_NOTICE: priority = SYSLOG_NOTICE; break; case Kumu::LOG_INFO: priority = SYSLOG_INFO; break; case Kumu::LOG_DEBUG: priority = SYSLOG_DEBUG; break; + default: + /* Keep GCC quiet */ + break; } AutoMutex L(m_lock); @@ -294,6 +297,10 @@ Kumu::LogEntry::TestFilter(i32_t filter) const return false; break; + default: + /* Keep GCC quiet */ + break; + } return true; @@ -325,7 +332,7 @@ Kumu::LogEntry::CreateStringWithOptions(std::string& out_buf, i32_t opt) const if ( (opt & LOG_OPTION_TYPE) != 0 ) { if ( ! out_buf.empty() ) out_buf += " "; - + switch ( Type ) { case LOG_CRIT: out_buf += "CRT"; break; diff --git a/asdcplib/src/KM_prng.cpp b/asdcplib/src/KM_prng.cpp index 5212595f..10a97eb8 100755 --- a/asdcplib/src/KM_prng.cpp +++ b/asdcplib/src/KM_prng.cpp @@ -64,6 +64,7 @@ public: AES_KEY m_Context; byte_t m_ctr_buf[RNG_BLOCK_SIZE]; Mutex m_Lock; + unsigned int m_libdcp_test_rng_state; h__RNG() { @@ -97,8 +98,12 @@ public: } // end AutoMutex context set_key(rng_key); + +#ifdef LIBDCP_POSIX + reset(); +#endif } - + // void set_key(const byte_t* key_fodder) @@ -114,9 +119,10 @@ public: AutoMutex Lock(m_Lock); AES_set_encrypt_key(sha_buf, RNG_KEY_SIZE_BITS, &m_Context); - *(ui32_t*)(m_ctr_buf + 12) = 1; + ui32_t* p = (ui32_t*) (m_ctr_buf + 12); + *p = 1; } - + // void fill_rand(byte_t* buf, ui32_t len) @@ -128,17 +134,37 @@ public: while ( gen_count + RNG_BLOCK_SIZE <= len ) { AES_encrypt(m_ctr_buf, buf + gen_count, &m_Context); - *(ui32_t*)(m_ctr_buf + 12) += 1; + ui32_t* p = (ui32_t*) (m_ctr_buf + 12); + *p += 1; gen_count += RNG_BLOCK_SIZE; } - + if ( len != gen_count ) // partial count needed? { byte_t tmp[RNG_BLOCK_SIZE]; AES_encrypt(m_ctr_buf, tmp, &m_Context); memcpy(buf + gen_count, tmp, len - gen_count); } + +#ifdef LIBDCP_POSIX + if (libdcp_test) + { + for (unsigned int i = 0; i < len; ++i) + buf[i] = rand_r(&m_libdcp_test_rng_state); + } +#endif + +#ifdef LIBDCP_WINDOWS + /* XXX */ +#endif } + +#ifdef LIBDCP_POSIX + void reset () + { + m_libdcp_test_rng_state = 1; + } +#endif }; @@ -173,13 +199,13 @@ Kumu::FortunaRNG::FillRandom(byte_t* buf, ui32_t len) s_RNG->fill_rand(buf, gen_size); buf += gen_size; len -= gen_size; - + // re-seed the generator byte_t rng_key[RNG_KEY_SIZE]; s_RNG->fill_rand(rng_key, RNG_KEY_SIZE); s_RNG->set_key(rng_key); } - + return front_of_buffer; } @@ -192,6 +218,14 @@ Kumu::FortunaRNG::FillRandom(Kumu::ByteString& Buffer) return Buffer.Data(); } +#ifdef LIBDCP_POSIX +void +Kumu::FortunaRNG::Reset() +{ + s_RNG->reset(); +} +#endif + //------------------------------------------------------------------------------------------ // diff --git a/asdcplib/src/KM_prng.h b/asdcplib/src/KM_prng.h index 2a909d6f..5794db57 100755 --- a/asdcplib/src/KM_prng.h +++ b/asdcplib/src/KM_prng.h @@ -45,6 +45,9 @@ namespace Kumu ~FortunaRNG(); const byte_t* FillRandom(byte_t* buf, ui32_t len); const byte_t* FillRandom(ByteString&); +#ifdef LIBDCP_POSIX + void Reset(); +#endif }; diff --git a/asdcplib/src/KM_tai.cpp b/asdcplib/src/KM_tai.cpp index 2cbd1253..509e8632 100644 --- a/asdcplib/src/KM_tai.cpp +++ b/asdcplib/src/KM_tai.cpp @@ -190,6 +190,7 @@ Kumu::TAI::tai::now() ct.hour = st.wHour; ct.minute = st.wMinute; ct.second = st.wSecond; + ct.offset = 0; caltime_tai(&ct, this); #else struct timeval now; diff --git a/asdcplib/src/KM_util.cpp b/asdcplib/src/KM_util.cpp index f738814f..3901925d 100755 --- a/asdcplib/src/KM_util.cpp +++ b/asdcplib/src/KM_util.cpp @@ -40,6 +40,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <map> #include <string> +bool Kumu::libdcp_test = false; + const char* Kumu::Version() { @@ -129,7 +131,7 @@ Kumu::Result_t::Get(unsigned int i) } // -Kumu::Result_t::Result_t(int v, const std::string& s, const std::string& l) : value(v), symbol(s), label(l) +Kumu::Result_t::Result_t(int v, const std::string& s, const std::string& l) : value(v), label(l), symbol(s) { assert(!l.empty()); assert(!s.empty()); @@ -320,7 +322,7 @@ Kumu::base64encode(const byte_t* buf, ui32_t buf_len, char* strbuf, ui32_t strbu diff = buf_len - i; assert(diff > 0); assert(diff < 3); - + strbuf[out_char++] = base64_chars[( buf[0] >> 2 )]; if ( diff == 1 ) @@ -575,7 +577,7 @@ Kumu::bin2UUIDhex(const byte_t* bin_buf, ui32_t bin_len, char* str_buf, ui32_t s // add in the hyphens and trainling null for ( i = 8; i < 24; i += 5 ) str_buf[i] = '-'; - + str_buf[36] = 0; return str_buf; } @@ -589,6 +591,15 @@ Kumu::GenRandomValue(UUID& ID) ID.Set(tmp_buf); } +#ifdef LIBDCP_POSIX +void +Kumu::ResetTestRNG() +{ + FortunaRNG RNG; + RNG.Reset(); +} +#endif + // void Kumu::GenRandomUUID(byte_t* buf) @@ -647,7 +658,7 @@ bool Kumu::read_BER(const byte_t* buf, ui64_t* val) { ui8_t ber_size, i; - + if ( buf == 0 || val == 0 ) return false; @@ -671,7 +682,7 @@ Kumu::read_BER(const byte_t* buf, ui64_t* val) static const ui64_t ber_masks[9] = - { ui64_C(0xffffffffffffffff), ui64_C(0xffffffffffffff00), + { ui64_C(0xffffffffffffffff), ui64_C(0xffffffffffffff00), ui64_C(0xffffffffffff0000), ui64_C(0xffffffffff000000), ui64_C(0xffffffff00000000), ui64_C(0xffffff0000000000), ui64_C(0xffff000000000000), ui64_C(0xff00000000000000), @@ -716,7 +727,7 @@ Kumu::write_BER(byte_t* buf, ui64_t val, ui32_t ber_len) DefaultLogSink().Error("BER integer length %u exceeds maximum size of 9\n", ber_len); return false; } - + if ( ( val & ber_masks[ber_len - 1] ) != 0 ) { ui64Printer tmp_i(val); @@ -745,7 +756,14 @@ Kumu::write_BER(byte_t* buf, ui64_t val, ui32_t ber_len) // Kumu::Timestamp::Timestamp() : m_TZOffsetMinutes(0) { - m_Timestamp.now(); + if (libdcp_test) + { + m_Timestamp.x = 42; + } + else + { + m_Timestamp.now(); + } } Kumu::Timestamp::Timestamp(const Timestamp& rhs) { @@ -830,7 +848,7 @@ Kumu::Timestamp::SetTZOffsetMinutes(const i32_t& minutes) return true; } -// +// const char* Kumu::Timestamp::EncodeString(char* str_buf, ui32_t buf_len) const { @@ -859,7 +877,7 @@ Kumu::Timestamp::EncodeString(char* str_buf, ui32_t buf_len) const if ( m_TZOffsetMinutes < 0 ) direction = '-'; } - + // 2004-05-01T13:20:00+00:00 snprintf(str_buf, buf_len, "%04hu-%02hhu-%02hhuT%02hhu:%02hhu:%02hhu%c%02u:%02u", @@ -889,7 +907,7 @@ Kumu::Timestamp::DecodeString(const char* datestr) YMDhms.date.year = strtol(datestr, 0, 10); YMDhms.date.month = strtol(datestr + 5, 0, 10); YMDhms.date.day = strtol(datestr + 8, 0, 10); - + if ( datestr[10] == 'T' ) { if ( ! ( isdigit(datestr[11]) && isdigit(datestr[12]) ) @@ -962,7 +980,7 @@ Kumu::Timestamp::DecodeString(const char* datestr) datestr, char_count); return false; } - + m_Timestamp = YMDhms; m_TZOffsetMinutes = YMDhms.offset; return true; @@ -1004,7 +1022,7 @@ Kumu::Timestamp::Archive(MemIOWriter* Writer) const ui8_t month, day, hour, minute, second, tick = 0; GetComponents(year, month, day, hour, minute, second); - if ( ! Writer->WriteUi16BE(year) ) return false; + if ( ! Writer->WriteUi16BE(year) ) return false; if ( ! Writer->WriteUi8(month) ) return false; if ( ! Writer->WriteUi8(day) ) return false; if ( ! Writer->WriteUi8(hour) ) return false; @@ -1140,7 +1158,7 @@ Kumu::ByteString::Capacity(ui32_t cap_size) else free(m_Data); } - + if ( ( m_Data = (byte_t*)malloc(cap_size) ) == 0 ) return RESULT_ALLOC; @@ -1150,7 +1168,7 @@ Kumu::ByteString::Capacity(ui32_t cap_size) memcpy(m_Data, tmp_data, m_Length); free(tmp_data); } - + m_Capacity = cap_size; return RESULT_OK; } @@ -1241,7 +1259,7 @@ Kumu::km_token_split(const std::string& str, const std::string& separator) pstr = r + separator.size(); r = strstr(pstr, separator.c_str()); } - + components.push_back(std::string(pstr)); return components; } diff --git a/asdcplib/src/KM_util.h b/asdcplib/src/KM_util.h index 8b1db49f..553f4acf 100755 --- a/asdcplib/src/KM_util.h +++ b/asdcplib/src/KM_util.h @@ -40,6 +40,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Kumu { + extern bool libdcp_test; + // The version number declaration and explanation are in ../configure.ac const char* Version(); @@ -53,7 +55,7 @@ namespace Kumu protected: const char* m_format; char m_strbuf[SIZE]; - + public: IntPrinter(const char* format, T value) { assert(format); @@ -299,7 +301,7 @@ namespace Kumu if ( m_Value[i] != rhs.m_Value[i] ) return m_Value[i] < rhs.m_Value[i]; } - + return false; } @@ -375,10 +377,13 @@ namespace Kumu return bin2UUIDhex(m_Value, Size(), buf, buf_len); } }; - + void GenRandomUUID(byte_t* buf); // buf must be UUID_Length or longer void GenRandomValue(UUID&); - +#ifdef LIBDCP_POSIX + void ResetTestRNG(); +#endif + typedef ArchivableList<UUID> UUIDList; // a self-wiping key container @@ -427,7 +432,7 @@ namespace Kumu // always UTC void GetComponents(ui16_t& Year, ui8_t& Month, ui8_t& Day, - ui8_t& Hour, ui8_t& Minute, ui8_t& Second) const; + ui8_t& Hour, ui8_t& Minute, ui8_t& Second) const; void SetComponents(const ui16_t& Year, const ui8_t& Month, const ui8_t& Day, const ui8_t& Hour, const ui8_t& Minute, const ui8_t& Second); @@ -470,12 +475,12 @@ namespace Kumu class ByteString : public IArchive { KM_NO_COPY_CONSTRUCT(ByteString); - + protected: byte_t* m_Data; // pointer to memory area containing frame data ui32_t m_Capacity; // size of memory area pointed to by m_Data ui32_t m_Length; // length of byte string in memory area pointed to by m_Data - + public: ByteString(); ByteString(ui32_t cap); @@ -486,19 +491,19 @@ namespace Kumu Result_t Append(const ByteString&); Result_t Append(const byte_t* buf, ui32_t buf_len); - + // returns the size of the buffer inline ui32_t Capacity() const { return m_Capacity; } // returns a const pointer to the essence data inline const byte_t* RoData() const { assert(m_Data); return m_Data; } - + // returns a non-const pointer to the essence data inline byte_t* Data() { assert(m_Data); return m_Data; } - + // set the length of the buffer's contents inline ui32_t Length(ui32_t l) { return m_Length = l; } - + // returns the length of the buffer's contents inline ui32_t Length() const { return m_Length; } diff --git a/asdcplib/src/KM_xml.cpp b/asdcplib/src/KM_xml.cpp index 31124f39..04a81ebb 100644 --- a/asdcplib/src/KM_xml.cpp +++ b/asdcplib/src/KM_xml.cpp @@ -59,7 +59,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <xercesc/framework/XMLPScanToken.hpp> -XERCES_CPP_NAMESPACE_USE +XERCES_CPP_NAMESPACE_USE extern "C" { @@ -437,7 +437,7 @@ public: }; // expat wrapper functions -// +// static void xph_start(void* p, const XML_Char* name, const XML_Char** attrs) { @@ -467,7 +467,7 @@ xph_start(void* p, const XML_Char* name, const XML_Char** attrs) std::string key; if ( ns_root != name ) key.assign(ns_root, name - ns_root - 1); - + ns_map::iterator ni = Ctx->Namespaces->find(key); if ( ni != Ctx->Namespaces->end() ) Element->SetNamespace(ni->second); @@ -514,7 +514,7 @@ xph_namespace_start(void* p, const XML_Char* ns_prefix, const XML_Char* ns_name) { assert(p); assert(ns_name); ExpatParseContext* Ctx = (ExpatParseContext*)p; - + if ( ns_prefix == 0 ) ns_prefix = ""; @@ -578,7 +578,7 @@ Kumu::XMLElement::ParseString(const char* document, ui32_t doc_len) } // expat wrapper functions -// +// static void xph_start_one_shot(void* p, const XML_Char* name, const XML_Char** attrs) { @@ -639,7 +639,7 @@ Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) static Mutex sg_xerces_init_lock; // protect the xerces initialized static bool sg_xml_init = false; // signal initialization -static Mutex sg_coder_lock; // protect the transcoder context +static Mutex sg_coder_lock; // protect the transcoder context static XMLTranscoder* sg_coder = 0; static const int sg_coder_buf_len = 128 * 1024; static char sg_coder_buf[sg_coder_buf_len + 8]; @@ -647,7 +647,7 @@ static unsigned char sg_coder_counts[sg_coder_buf_len / sizeof(XMLCh)]; // see X static const XMLCh sg_LS[] = { chLatin_L, chLatin_S, chNull }; static const XMLCh sg_label_UTF_8[] = { chLatin_U, chLatin_T, chLatin_F, - chDash, chDigit_8, chNull}; + chDash, chDigit_8, chNull}; // void @@ -902,7 +902,7 @@ public: std::string key; if ( ns_root != name ) key.assign(ns_root, name - ns_root - 1); - + ns_map::iterator ni = m_Namespaces->find(key); if ( ni != m_Namespaces->end() ) Element->SetNamespace(ni->second); @@ -973,7 +973,7 @@ Kumu::XMLElement::ParseString(const char* document, ui32_t doc_len) DefaultLogSink().Error("Unexpected XML parser error\n"); errorCount++; } - + if ( errorCount == 0 ) m_NamespaceOwner = (void*)docHandler->TakeNamespaceMap(); @@ -993,7 +993,7 @@ Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) } kumu_init_xml_dom(); - + int errorCount = 0; SAXParser* parser = new SAXParser(); @@ -1040,7 +1040,7 @@ Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) DefaultLogSink().Error("Unexpected XML parser error\n"); errorCount++; } - + if ( errorCount == 0 ) m_NamespaceOwner = (void*)docHandler->TakeNamespaceMap(); @@ -1059,14 +1059,14 @@ Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) // bool -Kumu::XMLElement::ParseString(const char* document, ui32_t doc_len) +Kumu::XMLElement::ParseString(const char*, ui32_t) { DefaultLogSink().Error("Kumu compiled without XML parser support.\n"); return false; } bool -Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) +Kumu::XMLElement::ParseFirstFromString(const char*, ui32_t) { DefaultLogSink().Error("Kumu compiled without XML parser support.\n"); return false; diff --git a/asdcplib/src/MDD.cpp b/asdcplib/src/MDD.cpp index e70d662f..92fd795a 100644 --- a/asdcplib/src/MDD.cpp +++ b/asdcplib/src/MDD.cpp @@ -37,151 +37,151 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. static const ASDCP::MDDEntry s_MDD_Table[] = { { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "MICAlgorithm_NONE" }, + {0, 0}, false, "MICAlgorithm_NONE" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 1 0x0d, 0x01, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 }, - {0}, false, "MXFInterop_OPAtom" }, + {0, 0}, false, "MXFInterop_OPAtom" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02, // 2 0x0d, 0x01, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 }, - {0}, false, "OPAtom" }, + {0, 0}, false, "OPAtom" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 3 0x0d, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00 }, - {0}, false, "OP1a" }, + {0, 0}, false, "OP1a" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x03, // 4 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7f, 0x01, 0x00 }, - {0}, false, "GCMulti" }, + {0, 0}, false, "GCMulti" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 5 0x01, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "PictureDataDef" }, + {0, 0}, false, "PictureDataDef" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 6 0x01, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "SoundDataDef" }, + {0, 0}, false, "SoundDataDef" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 7 0x01, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "TimecodeDataDef" }, + {0, 0}, false, "TimecodeDataDef" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 8 0x01, 0x03, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 }, - {0}, false, "DescriptiveMetaDataDef" }, + {0, 0}, false, "DescriptiveMetaDataDef" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 9 0x0d, 0x01, 0x03, 0x01, 0x02, 0x06, 0x01, 0x00 }, - {0}, false, "WAVWrappingFrame" }, + {0, 0}, false, "WAVWrappingFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02, // 10 0x0d, 0x01, 0x03, 0x01, 0x02, 0x04, 0x60, 0x00 }, - {0}, false, "MPEG2_VESWrappingFrame" }, + {0, 0}, false, "MPEG2_VESWrappingFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07, // 11 0x0d, 0x01, 0x03, 0x01, 0x02, 0x0c, 0x01, 0x00 }, - {0}, false, "JPEG_2000WrappingFrame" }, + {0, 0}, false, "JPEG_2000WrappingFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 12 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x08, 0x00 }, - {0}, false, "JPEG2000Essence" }, + {0, 0}, false, "JPEG2000Essence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 13 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x05, 0x00 }, - {0}, false, "MPEG2Essence" }, + {0, 0}, false, "MPEG2Essence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x07, // 14 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, - {0}, false, "MXFInterop_CryptEssence" }, + {0, 0}, false, "MXFInterop_CryptEssence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x01, // 15 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, - {0}, false, "CryptEssence" }, + {0, 0}, false, "CryptEssence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 16 0x0d, 0x01, 0x03, 0x01, 0x16, 0x01, 0x01, 0x00 }, - {0}, false, "WAVEssence" }, + {0, 0}, false, "WAVEssence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x09, // 17 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x03 }, - {0}, false, "JP2KEssenceCompression_2K" }, + {0, 0}, false, "JP2KEssenceCompression_2K" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x09, // 18 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x04 }, - {0}, false, "JP2KEssenceCompression_4K" }, + {0, 0}, false, "JP2KEssenceCompression_4K" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07, // 19 0x02, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "CipherAlgorithm_AES" }, + {0, 0}, false, "CipherAlgorithm_AES" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07, // 20 0x02, 0x09, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "MICAlgorithm_HMAC_SHA1" }, + {0, 0}, false, "MICAlgorithm_HMAC_SHA1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 21 0x03, 0x01, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "KLVFill" }, + {0, 0}, false, "KLVFill" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 22 0x03, 0x01, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_MajorVersion" }, + {0, 0}, false, "PartitionMetadata_MajorVersion" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 23 0x03, 0x01, 0x02, 0x01, 0x07, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_MinorVersion" }, + {0, 0}, false, "PartitionMetadata_MinorVersion" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 24 0x03, 0x01, 0x02, 0x01, 0x09, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_KAGSize" }, + {0, 0}, false, "PartitionMetadata_KAGSize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 25 0x06, 0x10, 0x10, 0x03, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_ThisPartition" }, + {0, 0}, false, "PartitionMetadata_ThisPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 26 0x06, 0x10, 0x10, 0x02, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_PreviousPartition" }, + {0, 0}, false, "PartitionMetadata_PreviousPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 27 0x06, 0x10, 0x10, 0x05, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_FooterPartition" }, + {0, 0}, false, "PartitionMetadata_FooterPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 28 0x04, 0x06, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_HeaderByteCount" }, + {0, 0}, false, "PartitionMetadata_HeaderByteCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 29 0x04, 0x06, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_IndexByteCount" }, + {0, 0}, false, "PartitionMetadata_IndexByteCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 30 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_IndexSID" }, + {0, 0}, false, "PartitionMetadata_IndexSID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 31 0x06, 0x08, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_BodyOffset" }, + {0, 0}, false, "PartitionMetadata_BodyOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 32 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_BodySID" }, + {0, 0}, false, "PartitionMetadata_BodySID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 33 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_OperationalPattern" }, + {0, 0}, false, "PartitionMetadata_OperationalPattern" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 34 0x01, 0x02, 0x02, 0x10, 0x02, 0x01, 0x00, 0x00 }, - {0}, false, "PartitionMetadata_EssenceContainers" }, + {0, 0}, false, "PartitionMetadata_EssenceContainers" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 35 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x01, 0x00 }, - {0}, false, "OpenHeader" }, + {0, 0}, false, "OpenHeader" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 36 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x03, 0x00 }, - {0}, false, "OpenCompleteHeader" }, + {0, 0}, false, "OpenCompleteHeader" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 37 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00 }, - {0}, false, "ClosedHeader" }, + {0, 0}, false, "ClosedHeader" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 38 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04, 0x00 }, - {0}, false, "ClosedCompleteHeader" }, + {0, 0}, false, "ClosedCompleteHeader" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 39 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x01, 0x00 }, - {0}, false, "OpenBodyPartition" }, + {0, 0}, false, "OpenBodyPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 40 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x03, 0x00 }, - {0}, false, "OpenCompleteBodyPartition" }, + {0, 0}, false, "OpenCompleteBodyPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 41 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x02, 0x00 }, - {0}, false, "ClosedBodyPartition" }, + {0, 0}, false, "ClosedBodyPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 42 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x04, 0x00 }, - {0}, false, "ClosedCompleteBodyPartition" }, + {0, 0}, false, "ClosedCompleteBodyPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 43 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x02, 0x00 }, - {0}, false, "Footer" }, + {0, 0}, false, "Footer" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 44 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x04, 0x00 }, - {0}, false, "CompleteFooter" }, + {0, 0}, false, "CompleteFooter" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 45 0x0d, 0x01, 0x02, 0x01, 0x01, 0x05, 0x01, 0x00 }, - {0}, false, "Primer" }, + {0, 0}, false, "Primer" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 46 0x06, 0x01, 0x01, 0x07, 0x15, 0x00, 0x00, 0x00 }, - {0}, false, "Primer_LocalTagEntryBatch" }, + {0, 0}, false, "Primer_LocalTagEntryBatch" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 47 0x01, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "LocalTagEntryBatch_Primer_LocalTag" }, + {0, 0}, false, "LocalTagEntryBatch_Primer_LocalTag" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 48 0x01, 0x03, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "LocalTagEntryBatch_Primer_UID" }, + {0, 0}, false, "LocalTagEntryBatch_Primer_UID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01, // 49 0x01, 0x01, 0x15, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3c, 0x0a}, false, "InterchangeObject_InstanceUID" }, @@ -190,7 +190,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x01, 0x02}, true, "GenerationInterchangeObject_GenerationUID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 51 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DefaultObject" }, + {0, 0}, false, "DefaultObject" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 52 0x05, 0x30, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x0b}, false, "IndexTableSegmentBase_IndexEditRate" }, @@ -217,58 +217,58 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3f, 0x0e}, true, "IndexTableSegmentBase_PosTableCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 60 0x0d, 0x01, 0x02, 0x01, 0x01, 0x10, 0x01, 0x00 }, - {0}, false, "IndexTableSegment" }, + {0, 0}, false, "IndexTableSegment" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 61 0x04, 0x04, 0x04, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x3f, 0x09}, true, "IndexTableSegment_DeltaEntryArray" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 62 0x04, 0x04, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "DeltaEntryArray_IndexTableSegment_PosTableIndex" }, + {0, 0}, false, "DeltaEntryArray_IndexTableSegment_PosTableIndex" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 63 0x04, 0x04, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "DeltaEntryArray_IndexTableSegment_Slice" }, + {0, 0}, false, "DeltaEntryArray_IndexTableSegment_Slice" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 64 0x04, 0x04, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "DeltaEntryArray_IndexTableSegment_ElementDelta" }, + {0, 0}, false, "DeltaEntryArray_IndexTableSegment_ElementDelta" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 65 0x04, 0x04, 0x04, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x3f, 0x0a}, false, "IndexTableSegment_IndexEntryArray" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 66 0x04, 0x04, 0x04, 0x02, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_TemporalOffset" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_TemporalOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 67 0x04, 0x04, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_AnchorOffset" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_AnchorOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 68 0x04, 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_Flags" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_Flags" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 69 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_StreamOffset" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_StreamOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 70 0x04, 0x04, 0x04, 0x01, 0x05, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_SliceOffsetArray" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_SliceOffsetArray" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 71 0x04, 0x04, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00 }, - {0}, false, "IndexEntryArray_IndexTableSegment_PosTableArray" }, + {0, 0}, false, "IndexEntryArray_IndexTableSegment_PosTableArray" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 72 0x0d, 0x01, 0x02, 0x01, 0x01, 0x11, 0x01, 0x00 }, - {0}, false, "RandomIndexMetadata" }, + {0, 0}, false, "RandomIndexMetadata" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 73 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionArray_RandomIndexMetadata_BodySID" }, + {0, 0}, false, "PartitionArray_RandomIndexMetadata_BodySID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 74 0x06, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "PartitionArray_RandomIndexMetadata_ByteOffset" }, + {0, 0}, false, "PartitionArray_RandomIndexMetadata_ByteOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 75 0x04, 0x06, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "RandomIndexMetadata_Length" }, + {0, 0}, false, "RandomIndexMetadata_Length" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 76 0x0d, 0x01, 0x02, 0x01, 0x01, 0x11, 0x00, 0x00 }, - {0}, false, "RandomIndexMetadataV10" }, + {0, 0}, false, "RandomIndexMetadataV10" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 77 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x2f, 0x00 }, - {0}, false, "Preface" }, + {0, 0}, false, "Preface" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 78 0x07, 0x02, 0x01, 0x10, 0x02, 0x04, 0x00, 0x00 }, {0x3b, 0x02}, false, "Preface_LastModifiedDate" }, @@ -298,7 +298,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3b, 0x0b}, false, "Preface_DMSchemes" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 87 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x30, 0x00 }, - {0}, false, "Identification" }, + {0, 0}, false, "Identification" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 88 0x05, 0x20, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3c, 0x09}, false, "Identification_ThisGenerationUID" }, @@ -328,7 +328,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3c, 0x08}, true, "Identification_Platform" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 97 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x00 }, - {0}, false, "ContentStorage" }, + {0, 0}, false, "ContentStorage" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 98 0x06, 0x01, 0x01, 0x04, 0x05, 0x01, 0x00, 0x00 }, {0x19, 0x01}, false, "ContentStorage_Packages" }, @@ -340,7 +340,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x19, 0x01}, false, "ContentStorageKludge_V10Packages" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 101 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x23, 0x00 }, - {0}, false, "EssenceContainerData" }, + {0, 0}, false, "EssenceContainerData" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 102 0x06, 0x01, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00 }, {0x27, 0x01}, false, "EssenceContainerData_LinkedPackageUID" }, @@ -367,13 +367,13 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x44, 0x03}, false, "GenericPackage_Tracks" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 110 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x32, 0x00 }, - {0}, false, "NetworkLocator" }, + {0, 0}, false, "NetworkLocator" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01, // 111 0x01, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x40, 0x01}, false, "NetworkLocator_URLString" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 112 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x33, 0x00 }, - {0}, false, "TextLocator" }, + {0, 0}, false, "TextLocator" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 113 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x41, 0x01}, false, "TextLocator_LocatorName" }, @@ -391,10 +391,10 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x48, 0x03}, false, "GenericTrack_Sequence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 118 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3a, 0x00 }, - {0}, false, "StaticTrack" }, + {0, 0}, false, "StaticTrack" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 119 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3b, 0x00 }, - {0}, false, "Track" }, + {0, 0}, false, "Track" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 120 0x05, 0x30, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x4b, 0x01}, false, "Track_EditRate" }, @@ -403,7 +403,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x4b, 0x02}, false, "Track_Origin" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 122 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x39, 0x00 }, - {0}, false, "EventTrack" }, + {0, 0}, false, "EventTrack" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 123 0x05, 0x30, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x49, 0x01}, false, "EventTrack_EventEditRate" }, @@ -418,13 +418,13 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x02, 0x02}, false, "StructuralComponent_Duration" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 127 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x00 }, - {0}, false, "Sequence" }, + {0, 0}, false, "Sequence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 128 0x06, 0x01, 0x01, 0x04, 0x06, 0x09, 0x00, 0x00 }, {0x10, 0x01}, false, "Sequence_StructuralComponents" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 129 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x14, 0x00 }, - {0}, false, "TimecodeComponent" }, + {0, 0}, false, "TimecodeComponent" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 130 0x04, 0x04, 0x01, 0x01, 0x02, 0x06, 0x00, 0x00 }, {0x15, 0x02}, false, "TimecodeComponent_RoundedTimecodeBase" }, @@ -436,7 +436,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x15, 0x03}, false, "TimecodeComponent_DropFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 133 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x11, 0x00 }, - {0}, false, "SourceClip" }, + {0, 0}, false, "SourceClip" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 134 0x07, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x00 }, {0x12, 0x01}, false, "SourceClip_StartPosition" }, @@ -448,7 +448,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x11, 0x02}, false, "SourceClip_SourceTrackID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 137 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x41, 0x00 }, - {0}, false, "DMSegment" }, + {0, 0}, false, "DMSegment" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 138 0x07, 0x02, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00 }, {0x06, 0x01}, false, "DMSegment_EventStartPosition" }, @@ -463,16 +463,16 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x61, 0x01}, false, "DMSegment_DMFramework" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 142 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x45, 0x00 }, - {0}, false, "DMSourceClip" }, + {0, 0}, false, "DMSourceClip" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 143 0x01, 0x07, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x61, 0x03}, true, "DMSourceClip_DMSourceClipTrackIDs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 144 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x36, 0x00 }, - {0}, false, "MaterialPackage" }, + {0, 0}, false, "MaterialPackage" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 145 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x37, 0x00 }, - {0}, false, "SourcePackage" }, + {0, 0}, false, "SourcePackage" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 146 0x06, 0x01, 0x01, 0x04, 0x02, 0x03, 0x00, 0x00 }, {0x47, 0x01}, false, "SourcePackage_Descriptor" }, @@ -481,10 +481,10 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x2f, 0x01}, true, "GenericDescriptor_Locators" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 148 0x06, 0x01, 0x01, 0x04, 0x06, 0x10, 0x00, 0x00 }, - {0}, true, "GenericDescriptor_SubDescriptors" }, + {0, 0}, true, "GenericDescriptor_SubDescriptors" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 149 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x25, 0x00 }, - {0}, false, "FileDescriptor" }, + {0, 0}, false, "FileDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 150 0x06, 0x01, 0x01, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x30, 0x06}, true, "FileDescriptor_LinkedTrackID" }, @@ -502,7 +502,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x30, 0x05}, true, "FileDescriptor_Codec" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 155 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x00 }, - {0}, false, "GenericPictureEssenceDescriptor" }, + {0, 0}, false, "GenericPictureEssenceDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 156 0x04, 0x05, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x15}, true, "GenericPictureEssenceDescriptor_SignalStandard" }, @@ -577,7 +577,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x32, 0x01}, false, "GenericPictureEssenceDescriptor_PictureEssenceCoding" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 180 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x00 }, - {0}, false, "CDCIEssenceDescriptor" }, + {0, 0}, false, "CDCIEssenceDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 181 0x04, 0x01, 0x05, 0x03, 0x0a, 0x00, 0x00, 0x00 }, {0x33, 0x01}, false, "CDCIEssenceDescriptor_ComponentDepth" }, @@ -610,7 +610,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x33, 0x06}, true, "CDCIEssenceDescriptor_ColorRange" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 191 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x29, 0x00 }, - {0}, false, "RGBAEssenceDescriptor" }, + {0, 0}, false, "RGBAEssenceDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 192 0x04, 0x01, 0x05, 0x03, 0x0b, 0x00, 0x00, 0x00 }, {0x34, 0x06}, true, "RGBAEssenceDescriptor_ComponentMaxRef" }, @@ -637,7 +637,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x34, 0x04}, true, "RGBAEssenceDescriptor_PaletteLayout" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 200 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x42, 0x00 }, - {0}, false, "GenericSoundEssenceDescriptor" }, + {0, 0}, false, "GenericSoundEssenceDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 201 0x04, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00 }, {0x3d, 0x03}, false, "GenericSoundEssenceDescriptor_AudioSamplingRate" }, @@ -664,52 +664,52 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3d, 0x06}, false, "GenericSoundEssenceDescriptor_SoundEssenceCoding" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 209 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x43, 0x00 }, - {0}, false, "GenericDataEssenceDescriptor" }, + {0, 0}, false, "GenericDataEssenceDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 210 0x04, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3e, 0x01}, false, "GenericDataEssenceDescriptor_DataEssenceCoding" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 211 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 0x00 }, - {0}, false, "MultipleDescriptor" }, + {0, 0}, false, "MultipleDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 212 0x06, 0x01, 0x01, 0x04, 0x06, 0x0b, 0x00, 0x00 }, {0x3f, 0x01}, false, "MultipleDescriptor_SubDescriptorUIDs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 213 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x51, 0x00 }, - {0}, false, "MPEG2VideoDescriptor" }, + {0, 0}, false, "MPEG2VideoDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 214 0x04, 0x01, 0x06, 0x02, 0x01, 0x02, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_SingleSequence" }, + {0, 0}, true, "MPEG2VideoDescriptor_SingleSequence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 215 0x04, 0x01, 0x06, 0x02, 0x01, 0x03, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_ConstantBFrames" }, + {0, 0}, true, "MPEG2VideoDescriptor_ConstantBFrames" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 216 0x04, 0x01, 0x06, 0x02, 0x01, 0x04, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_CodedContentType" }, + {0, 0}, true, "MPEG2VideoDescriptor_CodedContentType" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 217 0x04, 0x01, 0x06, 0x02, 0x01, 0x05, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_LowDelay" }, + {0, 0}, true, "MPEG2VideoDescriptor_LowDelay" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 218 0x04, 0x01, 0x06, 0x02, 0x01, 0x06, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_ClosedGOP" }, + {0, 0}, true, "MPEG2VideoDescriptor_ClosedGOP" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 219 0x04, 0x01, 0x06, 0x02, 0x01, 0x07, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_IdenticalGOP" }, + {0, 0}, true, "MPEG2VideoDescriptor_IdenticalGOP" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 220 0x04, 0x01, 0x06, 0x02, 0x01, 0x08, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_MaxGOP" }, + {0, 0}, true, "MPEG2VideoDescriptor_MaxGOP" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 221 0x04, 0x01, 0x06, 0x02, 0x01, 0x09, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_BPictureCount" }, + {0, 0}, true, "MPEG2VideoDescriptor_BPictureCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 222 0x04, 0x01, 0x06, 0x02, 0x01, 0x0b, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_BitRate" }, + {0, 0}, true, "MPEG2VideoDescriptor_BitRate" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 223 0x04, 0x01, 0x06, 0x02, 0x01, 0x0a, 0x00, 0x00 }, - {0}, true, "MPEG2VideoDescriptor_ProfileAndLevel" }, + {0, 0}, true, "MPEG2VideoDescriptor_ProfileAndLevel" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 224 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x48, 0x00 }, - {0}, false, "WaveAudioDescriptor" }, + {0, 0}, false, "WaveAudioDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 225 0x04, 0x02, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x3d, 0x0a}, false, "WaveAudioDescriptor_BlockAlign" }, @@ -724,115 +724,115 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3d, 0x0e}, true, "WaveAudioDescriptor_PeakEnvelope" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 229 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x5a, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 230 0x04, 0x01, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_Rsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_Rsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 231 0x04, 0x01, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_Xsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_Xsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 232 0x04, 0x01, 0x06, 0x03, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_Ysize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_Ysize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 233 0x04, 0x01, 0x06, 0x03, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_XOsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_XOsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 234 0x04, 0x01, 0x06, 0x03, 0x05, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_YOsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_YOsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 235 0x04, 0x01, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_XTsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_XTsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 236 0x04, 0x01, 0x06, 0x03, 0x07, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_YTsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_YTsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 237 0x04, 0x01, 0x06, 0x03, 0x08, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_XTOsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_XTOsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 238 0x04, 0x01, 0x06, 0x03, 0x09, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_YTOsize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_YTOsize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 239 0x04, 0x01, 0x06, 0x03, 0x0a, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_Csize" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_Csize" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 240 0x04, 0x01, 0x06, 0x03, 0x0b, 0x00, 0x00, 0x00 }, - {0}, false, "JPEG2000PictureSubDescriptor_PictureComponentSizing" }, + {0, 0}, false, "JPEG2000PictureSubDescriptor_PictureComponentSizing" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 241 0x04, 0x01, 0x06, 0x03, 0x0c, 0x00, 0x00, 0x00 }, - {0}, true, "JPEG2000PictureSubDescriptor_CodingStyleDefault" }, + {0, 0}, true, "JPEG2000PictureSubDescriptor_CodingStyleDefault" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a, // 242 0x04, 0x01, 0x06, 0x03, 0x0d, 0x00, 0x00, 0x00 }, - {0}, true, "JPEG2000PictureSubDescriptor_QuantizationDefault" }, + {0, 0}, true, "JPEG2000PictureSubDescriptor_QuantizationDefault" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 243 0x0d, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DM_Framework" }, + {0, 0}, false, "DM_Framework" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 244 0x0d, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DM_Set" }, + {0, 0}, false, "DM_Set" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07, // 245 0x0d, 0x01, 0x03, 0x01, 0x02, 0x0b, 0x01, 0x00 }, - {0}, false, "EncryptedContainerLabel" }, + {0, 0}, false, "EncryptedContainerLabel" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07, // 246 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x01, 0x00 }, - {0}, false, "CryptographicFrameworkLabel" }, + {0, 0}, false, "CryptographicFrameworkLabel" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 247 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00 }, - {0}, false, "CryptographicFramework" }, + {0, 0}, false, "CryptographicFramework" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 248 0x06, 0x01, 0x01, 0x04, 0x02, 0x0d, 0x00, 0x00 }, - {0}, false, "CryptographicFramework_ContextSR" }, + {0, 0}, false, "CryptographicFramework_ContextSR" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 249 0x0d, 0x01, 0x04, 0x01, 0x02, 0x02, 0x00, 0x00 }, - {0}, false, "CryptographicContext" }, + {0, 0}, false, "CryptographicContext" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 250 0x01, 0x01, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "CryptographicContext_ContextID" }, + {0, 0}, false, "CryptographicContext_ContextID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 251 0x06, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "CryptographicContext_SourceEssenceContainer" }, + {0, 0}, false, "CryptographicContext_SourceEssenceContainer" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 252 0x02, 0x09, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "CryptographicContext_CipherAlgorithm" }, + {0, 0}, false, "CryptographicContext_CipherAlgorithm" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 253 0x02, 0x09, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "CryptographicContext_MICAlgorithm" }, + {0, 0}, false, "CryptographicContext_MICAlgorithm" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 254 0x02, 0x09, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "CryptographicContext_CryptographicKeyID" }, + {0, 0}, false, "CryptographicContext_CryptographicKeyID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a, // 255 0x0d, 0x01, 0x03, 0x01, 0x02, 0x13, 0x01, 0x01 }, - {0}, false, "TimedTextWrappingClip" }, + {0, 0}, false, "TimedTextWrappingClip" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 256 0x0d, 0x01, 0x03, 0x01, 0x17, 0x01, 0x0b, 0x01 }, - {0}, false, "TimedTextEssence" }, + {0, 0}, false, "TimedTextEssence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 257 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x64, 0x00 }, - {0}, false, "TimedTextDescriptor" }, + {0, 0}, false, "TimedTextDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0c, // 258 0x01, 0x01, 0x15, 0x12, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextDescriptor_ResourceID" }, + {0, 0}, false, "TimedTextDescriptor_ResourceID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0c, // 259 0x04, 0x09, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextDescriptor_UCSEncoding" }, + {0, 0}, false, "TimedTextDescriptor_UCSEncoding" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x08, // 260 0x01, 0x02, 0x01, 0x05, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextDescriptor_NamespaceURI" }, + {0, 0}, false, "TimedTextDescriptor_NamespaceURI" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 261 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x65, 0x00 }, - {0}, false, "TimedTextResourceSubDescriptor" }, + {0, 0}, false, "TimedTextResourceSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0c, // 262 0x01, 0x01, 0x15, 0x13, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextResourceSubDescriptor_AncillaryResourceID" }, + {0, 0}, false, "TimedTextResourceSubDescriptor_AncillaryResourceID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x07, // 263 0x04, 0x09, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextResourceSubDescriptor_MIMEMediaType" }, + {0, 0}, false, "TimedTextResourceSubDescriptor_MIMEMediaType" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 264 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "TimedTextResourceSubDescriptor_EssenceStreamID" }, + {0, 0}, false, "TimedTextResourceSubDescriptor_EssenceStreamID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, // 265 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x11, 0x00 }, - {0}, false, "GenericStreamPartition" }, + {0, 0}, false, "GenericStreamPartition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 266 0x04, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0x02, 0x01}, false, "DMSegment_DataDefinition" }, @@ -844,7 +844,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x61, 0x02}, false, "DMSegment_TrackIDList" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 269 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x63, 0x00 }, - {0}, false, "StereoscopicPictureSubDescriptor" }, + {0, 0}, false, "StereoscopicPictureSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x07, // 270 0x04, 0x02, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x3d, 0x32}, true, "WaveAudioDescriptor_ChannelAssignment" }, @@ -853,7 +853,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x00, 0x00}, false, "GenericStream_DataElement" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 272 0x06, 0x01, 0x01, 0x04, 0x06, 0x10, 0x00, 0x00 }, - {0}, true, "MXFInterop_GenericDescriptor_SubDescriptors" }, + {0, 0}, true, "MXFInterop_GenericDescriptor_SubDescriptors" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04, // 273 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x07}, false, "BodySID" }, @@ -868,262 +868,262 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x3b, 0x0a}, false, "EssenceContainers" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0b, // 277 0x04, 0x02, 0x02, 0x10, 0x03, 0x01, 0x01, 0x00 }, - {0}, false, "DCAudioChannelCfg_1_5p1" }, + {0, 0}, false, "DCAudioChannelCfg_1_5p1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0b, // 278 0x04, 0x02, 0x02, 0x10, 0x03, 0x01, 0x02, 0x00 }, - {0}, false, "DCAudioChannelCfg_2_6p1" }, + {0, 0}, false, "DCAudioChannelCfg_2_6p1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0b, // 279 0x04, 0x02, 0x02, 0x10, 0x03, 0x01, 0x03, 0x00 }, - {0}, false, "DCAudioChannelCfg_3_7p1" }, + {0, 0}, false, "DCAudioChannelCfg_3_7p1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0b, // 280 0x04, 0x02, 0x02, 0x10, 0x03, 0x01, 0x04, 0x00 }, - {0}, false, "DCAudioChannelCfg_4_WTF" }, + {0, 0}, false, "DCAudioChannelCfg_4_WTF" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0b, // 281 0x04, 0x02, 0x02, 0x10, 0x03, 0x01, 0x05, 0x00 }, - {0}, false, "DCAudioChannelCfg_5_7p1_DS" }, + {0, 0}, false, "DCAudioChannelCfg_5_7p1_DS" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 282 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x6a, 0x00 }, - {0}, false, "MCALabelSubDescriptor" }, + {0, 0}, false, "MCALabelSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 283 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x6b, 0x00 }, - {0}, false, "AudioChannelLabelSubDescriptor" }, + {0, 0}, false, "AudioChannelLabelSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 284 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x6c, 0x00 }, - {0}, false, "SoundfieldGroupLabelSubDescriptor" }, + {0, 0}, false, "SoundfieldGroupLabelSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01, // 285 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x6d, 0x00 }, - {0}, false, "GroupOfSoundfieldGroupsLabelSubDescriptor" }, + {0, 0}, false, "GroupOfSoundfieldGroupsLabelSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 286 0x01, 0x03, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_MCALabelDictionaryID" }, + {0, 0}, false, "MCALabelSubDescriptor_MCALabelDictionaryID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 287 0x01, 0x03, 0x07, 0x01, 0x05, 0x00, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_MCALinkID" }, + {0, 0}, false, "MCALabelSubDescriptor_MCALinkID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 288 0x01, 0x03, 0x07, 0x01, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_MCATagSymbol" }, + {0, 0}, false, "MCALabelSubDescriptor_MCATagSymbol" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 289 0x01, 0x03, 0x07, 0x01, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_MCATagName" }, + {0, 0}, false, "MCALabelSubDescriptor_MCATagName" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 290 0x01, 0x03, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_MCAChannelID" }, + {0, 0}, false, "MCALabelSubDescriptor_MCAChannelID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0d, // 291 0x03, 0x01, 0x01, 0x02, 0x03, 0x15, 0x00, 0x00 }, - {0}, false, "MCALabelSubDescriptor_RFC5646SpokenLanguage" }, + {0, 0}, false, "MCALabelSubDescriptor_RFC5646SpokenLanguage" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 292 0x01, 0x03, 0x07, 0x01, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "AudioChannelLabelSubDescriptor_SoundfieldGroupLinkID" }, + {0, 0}, false, "AudioChannelLabelSubDescriptor_SoundfieldGroupLinkID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 293 0x01, 0x03, 0x07, 0x01, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "SoundfieldGroupLabelSubDescriptor_GroupOfSoundfieldGroupsLinkID" }, + {0, 0}, false, "SoundfieldGroupLabelSubDescriptor_GroupOfSoundfieldGroupsLinkID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x05, // 294 0x0e, 0x09, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCDataWrappingFrame" }, + {0, 0}, false, "DCDataWrappingFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x05, // 295 0x0e, 0x09, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCDataEssence" }, + {0, 0}, false, "DCDataEssence" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x05, // 296 0x0e, 0x09, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCDataDescriptor" }, + {0, 0}, false, "DCDataDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x05, // 297 0x0e, 0x09, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DolbyAtmosSubDescriptor" }, + {0, 0}, false, "DolbyAtmosSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 298 0x0e, 0x09, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00 }, - {0}, true, "DolbyAtmosSubDescriptor_AtmosVersion" }, + {0, 0}, true, "DolbyAtmosSubDescriptor_AtmosVersion" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 299 0x0e, 0x09, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00 }, - {0}, true, "DolbyAtmosSubDescriptor_MaxChannelCount" }, + {0, 0}, true, "DolbyAtmosSubDescriptor_MaxChannelCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 300 0x0e, 0x09, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00 }, - {0}, true, "DolbyAtmosSubDescriptor_MaxObjectCount" }, + {0, 0}, true, "DolbyAtmosSubDescriptor_MaxObjectCount" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 301 0x0e, 0x09, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00 }, - {0}, true, "DolbyAtmosSubDescriptor_AtmosID" }, + {0, 0}, true, "DolbyAtmosSubDescriptor_AtmosID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 302 0x0e, 0x09, 0x05, 0x0A, 0x00, 0x00, 0x00, 0x00 }, - {0}, true, "DolbyAtmosSubDescriptor_FirstFrame" }, + {0, 0}, true, "DolbyAtmosSubDescriptor_FirstFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 303 0x01, 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "DataDataDef" }, + {0, 0}, false, "DataDataDef" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 304 0x04, 0x02, 0x02, 0x10, 0x03, 0x02, 0x00, 0x00 }, - {0}, false, "DCAudioChannelCfg_MCA" }, + {0, 0}, false, "DCAudioChannelCfg_MCA" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 305 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_L" }, + {0, 0}, false, "DCAudioChannel_L" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 306 0x03, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_R" }, + {0, 0}, false, "DCAudioChannel_R" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 307 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_C" }, + {0, 0}, false, "DCAudioChannel_C" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 308 0x03, 0x02, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_LFE" }, + {0, 0}, false, "DCAudioChannel_LFE" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 309 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Ls" }, + {0, 0}, false, "DCAudioChannel_Ls" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 310 0x03, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Rs" }, + {0, 0}, false, "DCAudioChannel_Rs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 311 0x03, 0x02, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Lss" }, + {0, 0}, false, "DCAudioChannel_Lss" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 312 0x03, 0x02, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Rss" }, + {0, 0}, false, "DCAudioChannel_Rss" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 313 0x03, 0x02, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Lrs" }, + {0, 0}, false, "DCAudioChannel_Lrs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 314 0x03, 0x02, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Rrs" }, + {0, 0}, false, "DCAudioChannel_Rrs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 315 0x03, 0x02, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Lc" }, + {0, 0}, false, "DCAudioChannel_Lc" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 316 0x03, 0x02, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Rc" }, + {0, 0}, false, "DCAudioChannel_Rc" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 317 0x03, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_Cs" }, + {0, 0}, false, "DCAudioChannel_Cs" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 318 0x03, 0x02, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_HI" }, + {0, 0}, false, "DCAudioChannel_HI" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 319 0x03, 0x02, 0x01, 0x0f, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioChannel_VIN" }, + {0, 0}, false, "DCAudioChannel_VIN" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 320 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioSoundfield_51" }, + {0, 0}, false, "DCAudioSoundfield_51" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 321 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioSoundfield_71" }, + {0, 0}, false, "DCAudioSoundfield_71" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 322 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioSoundfield_SDS" }, + {0, 0}, false, "DCAudioSoundfield_SDS" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 323 0x03, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioSoundfield_61" }, + {0, 0}, false, "DCAudioSoundfield_61" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 324 0x03, 0x02, 0x02, 0x05, 0x00, 0x00, 0x00, 0x00 }, - {0}, false, "DCAudioSoundfield_M" }, + {0, 0}, false, "DCAudioSoundfield_M" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 325 0x0d, 0x01, 0x03, 0x01, 0x16, 0x01, 0x02, 0x00 }, - {0}, false, "WAVEssenceClip" }, + {0, 0}, false, "WAVEssenceClip" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 326 0x04, 0x02, 0x02, 0x10, 0x04, 0x01, 0x00, 0x00 }, - {0}, false, "IMFAudioChannelCfg_MCA" }, + {0, 0}, false, "IMFAudioChannelCfg_MCA" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 327 0x03, 0x02, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_M1" }, + {0, 0}, false, "IMFAudioChannel_M1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 328 0x03, 0x02, 0x01, 0x20, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_M2" }, + {0, 0}, false, "IMFAudioChannel_M2" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 329 0x03, 0x02, 0x01, 0x20, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_Lt" }, + {0, 0}, false, "IMFAudioChannel_Lt" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 330 0x03, 0x02, 0x01, 0x20, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_Rt" }, + {0, 0}, false, "IMFAudioChannel_Rt" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 331 0x03, 0x02, 0x01, 0x20, 0x05, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_Lst" }, + {0, 0}, false, "IMFAudioChannel_Lst" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 332 0x03, 0x02, 0x01, 0x20, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_Rst" }, + {0, 0}, false, "IMFAudioChannel_Rst" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 333 0x03, 0x02, 0x01, 0x20, 0x07, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioChannel_S" }, + {0, 0}, false, "IMFAudioChannel_S" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 334 0x03, 0x02, 0x01, 0x20, 0x08, 0x00, 0x00, 0x00 }, - {0}, false, "IMFNumberedSourceChannel" }, + {0, 0}, false, "IMFNumberedSourceChannel" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 335 0x03, 0x02, 0x02, 0x20, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_ST" }, + {0, 0}, false, "IMFAudioSoundfield_ST" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 336 0x03, 0x02, 0x02, 0x20, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_DM" }, + {0, 0}, false, "IMFAudioSoundfield_DM" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 337 0x03, 0x02, 0x02, 0x20, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_DNS" }, + {0, 0}, false, "IMFAudioSoundfield_DNS" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 338 0x03, 0x02, 0x02, 0x20, 0x04, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_30" }, + {0, 0}, false, "IMFAudioSoundfield_30" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 339 0x03, 0x02, 0x02, 0x20, 0x05, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_40" }, + {0, 0}, false, "IMFAudioSoundfield_40" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 340 0x03, 0x02, 0x02, 0x20, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_50" }, + {0, 0}, false, "IMFAudioSoundfield_50" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 341 0x03, 0x02, 0x02, 0x20, 0x07, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_60" }, + {0, 0}, false, "IMFAudioSoundfield_60" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 342 0x03, 0x02, 0x02, 0x20, 0x08, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_70" }, + {0, 0}, false, "IMFAudioSoundfield_70" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 343 0x03, 0x02, 0x02, 0x20, 0x09, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_LtRt" }, + {0, 0}, false, "IMFAudioSoundfield_LtRt" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 344 0x03, 0x02, 0x02, 0x20, 0x0a, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_51Ex" }, + {0, 0}, false, "IMFAudioSoundfield_51Ex" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 345 0x03, 0x02, 0x02, 0x20, 0x0b, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_HI" }, + {0, 0}, false, "IMFAudioSoundfield_HI" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 346 0x03, 0x02, 0x02, 0x20, 0x0c, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioSoundfield_VIN" }, + {0, 0}, false, "IMFAudioSoundfield_VIN" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 347 0x03, 0x02, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioGroup_MPg" }, + {0, 0}, false, "IMFAudioGroup_MPg" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 348 0x03, 0x02, 0x03, 0x20, 0x02, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioGroup_DVS" }, + {0, 0}, false, "IMFAudioGroup_DVS" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 349 0x03, 0x02, 0x03, 0x20, 0x03, 0x00, 0x00, 0x00 }, - {0}, false, "IMFAudioGroup_Dcm" }, + {0, 0}, false, "IMFAudioGroup_Dcm" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0c, // 350 0x06, 0x01, 0x01, 0x04, 0x02, 0x0f, 0x00, 0x00 }, - {0}, false, "MaterialPackage_PackageMarker" }, + {0, 0}, false, "MaterialPackage_PackageMarker" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02, // 351 0x04, 0x01, 0x02, 0x01, 0x01, 0x03, 0x01, 0x00 }, - {0}, false, "GenericPictureEssenceDescriptor_CodingEquations" }, + {0, 0}, false, "GenericPictureEssenceDescriptor_CodingEquations" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 352 0x04, 0x01, 0x02, 0x01, 0x01, 0x06, 0x01, 0x00 }, - {0}, false, "GenericPictureEssenceDescriptor_ColorPrimaries" }, + {0, 0}, false, "GenericPictureEssenceDescriptor_ColorPrimaries" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 353 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x11 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_1" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_1" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 354 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x12 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_2" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_2" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 355 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x13 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_3" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_3" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 356 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x14 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_4" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_4" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 357 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x15 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_5" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_5" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 358 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x16 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_6" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_6" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 359 0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x17 }, - {0}, false, "JP2KEssenceCompression_BroadcastProfile_7" }, + {0, 0}, false, "JP2KEssenceCompression_BroadcastProfile_7" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 360 0x04, 0x02, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00 }, - {0}, false, "WaveAudioDescriptor_ReferenceImageEditRate" }, + {0, 0}, false, "WaveAudioDescriptor_ReferenceImageEditRate" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 361 0x04, 0x02, 0x01, 0x01, 0x07, 0x00, 0x00, 0x00 }, - {0}, false, "WaveAudioDescriptor_ReferenceAudioAlignmentLevel" }, + {0, 0}, false, "WaveAudioDescriptor_ReferenceAudioAlignmentLevel" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 362 0x04, 0x01, 0x03, 0x02, 0x0b, 0x00, 0x00, 0x00 }, - {0}, false, "GenericPictureEssenceDescriptor_AlternativeCenterCuts" }, + {0, 0}, false, "GenericPictureEssenceDescriptor_AlternativeCenterCuts" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 363 0x04, 0x01, 0x05, 0x01, 0x13, 0x00, 0x00, 0x00 }, {0x32, 0x05}, true, "GenericPictureEssenceDescriptor_ActiveHeight" }, @@ -1138,22 +1138,22 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { {0x32, 0x07}, true, "GenericPictureEssenceDescriptor_ActiveYOffset" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 367 0x03, 0x01, 0x01, 0x02, 0x02, 0x16, 0x00, 0x00 }, - {0}, false, "TimedTextDescriptor_RFC5646LanguageTagList" }, + {0, 0}, false, "TimedTextDescriptor_RFC5646LanguageTagList" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 368 0x04, 0x01, 0x01, 0x01, 0x00, 0x04, 0x01, 0x00 }, - {0}, false, "AlternativeCenterCuts_4x3" }, + {0, 0}, false, "AlternativeCenterCuts_4x3" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 369 0x04, 0x01, 0x01, 0x01, 0x00, 0x04, 0x02, 0x00 }, - {0}, false, "AlternativeCenterCuts_14x9" }, + {0, 0}, false, "AlternativeCenterCuts_14x9" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, // 370 - 0x0d, 0x01, 0x03, 0x01, 0x02, 0x06, 0x02, 0x00 }, - {0}, false, "WAVWrappingClip" }, + 0x0d, 0x01, 0x03, 0x01, 0x02, 0x06, 0x02, 0x00 }, + {0, 0}, false, "WAVWrappingClip" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 371 0x0e, 0x16, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01 }, - {0}, false, "DBOXMotionCodePrimaryStream" }, + {0, 0}, false, "DBOXMotionCodePrimaryStream" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 372 0x0e, 0x16, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02 }, - {0}, false, "DBOXMotionCodeSecondaryStream" }, + {0, 0}, false, "DBOXMotionCodeSecondaryStream" }, // 379-2, Sec. 7: Encoders that conform to this specification shall add a // ContainerConstraintSubDescriptor to the GenericDescriptor::SubDescriptors @@ -1161,33 +1161,33 @@ static const ASDCP::MDDEntry s_MDD_Table[] = { // container. { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x7f, 0x01, 0x01, // 373 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x67, 0x00 }, - {0}, false, "ContainerConstraintSubDescriptor" }, + {0, 0}, false, "ContainerConstraintSubDescriptor" }, // protype for high dynamic range, values recorded in Dolby registry { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x05, // 374 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x01 }, - {0}, false, "PHDRImageMetadataWrappingFrame" }, + {0, 0}, false, "PHDRImageMetadataWrappingFrame" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x05, // 375 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x00 }, - {0}, false, "PHDRImageMetadataItem" }, + {0, 0}, false, "PHDRImageMetadataItem" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x05, // 376 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x03 }, - {0}, false, "PHDRMetadataTrackSubDescriptor" }, + {0, 0}, false, "PHDRMetadataTrackSubDescriptor" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 377 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x04 }, - {0}, false, "PHDRMetadataTrackSubDescriptor_DataDefinition" }, + {0, 0}, false, "PHDRMetadataTrackSubDescriptor_DataDefinition" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 378 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x05 }, - {0}, false, "PHDRMetadataTrackSubDescriptor_SourceTrackID" }, + {0, 0}, false, "PHDRMetadataTrackSubDescriptor_SourceTrackID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05, // 379 0x0e, 0x09, 0x06, 0x07, 0x01, 0x01, 0x01, 0x06 }, - {0}, false, "PHDRMetadataTrackSubDescriptor_SimplePayloadSID" }, + {0, 0}, false, "PHDRMetadataTrackSubDescriptor_SimplePayloadSID" }, { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0e, // 380 0x04, 0x01, 0x06, 0x03, 0x0e, 0x00, 0x00, 0x00 }, - {0}, true, "JPEG2000PictureSubDescriptor_J2CLayout" }, + {0, 0}, true, "JPEG2000PictureSubDescriptor_J2CLayout" }, - { {0}, {0}, false, 0 } + { {0, 0}, {0, 0}, false, 0 } }; // diff --git a/asdcplib/src/MPEG2_Parser.cpp b/asdcplib/src/MPEG2_Parser.cpp index 89d23134..9f817ebd 100755 --- a/asdcplib/src/MPEG2_Parser.cpp +++ b/asdcplib/src/MPEG2_Parser.cpp @@ -94,8 +94,11 @@ class h__ParserState case ST_EXT: m_State = ST_SEQ; return RESULT_OK; + default: + /* Keep GCC quiet */ + break; } - + DefaultLogSink().Error("SEQ follows %s\n", StringParserState(m_State)); return RESULT_STATE; } @@ -110,8 +113,11 @@ class h__ParserState case ST_EXT: m_State = ST_SLICE; return RESULT_OK; + default: + /* Keep GCC quiet */ + break; } - + DefaultLogSink().Error("Slice follows %s\n", StringParserState(m_State)); return RESULT_STATE; } @@ -128,8 +134,11 @@ class h__ParserState case ST_EXT: m_State = ST_PIC; return RESULT_OK; + default: + /* Keep GCC quiet */ + break; } - + DefaultLogSink().Error("PIC follows %s\n", StringParserState(m_State)); return RESULT_STATE; } @@ -144,8 +153,11 @@ class h__ParserState case ST_SEQ: m_State = ST_GOP; return RESULT_OK; + default: + /* Keep GCC quiet */ + break; } - + DefaultLogSink().Error("GOP follows %s\n", StringParserState(m_State)); return RESULT_STATE; } @@ -161,6 +173,9 @@ class h__ParserState case ST_GOP: m_State = ST_EXT; return RESULT_OK; + default: + /* Keep GCC quiet */ + break; } DefaultLogSink().Error("EXT follows %s\n", StringParserState(m_State)); @@ -192,7 +207,7 @@ public: ~StreamParams() {} // - Result_t Sequence(VESParser*, const byte_t* b, ui32_t s) + Result_t Sequence(VESParser*, const byte_t* b, ui32_t) { Result_t result = m_State.Goto_SEQ(); @@ -211,7 +226,7 @@ public: } // - Result_t Extension(VESParser*, const byte_t* b, ui32_t s) + Result_t Extension(VESParser*, const byte_t* b, ui32_t) { Result_t result = m_State.Goto_EXT(); @@ -274,7 +289,7 @@ public: } ~FrameParser() {} - + void Reset() { m_FrameSize = 0; @@ -286,7 +301,7 @@ public: m_State.Reset(); } - Result_t Sequence(VESParser*, const byte_t* b, ui32_t s) + Result_t Sequence(VESParser*, const byte_t*, ui32_t s) { if ( m_State.Test_SLICE() ) { @@ -324,7 +339,7 @@ public: return m_State.Test_SLICE() ? RESULT_OK : RESULT_FAIL; } - Result_t Extension(VESParser*, const byte_t* b, ui32_t s) + Result_t Extension(VESParser*, const byte_t*, ui32_t s) { m_FrameSize += s; return m_State.Goto_EXT(); @@ -339,7 +354,7 @@ public: return m_State.Goto_GOP(); } - Result_t Data(VESParser*, const byte_t* b, i32_t s) + Result_t Data(VESParser*, const byte_t*, i32_t s) { m_FrameSize += s; return RESULT_OK; @@ -404,10 +419,10 @@ ASDCP::MPEG2::Parser::h__Parser::OpenRead(const std::string& filename) ui32_t read_count = 0; Result_t result = m_FileReader.OpenRead(filename); - + if ( ASDCP_SUCCESS(result) ) result = m_FileReader.Read(m_TmpBuffer.Data(), m_TmpBuffer.Capacity(), &read_count); - + if ( ASDCP_SUCCESS(result) ) { const byte_t* p = m_TmpBuffer.RoData(); diff --git a/asdcplib/src/MXF.cpp b/asdcplib/src/MXF.cpp index cc84797f..ab4c627b 100755 --- a/asdcplib/src/MXF.cpp +++ b/asdcplib/src/MXF.cpp @@ -205,7 +205,7 @@ ASDCP::MXF::Partition::PacketList::GetMDObjectByID(const UUID& ObjectID, Interch ASDCP_TEST_NULL(Object); std::map<UUID, InterchangeObject*>::iterator mi = m_Map.find(ObjectID); - + if ( mi == m_Map.end() ) { *Object = 0; @@ -292,7 +292,7 @@ ASDCP::MXF::Partition::InitFromFile(const Kumu::FileReader& Reader) // could be one of several values if ( ASDCP_SUCCESS(result) ) result = ASDCP::MXF::Partition::InitFromBuffer(m_ValueStart, m_ValueLength); - + return result; } @@ -533,7 +533,7 @@ ASDCP::MXF::Primer::InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag) { Tag = (*i).second; } - + return RESULT_OK; } @@ -571,7 +571,7 @@ ASDCP::MXF::Primer::Dump(FILE* stream) fprintf(stream, "Primer: %u %s\n", (ui32_t)LocalTagEntryBatch.size(), ( LocalTagEntryBatch.size() == 1 ? "entry" : "entries" )); - + Batch<LocalTagEntry>::iterator i = LocalTagEntryBatch.begin(); for ( ; i != LocalTagEntryBatch.end(); i++ ) { @@ -721,7 +721,7 @@ ASDCP::MXF::OP1aHeader::InitFromFile(const Kumu::FileReader& Reader) { DefaultLogSink().Warn("Improbably huge HeaderByteCount value: %qu\n", HeaderByteCount); } - + result = m_HeaderData.Capacity(Kumu::xmin(4*Kumu::Megabyte, static_cast<ui32_t>(HeaderByteCount))); if ( ASDCP_SUCCESS(result) ) @@ -879,7 +879,7 @@ ASDCP::MXF::OP1aHeader::WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderSize) if ( m_Preface == 0 ) return RESULT_STATE; - if ( HeaderSize < 4096 ) + if ( HeaderSize < 4096 ) { DefaultLogSink().Error("HeaderSize %u is too small. Must be >= 4096\n", HeaderSize); return RESULT_PARAM; @@ -888,7 +888,7 @@ ASDCP::MXF::OP1aHeader::WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderSize) ASDCP::FrameBuffer HeaderBuffer; HeaderByteCount = HeaderSize - ArchiveSize(); assert (HeaderByteCount <= 0xFFFFFFFFL); - Result_t result = HeaderBuffer.Capacity((ui32_t) HeaderByteCount); + Result_t result = HeaderBuffer.Capacity((ui32_t) HeaderByteCount); m_Preface->m_Lookup = &m_Primer; std::list<InterchangeObject*>::iterator pl_i = m_PacketList->m_List.begin(); @@ -983,8 +983,9 @@ ASDCP::MXF::OP1aHeader::Dump(FILE* stream) // ASDCP::MXF::OPAtomIndexFooter::OPAtomIndexFooter(const Dictionary*& d) : - Partition(d), m_Dict(d), + Partition(d), m_CurrentSegment(0), m_BytesPerEditUnit(0), m_BodySID(0), + m_Dict(d), m_ECOffset(0), m_Lookup(0) { BodySID = 0; @@ -1058,7 +1059,7 @@ ASDCP::MXF::OPAtomIndexFooter::InitFromBuffer(const byte_t* p, ui32_t l) { Result_t result = RESULT_OK; const byte_t* end_p = p + l; - + while ( ASDCP_SUCCESS(result) && p < end_p ) { // parse the packets and index them by uid, discard KLVFill items @@ -1095,7 +1096,7 @@ ASDCP::MXF::OPAtomIndexFooter::WriteToFile(Kumu::FileWriter& Writer, ui64_t dura assert(m_Dict); ASDCP::FrameBuffer FooterBuffer; ui32_t footer_size = m_PacketList->m_List.size() * MaxIndexSegmentSize; // segment-count * max-segment-size - Result_t result = FooterBuffer.Capacity(footer_size); + Result_t result = FooterBuffer.Capacity(footer_size); ui32_t iseg_count = 0; if ( m_CurrentSegment != 0 ) @@ -1262,7 +1263,7 @@ ASDCP::MXF::OPAtomIndexFooter::SetIndexParamsVBR(IPrimerLookup* lookup, const Ra void ASDCP::MXF::OPAtomIndexFooter::PushIndexEntry(const IndexTableSegment::IndexEntry& Entry) { - if ( m_BytesPerEditUnit != 0 ) // are we CBR? that's bad + if ( m_BytesPerEditUnit != 0 ) // are we CBR? that's bad { DefaultLogSink().Error("Call to PushIndexEntry() failed: index is CBR\n"); return; @@ -1347,7 +1348,7 @@ ASDCP::MXF::InterchangeObject::InitFromBuffer(const byte_t* p, ui32_t l) { result = KLVPacket::InitFromBuffer(p, l); } - + return result; } @@ -1500,13 +1501,13 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label } mca_label_map_t::const_iterator i = labels.find(symbol_buf); - + if ( i == labels.end() ) { DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str()); return false; } - + if ( i->second.ul.Value()[10] != 2 ) // magic depends on UL "Essence Facet" byte (see ST 428-12) { DefaultLogSink().Error("Not a soundfield group symbol: '%s'\n", symbol_buf.c_str()); @@ -1538,7 +1539,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label } mca_label_map_t::const_iterator i = labels.find(symbol_buf); - + if ( i == labels.end() ) { DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str()); @@ -1620,7 +1621,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label else if ( ! symbol_buf.empty() ) { mca_label_map_t::const_iterator i = labels.find(symbol_buf); - + if ( i == labels.end() ) { DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str()); @@ -1648,7 +1649,7 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label } // -ASDCP::MXF::ASDCP_MCAConfigParser::ASDCP_MCAConfigParser(const Dictionary*& d) : m_Dict(d), m_ChannelCount(0) +ASDCP::MXF::ASDCP_MCAConfigParser::ASDCP_MCAConfigParser(const Dictionary*& d) : m_ChannelCount(0), m_Dict(d) { typedef mca_label_map_t::value_type pair; m_LabelMap.insert(pair("L", label_traits("Left" , true, m_Dict->ul(MDD_DCAudioChannel_L)))); diff --git a/asdcplib/src/MXFTypes.cpp b/asdcplib/src/MXFTypes.cpp index 39a25210..2024b7de 100755 --- a/asdcplib/src/MXFTypes.cpp +++ b/asdcplib/src/MXFTypes.cpp @@ -173,7 +173,7 @@ ASDCP::UMID::MakeUMID(int Type, const UUID& AssetID) // Instance Number m_Value[13] = m_Value[14] = m_Value[15] = 0; - + memcpy(&m_Value[16], AssetID.Value(), AssetID.Size()); m_HasValue = true; } @@ -250,7 +250,7 @@ ASDCP::MXF::UTF16String::operator=(const char* sz) else this->assign(sz); - + return *this; } @@ -372,7 +372,7 @@ ASDCP::MXF::ISO8String::operator=(const char* sz) else this->assign(sz); - + return *this; } @@ -452,7 +452,7 @@ ASDCP::MXF::TLVReader::FindTL(const MDDEntry& Entry) DefaultLogSink().Error("No Lookup service\n"); return false; } - + TagValue TmpTag; if ( m_Lookup->TagForKey(Entry.ul, TmpTag) != RESULT_OK ) @@ -617,7 +617,7 @@ ASDCP::MXF::TLVWriter::WriteUi8(const MDDEntry& Entry, ui8_t* value) if ( ! MemIOWriter::WriteUi16BE(sizeof(ui8_t)) ) return RESULT_KLV_CODING(__LINE__, __FILE__); if ( ! MemIOWriter::WriteUi8(*value) ) return RESULT_KLV_CODING(__LINE__, __FILE__); } - + return result; } @@ -709,7 +709,7 @@ ASDCP::MXF::RGBALayout::EncodeString(char* buf, ui32_t buf_len) const std::string tmp_str; char tmp_buf[64]; - for ( int i = 0; i < RGBAValueLength && m_value[i] != 0; i += 2 ) + for ( unsigned int i = 0; i < RGBAValueLength && m_value[i] != 0; i += 2 ) { snprintf(tmp_buf, 64, "%c(%d)", get_char_for_code(m_value[i]), m_value[i+1]); diff --git a/asdcplib/src/MXFTypes.h b/asdcplib/src/MXFTypes.h index 19f97c38..53836f90 100755 --- a/asdcplib/src/MXFTypes.h +++ b/asdcplib/src/MXFTypes.h @@ -56,7 +56,7 @@ namespace ASDCP typedef std::pair<ui32_t, ui32_t> ItemInfo; typedef std::map<TagValue, ItemInfo> TagMap; - // + // class TLVReader : public Kumu::MemIOReader { @@ -76,7 +76,7 @@ namespace ASDCP Result_t ReadUi64(const MDDEntry&, ui64_t*); }; - // + // class TLVWriter : public Kumu::MemIOWriter { @@ -119,7 +119,7 @@ namespace ASDCP if ( ! Writer->WriteUi32BE(this->size()) ) return false; if ( ! Writer->WriteUi32BE(this->ItemSize()) ) return false; if ( this->empty() ) return true; - + typename ContainerType::const_iterator i; bool result = true; for ( i = this->begin(); i != this->end() && result; ++i ) @@ -156,14 +156,14 @@ namespace ASDCP return result; } - void Dump(FILE* stream = 0, ui32_t depth = 0) { + void Dump(FILE* stream = 0, ui32_t = 0) { char identbuf[IdentBufferLen]; if ( stream == 0 ) { stream = stderr; } - + typename ContainerType::const_iterator i; for ( i = this->begin(); i != this->end(); ++i ) { @@ -234,7 +234,7 @@ namespace ASDCP for ( ; l_i != this->end(); l_i++ ) arch_size += l_i->ArchiveLength(); - + return arch_size; } @@ -250,7 +250,7 @@ namespace ASDCP } // - void Dump(FILE* stream = 0, ui32_t depth = 0) + void Dump(FILE* stream = 0, ui32_t = 0) { char identbuf[IdentBufferLen]; @@ -415,7 +415,7 @@ namespace ASDCP Code (UInt8): Enumerated value specifying component (i.e., component identifier). "0" is the layout terminator. - Depth (UInt8): Integer specifying the number of bits occupied (see also G.2.26) + Depth (UInt8): Integer specifying the number of bits occupied (see also G.2.26) 1->32 indicates integer depth 253 = HALF (floating point 16-bit value) 254 = IEEE floating point 32-bit value @@ -488,7 +488,7 @@ namespace ASDCP RGBALayout(const RGBALayout& rhs) { Set(rhs.m_value); } const RGBALayout& operator=(const RGBALayout& rhs) { Set(rhs.m_value); return *this; } - + void Set(const byte_t* value) { memcpy(m_value, value, RGBAValueLength); } @@ -520,7 +520,7 @@ namespace ASDCP { public: Raw(); - Raw(const Raw& rhs) { Copy(rhs); } + Raw(const Raw& rhs) : Kumu::ByteString() { Copy(rhs); } virtual ~Raw(); const Raw& operator=(const Raw& rhs) { Copy(rhs); return *this; } diff --git a/asdcplib/src/h__Reader.cpp b/asdcplib/src/h__Reader.cpp index 04f31236..815d7a24 100755 --- a/asdcplib/src/h__Reader.cpp +++ b/asdcplib/src/h__Reader.cpp @@ -80,8 +80,6 @@ ASDCP::h__ASDCPReader::OpenMXFRead(const std::string& filename) if( KM_SUCCESS(result) ) { // - InterchangeObject* Object; - m_Info.LabelSetType = LS_MXF_UNKNOWN; if ( m_HeaderPart.OperationalPattern.ExactMatch(MXFInterop_OPAtom_Entry().ul) ) @@ -335,7 +333,7 @@ ASDCP::Read_EKLV_Packet(Kumu::FileReader& File, const ASDCP::Dictionary& Dict, ui32_t SourceLength = (ui32_t)KM_i64_BE(Kumu::cp2i<ui64_t>(ess_p)); ess_p += sizeof(ui64_t); assert(SourceLength); - + if ( FrameBuf.Capacity() < SourceLength ) { DefaultLogSink().Error("FrameBuf.Capacity: %u SourceLength: %u\n", FrameBuf.Capacity(), SourceLength); @@ -371,7 +369,7 @@ ASDCP::Read_EKLV_Packet(Kumu::FileReader& File, const ASDCP::Dictionary& Dict, result = DecryptFrameBuffer(TmpWrapper, FrameBuf, Ctx); FrameBuf.FrameNumber(FrameNum); - + // detect and test integrity pack if ( ASDCP_SUCCESS(result) && Info.UsesHMAC && HMAC ) { @@ -410,7 +408,7 @@ ASDCP::Read_EKLV_Packet(Kumu::FileReader& File, const ASDCP::Dictionary& Dict, ui32_t read_count; assert(PacketLength <= 0xFFFFFFFFL); result = File.Read(FrameBuf.Data(), (ui32_t) PacketLength, &read_count); - + if ( ASDCP_FAILURE(result) ) return result; @@ -421,7 +419,7 @@ ASDCP::Read_EKLV_Packet(Kumu::FileReader& File, const ASDCP::Dictionary& Dict, DefaultLogSink().Error("read_count: %s != FrameLength: %s\n", ui64sz(read_count, intbuf1), ui64sz(PacketLength, intbuf2) ); - + return RESULT_READFAIL; } diff --git a/asdcplib/src/h__Writer.cpp b/asdcplib/src/h__Writer.cpp index c0ed2d3b..12f68f05 100755 --- a/asdcplib/src/h__Writer.cpp +++ b/asdcplib/src/h__Writer.cpp @@ -107,7 +107,7 @@ ASDCP::h__ASDCPWriter::CreateBodyPart(const MXF::Rational& EditRate, ui32_t Byte UL OPAtomUL(m_Dict->ul(MDD_OPAtom)); m_BodyPart.OperationalPattern = OPAtomUL; m_RIP.PairArray.push_back(RIP::PartitionPair(1, m_BodyPart.ThisPartition)); // Second RIP Entry - + UL BodyUL(m_Dict->ul(MDD_ClosedCompleteBodyPartition)); result = m_BodyPart.WriteToFile(m_File, BodyUL); } @@ -168,10 +168,19 @@ ASDCP::h__ASDCPWriter::WriteASDCPHeader(const std::string& PackageLabel, const U // Result_t ASDCP::h__ASDCPWriter::WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,const byte_t* EssenceUL, - AESEncContext* Ctx, HMACContext* HMAC) + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) { return Write_EKLV_Packet(m_File, *m_Dict, m_HeaderPart, m_Info, m_CtFrameBuf, m_FramesWritten, - m_StreamOffset, FrameBuf, EssenceUL, Ctx, HMAC); + m_StreamOffset, FrameBuf, EssenceUL, Ctx, HMAC, hash); +} + +Result_t +ASDCP::h__ASDCPWriter::FakeWriteEKLVPacket(int size) +{ + m_StreamOffset += size; + m_File.Seek(size, Kumu::SP_POS); + + return RESULT_OK; } // standard method of writing the header and footer of a completed MXF file @@ -227,14 +236,16 @@ ASDCP::h__ASDCPWriter::WriteASDCPFooter() // standard method of writing a plaintext or encrypted frame Result_t -ASDCP::Write_EKLV_Packet(Kumu::FileWriter& File, const ASDCP::Dictionary& Dict, const MXF::OP1aHeader& HeaderPart, +ASDCP::Write_EKLV_Packet(Kumu::FileWriter& File, const ASDCP::Dictionary& Dict, const MXF::OP1aHeader&, const ASDCP::WriterInfo& Info, ASDCP::FrameBuffer& CtFrameBuf, ui32_t& FramesWritten, ui64_t & StreamOffset, const ASDCP::FrameBuffer& FrameBuf, const byte_t* EssenceUL, - AESEncContext* Ctx, HMACContext* HMAC) + AESEncContext* Ctx, HMACContext* HMAC, std::string* hash) { Result_t result = RESULT_OK; IntegrityPack IntPack; + File.StartHashing(); + byte_t overhead[128]; Kumu::MemIOWriter Overhead(overhead, 128); @@ -354,7 +365,7 @@ ASDCP::Write_EKLV_Packet(Kumu::FileWriter& File, const ASDCP::Dictionary& Dict, if ( ASDCP_SUCCESS(result) ) result = File.Writev(Overhead.Data(), Overhead.Length()); - + if ( ASDCP_SUCCESS(result) ) result = File.Writev((byte_t*)FrameBuf.RoData(), FrameBuf.Size()); @@ -365,6 +376,10 @@ ASDCP::Write_EKLV_Packet(Kumu::FileWriter& File, const ASDCP::Dictionary& Dict, if ( ASDCP_SUCCESS(result) ) result = File.Writev(); + if (hash) { + *hash = File.StopHashing(); + } + return result; } diff --git a/asdcplib/src/wscript b/asdcplib/src/wscript new file mode 100644 index 00000000..5282e969 --- /dev/null +++ b/asdcplib/src/wscript @@ -0,0 +1,91 @@ +# +# Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +def configure(conf): + conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64') + conf.env.append_value('CXXFLAGS', '-DPACKAGE_VERSION="1.9.45-dvdomatic"') + if conf.options.target_windows: + conf.env.append_value('CXXFLAGS', '-DASDCP_PLATFORM="win32"') + conf.env.append_value('CXXFLAGS', '-DKM_WIN32') + else: + conf.env.append_value('CXXFLAGS', '-DASDCP_PLATFORM="linux"') + +def build(bld): + if bld.env.STATIC: + obj = bld(features = 'cxx cxxstlib') + else: + obj = bld(features = 'cxx cxxshlib') + + obj.name = 'libkumu-libdcp%s' % bld.env.API_VERSION + obj.target = 'kumu-libdcp%s' % bld.env.API_VERSION + obj.uselib = 'OPENSSL BOOST_FILESYSTEM' + obj.includes = ['.'] + obj.export_includes = ['.'] + obj.source = """ + KM_fileio.cpp + KM_log.cpp + KM_util.cpp + KM_xml.cpp + KM_tai.cpp + KM_prng.cpp + """ + + if bld.env.STATIC: + obj = bld(features = 'cxx cxxstlib') + else: + obj = bld(features = 'cxx cxxshlib') + + obj.name = 'libasdcp-libdcp%s' % bld.env.API_VERSION + obj.target = 'asdcp-libdcp%s' % bld.env.API_VERSION + obj.uselib = 'OPENSSL' + obj.use = 'libkumu-libdcp%s' % bld.env.API_VERSION + obj.includes = ['.'] + obj.export_includes = ['.'] + obj.source = """ + MPEG2_Parser.cpp + MPEG.cpp + JP2K_Codestream_Parser.cpp + JP2K_Sequence_Parser.cpp + JP2K.cpp + PCM_Parser.cpp + Wav.cpp + TimedText_Parser.cpp + KLV.cpp + Dict.cpp + MXFTypes.cpp + MXF.cpp + Index.cpp + Metadata.cpp + AS_DCP.cpp + AS_DCP_MXF.cpp + AS_DCP_AES.cpp + h__Reader.cpp + h__Writer.cpp + AS_DCP_MPEG2.cpp + AS_DCP_JP2K.cpp + AS_DCP_PCM.cpp + AS_DCP_TimedText.cpp + AS_DCP_ATMOS.cpp + AS_DCP_DCData.cpp + PCMParserList.cpp + MDD.cpp + """ + + if bld.env.STATIC: + bld.install_files('${PREFIX}/lib', 'libkumu-libdcp%s.a' % bld.env.API_VERSION) + bld.install_files('${PREFIX}/lib', 'libasdcp-libdcp%s.a' % bld.env.API_VERSION) diff --git a/asdcplib/wscript b/asdcplib/wscript new file mode 100644 index 00000000..7f39d386 --- /dev/null +++ b/asdcplib/wscript @@ -0,0 +1,23 @@ +# +# Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +def configure(conf): + conf.recurse('src') + +def build(bld): + bld.recurse('src') |
