From: mikey Date: Tue, 7 Sep 2010 18:43:19 +0000 (+0000) Subject: version bump. X-Git-Tag: rel_2_10_32~262 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=9e32c7029082710ed909ce78d33d6a9b41996dda;p=asdcplib.git version bump. --- diff --git a/README b/README index 3684f70..5ca5119 100755 --- 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. diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp index 51cc017..58bc0c9 100755 --- a/src/AS_DCP_JP2K.cpp +++ b/src/AS_DCP_JP2K.cpp @@ -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; diff --git a/src/PCMParserList.cpp b/src/PCMParserList.cpp index 1fc434d..5a6a9c9 100755 --- a/src/PCMParserList.cpp +++ b/src/PCMParserList.cpp @@ -30,6 +30,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include +#include #include #include @@ -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 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; } diff --git a/src/asdcp-test.cpp b/src/asdcp-test.cpp index 203de9f..8b72ebc 100755 --- a/src/asdcp-test.cpp +++ b/src/asdcp-test.cpp @@ -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 ) { diff --git a/win32/Makefile.mak b/win32/Makefile.mak index f6e9a1b..44dd262 100755 --- a/win32/Makefile.mak +++ b/win32/Makefile.mak @@ -33,11 +33,11 @@ OBJDIR = . !ifdef ENABLE_RANDOM_UUID CXXFLAGS1 = /nologo /W3 /GR /EHsc /DWIN32 /DKM_WIN32 /D_CONSOLE /I. /I$(SRCDIR) /DASDCP_PLATFORM=\"win32\" \ - /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.6.37\" \ + /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.7.38\" \ /I"$(WITH_OPENSSL)"\inc32 /DCONFIG_RANDOM_UUID=1 !else CXXFLAGS1 = /nologo /W3 /GR /EHsc /DWIN32 /DKM_WIN32 /D_CONSOLE /I. /I$(SRCDIR) /DASDCP_PLATFORM=\"win32\" \ - /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.6.37\" \ + /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"1.7.38\" \ /I"$(WITH_OPENSSL)"\inc32 !endif LIB_EXE = lib.exe