o Fixed Partiton and Preface version numbers in AS-02 files
authorjhurst <jhurst@cinecert.com>
Fri, 2 Dec 2016 23:28:26 +0000 (23:28 +0000)
committerjhurst <>
Fri, 2 Dec 2016 23:28:26 +0000 (23:28 +0000)
README
src/AS_02_PHDR.cpp
src/AS_02_internal.h
src/AS_DCP_TimedText.cpp
src/AS_DCP_internal.h
src/h__Writer.cpp

diff --git a/README b/README
index 54ce5248a856e42ffbee4480466e35dffd0b5c1c..85f90e203bdfb81778ed43275e731678c8f83413 100755 (executable)
--- a/README
+++ b/README
@@ -123,9 +123,9 @@ kmuuidgen, kmrandgen - generate UUID values and random numbers.
 wavesplit - Splits a WAVE file into two or more output files. Used
   to untangle incorrectly-paired DCDM sound files.
 
-blackwave - Write a WAVE file full of zeros,  Used to make filler
-  tracks (though you would be better off modifying asdcp-test if
-  this is a common use case).
+blackwave - Write a WAVE file of zeros.
+
+pinkwave - Write a WAVE file of SMPTE ST 2095 pink noise.
 
 j2c-test - Displays information about JP2K codestreams.
 
@@ -153,6 +153,17 @@ Change History
 
 
 2016-12-01 - bug fixes 2.6.17
+ o Fixed Partiton and Preface version numbers in AS-02 files
+ o Replaced WIN32 directory scanner with dirent_win.h
+ o The NamespaceURI property of AS-02 timed text files has been exposed in the API
+   and via as-02-wrap -P. This behavior replaces previous bad behavior, but puts
+   responsibility for selecting the correct value on the operator.
+ o Exposed CreatePNGNameId and CreateFontNameId subroutines in AS_02::TimedText
+ o Adjusted UUID generation based on PNG and font names to exclude paths by
+   inserting a call to PathBasename at each Id generation site
+ o Fixed AS-02 timed text index partition
+ o Fixed contents of generic partiton EssenceContainers property in AS-DCP timed
+   text files
  o Added PixelLayout to RGBAEssenceDescriptor (contributed by Schleich)
  o Cleared up MXFGCP1FrameWrappedPictureElement / MXFGCP1FrameWrappedPictureElement
    ambiguity. PHDR continues to use MXFGCP1FrameWrappedPictureElement.
index 9322b31697c995b86122a6726049a431c8b79a73..d52618ef8df8eabdcd1e1d844604e097207d2a39 100644 (file)
@@ -445,7 +445,7 @@ AS_02::PHDR::MXFWriter::h__Writer::WritePHDRHeader(const std::string& PackageLab
       return RESULT_PARAM;
     }
   
-  InitHeader();
+  InitHeader(MXFVersion_2011);
   
   AddSourceClip(EditRate, EditRate/*TODO: for a moment*/, TCFrameRate, TrackName, EssenceUL, DataDefinition, PackageLabel);
 
index 76286b1fb531ed9aa65df250a6e75861409d7b4d..f67af68741d9748efb37ab9f6342a93b07ec865b 100644 (file)
@@ -172,7 +172,7 @@ namespace AS_02
            return RESULT_PARAM;
          }
 
-       InitHeader();
+       InitHeader(MXFVersion_2011);
 
        AddSourceClip(EditRate, EditRate/*TODO: for a moment*/, TCFrameRate, TrackName, EssenceUL, DataDefinition, PackageLabel);
        AddEssenceDescriptor(WrappingUL);
index af5e9761dbe7dad0b9619386681d178c204c8e35..ab8dab9bc6c5c6fff1e464756cbab6e10900edff 100644 (file)
@@ -580,7 +580,7 @@ ASDCP::TimedText::MXFWriter::h__Writer::SetSourceStream(ASDCP::TimedText::TimedT
 
   if ( ASDCP_SUCCESS(result) )
     {
-      InitHeader();
+      InitHeader(MXFVersion_2004);
 
       // First RIP Entry
       if ( m_Info.LabelSetType == LS_MXF_SMPTE )  // ERK
index c1df8aded6b09910a19ea989fe31a4618d717d34..aaa9e606e09058ada3a0b38307b9d3d9b7db5ce4 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2004-2013, John Hurst
+Copyright (c) 2004-2016, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -122,6 +122,14 @@ namespace ASDCP
   { 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b,
     0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b };
 
+  // Version of MXF spec to which an MXF file conforms
+  enum MXFVersion
+  {
+    MXFVersion_2004,
+    MXFVersion_2011,
+    MXFVersion_MAX
+  };
+
   //------------------------------------------------------------------------------------------
   //
 
@@ -528,11 +536,11 @@ namespace ASDCP
 
        const MXF::RIP& GetRIP() const { return m_RIP; }
 
-       void InitHeader()
+       void InitHeader(const MXFVersion& mxf_ver)
        {
          assert(m_Dict);
          assert(m_EssenceDescriptor);
-
          m_HeaderPart.m_Primer.ClearTagList();
          m_HeaderPart.m_Preface = new Preface(m_Dict);
          m_HeaderPart.AddChildObject(m_HeaderPart.m_Preface);
@@ -542,6 +550,20 @@ namespace ASDCP
          m_HeaderPart.m_Preface->OperationalPattern = UL(m_Dict->ul(MDD_OP1a));
          m_HeaderPart.OperationalPattern = m_HeaderPart.m_Preface->OperationalPattern;
 
+         if ( mxf_ver == MXFVersion_2004 )
+           {
+             m_HeaderPart.MinorVersion = 2;
+             m_HeaderPart.m_Preface->Version = 258;
+             m_HeaderPart.m_Preface->ObjectModelVersion = 1;
+           }
+         else
+           {
+             assert(mxf_ver == MXFVersion_2011);
+             m_HeaderPart.MinorVersion = 3;
+             m_HeaderPart.m_Preface->Version = 259;
+             m_HeaderPart.m_Preface->ObjectModelVersion = 1;
+           }
+
          // Identification
          Identification* Ident = new Identification(m_Dict);
          m_HeaderPart.AddChildObject(Ident);
index 07d418f7035087bfc5c705c9be09bec1e898a560..93388cd7dcf388a4be0311dfca0297d28b5b2467 100755 (executable)
@@ -141,7 +141,7 @@ ASDCP::h__ASDCPWriter::WriteASDCPHeader(const std::string& PackageLabel, const U
                                        const std::string& TrackName, const UL& EssenceUL, const UL& DataDefinition,
                                        const MXF::Rational& EditRate, ui32_t TCFrameRate, ui32_t BytesPerEditUnit)
 {
-  InitHeader();
+  InitHeader(MXFVersion_2004);
 
   // First RIP Entry
   if ( m_Info.LabelSetType == LS_MXF_SMPTE )  // ERK