version bump.
authormikey <mikey@cinecert.com>
Tue, 7 Sep 2010 18:43:19 +0000 (18:43 +0000)
committermikey <>
Tue, 7 Sep 2010 18:43:19 +0000 (18:43 +0000)
README
src/AS_DCP_JP2K.cpp
src/PCMParserList.cpp
src/asdcp-test.cpp
win32/Makefile.mak

diff --git a/README b/README
index 3684f70933497a12d581c385a84562b50c3310fa..5ca5119c8f6c9e895ce249158fe0b80494816f9b 100755 (executable)
--- a/README
+++ b/README
@@ -112,6 +112,24 @@ utilities all respond to -h.
 
 Change History
 
+ o Fixed bug in JP2K PictureDescriptor initialization in
+   JP2K::MXFReader::OpenRead() and JP2K::MXFSReader::OpenRead()
+ o Once again fiddling with AvgBbs. How can something so simple
+   be such a constant cause of trouble? Tested with 1-, 2- and
+   6-channel input Wav files.
+ o asdcp-test now accepts a directory name when making PCM
+   files (-c). The directory name should be the only filename
+   argument. All files in the directory must be Wav files
+   (mixed channel sizes OK). Files are sorted alphabetically by
+   filename. Hint: use numeric name infix to define order:
+   my_movie_00_L.wav
+   my_movie_01_R.wav
+   my_movie_02_C.wav
+   my_movie_03_LFE.wav
+   my_movie_04_LS.wav
+   my_movie_05_RS.wav
+
+
 2010.07.20 -  bug fixes, v1.6.37
  o Fixed TimedTextResourceSubDescriptor UL value.
 
index 51cc0178745be7309ff03cc49f3ef125cef64492..58bc0c93f49d342dfb0a8d7c46bff1be8edd5eba 100755 (executable)
@@ -263,18 +263,18 @@ lh__Reader::MD_to_JP2K_PDesc(JP2K::PictureDescriptor& PDesc)
        DefaultLogSink().Error("Unexpected PictureComponentSizing size: %u, should be 17\n", tmp_size);
 
       // CodingStyleDefault
-      memset(&m_PDesc.CodingStyleDefault, 0, sizeof(CodingStyleDefault_t));
-      memcpy(&m_PDesc.CodingStyleDefault,
+      memset(&PDesc.CodingStyleDefault, 0, sizeof(CodingStyleDefault_t));
+      memcpy(&PDesc.CodingStyleDefault,
             m_EssenceSubDescriptor->CodingStyleDefault.RoData(),
             m_EssenceSubDescriptor->CodingStyleDefault.Length());
 
       // QuantizationDefault
-      memset(&m_PDesc.QuantizationDefault, 0, sizeof(QuantizationDefault_t));
-      memcpy(&m_PDesc.QuantizationDefault,
+      memset(&PDesc.QuantizationDefault, 0, sizeof(QuantizationDefault_t));
+      memcpy(&PDesc.QuantizationDefault,
             m_EssenceSubDescriptor->QuantizationDefault.RoData(),
             m_EssenceSubDescriptor->QuantizationDefault.Length());
 
-      m_PDesc.QuantizationDefault.SPqcdLength = m_EssenceSubDescriptor->QuantizationDefault.Length() - 1;
+      PDesc.QuantizationDefault.SPqcdLength = m_EssenceSubDescriptor->QuantizationDefault.Length() - 1;
     }
 
   return RESULT_OK;
index 1fc434dd341428cb3c1e2424369ae20f9e03ba2b..5a6a9c9f80539cb7434a670f4acc8330cf50910d 100755 (executable)
@@ -30,6 +30,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include <PCMParserList.h>
+#include <KM_fileio.h>
 #include <KM_log.h>
 #include <assert.h>
 
@@ -114,15 +115,49 @@ ASDCP::PCMParserList::OpenRead(ui32_t argc, const char** argv, Rational& Picture
 {
   ASDCP_TEST_NULL_STR(argv);
   Result_t result = RESULT_OK;
+  PathList_t::iterator fi;
+  PathList_t TmpFileList;
 
-  for ( ui32_t i = 0; i < argc && ASDCP_SUCCESS(result); i++ )
+  if ( argc == 1 && PathIsDirectory(argv[0]) )
     {
-      ParserInstance* I = new ParserInstance;
-      result = I->OpenRead(argv[i], PictureRate);
+      DirScanner Dir;
+      char name_buf[MaxFilePath];
+      result = Dir.Open(argv[0]);
+
+      if ( KM_SUCCESS(result) )
+       result = Dir.GetNext(name_buf);
+
+      while ( KM_SUCCESS(result) )
+       {
+         if ( name_buf[0] != '.' ) // no hidden files
+           {
+             std::string tmp_path = std::string(argv[0]) + "/" + name_buf;
+             TmpFileList.push_back(tmp_path);
+           }
+
+         result = Dir.GetNext(name_buf);
+       }
+
+      if ( result == RESULT_ENDOFFILE )
+       {
+         result = RESULT_OK;
+         TmpFileList.sort();
+       }
+    }
+  else
+    {
+      for ( ui32_t i = 0; i < argc; ++i )
+       TmpFileList.push_back(argv[i]);
+    }
+
+  for ( fi = TmpFileList.begin(); KM_SUCCESS(result) && fi != TmpFileList.end(); fi++ )
+    {
+      mem_ptr<ParserInstance> I = new ParserInstance;
+      result = I->OpenRead(fi->c_str(), PictureRate);
 
       if ( ASDCP_SUCCESS(result) )
        {
-         if ( i == 0 )
+         if ( fi == TmpFileList.begin() )
            {
              m_ADesc = I->ADesc;
            }
@@ -153,15 +188,22 @@ ASDCP::PCMParserList::OpenRead(ui32_t argc, const char** argv, Rational& Picture
        result = I->FB.Capacity(PCM::CalcFrameBufferSize(m_ADesc));
 
       if ( ASDCP_SUCCESS(result) )
-       push_back(I);
+       {
+         push_back(I);
+         I.release();
+       }
     }
 
-  m_ADesc.ChannelCount = m_ChannelCount;
-  m_ADesc.AvgBps = ( m_ADesc.AvgBps  / m_ADesc.ChannelCount ) * m_ChannelCount;
+  if ( ASDCP_SUCCESS(result) )
+    {
+      m_ADesc.ChannelCount = m_ChannelCount;
+      m_ADesc.AvgBps = ceil(m_ADesc.AudioSamplingRate.Quotient()) * m_ADesc.BlockAlign;
+    }
+  else
+    {
+      clear();
+    }
 
-  if ( ASDCP_FAILURE(result) )
-    clear();
-  
   return result;
 }
 
index 203de9f2371737a1890fac2a705fc00ead698c2f..8b72ebc80adb50df455734147de65c4f46ba5d3d 100755 (executable)
@@ -1893,6 +1893,12 @@ main(int argc, const char** argv)
   if ( Options.mode == MMT_INFO )
     {
       result = show_file_info(Options);
+
+      for ( int i = 1; ASDCP_SUCCESS(result) && i < Options.file_count; ++i )
+       {
+         Options.filenames[0] = Options.filenames[i]; // oh-so hackish
+         result = show_file_info(Options);
+       }
     }
   else if ( Options.mode == MMT_GOP_START )
     {
index f6e9a1b668f84dfeaf11eb5c03430abb3a0f8735..44dd2623355f35fd2becc7e0f8e0c48d196128cc 100755 (executable)
@@ -33,11 +33,11 @@ OBJDIR = .
 \r
 !ifdef ENABLE_RANDOM_UUID\r
 CXXFLAGS1 = /nologo /W3 /GR /EHsc /DWIN32 /DKM_WIN32 /D_CONSOLE /I. /I$(SRCDIR) /DASDCP_PLATFORM=\"win32\" \\r
-       /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.6.37\" \\r
+       /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.7.38\" \\r
        /I"$(WITH_OPENSSL)"\inc32 /DCONFIG_RANDOM_UUID=1\r
 !else\r
 CXXFLAGS1 = /nologo /W3 /GR /EHsc /DWIN32 /DKM_WIN32 /D_CONSOLE /I. /I$(SRCDIR) /DASDCP_PLATFORM=\"win32\" \\r
-       /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.6.37\" \\r
+       /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.7.38\" \\r
        /I"$(WITH_OPENSSL)"\inc32\r
 !endif\r
 LIB_EXE = lib.exe\r