project(asdcplib)
# The version number.
-set(VERSION_MAJOR 2)
-set(VERSION_MINOR 5)
-set(VERSION_PATCH 14)
-set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
+file(STRINGS configure VERSION_STRING REGEX "PACKAGE_VERSION=.*")
+STRING(REGEX REPLACE "(.*)([\n*[.]]+).*" "\\2" ${VERSION_STRING} "${${VERSION_STRING}}")
+STRING(REGEX REPLACE "(PACKAGE_VERSION=')(.*)'" "\\2" VERSION_STRING ${VERSION_STRING})
+STRING(REGEX REPLACE "([0-9]+)[.].*" "\\1" VERSION_MAJOR ${VERSION_STRING})
+STRING(REGEX REPLACE ".*[.]([0-9]+)[.].*" "\\1" VERSION_MINOR ${VERSION_STRING})
+STRING(REGEX REPLACE ".*[.]+([0-9]+)" "\\1" VERSION_PATCH ${VERSION_STRING})
+message(STATUS "Version Number is ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Default Targets")
# use, i.e. don't skip the full RPATH for the build tree
Change History
+
+2018-08-xx - 2.9.30
+ o Fixes wrong MajorVersion in Preface
+ o Adds VideoLineMap also to RGBA essence descriptor
+ o Adds VideoLineMap to RGBA and CDCI descriptor only when option -l
+ is present (disputable - but distinguished value {0, 0} is not
+ allowed in closed and complete partitions)
+ o Fixes issue with IndexRate not set in AS-02 J2K files
+ o Additional fixes to minor version number in AS-02 partition packs
+ o CMake brought up to date
+ o Fixed erroneous WAV RF64 header interpretation
+
+
+
+
2018-08-08 - 2.8.29
o Modified AS_02::ST2052_TextParser::OpenRead signature
o Fixed partition version error in AS-02 interior body partitions
if ( KM_SUCCESS(result) )
{
this->m_IndexWriter.SetPrimerLookup(&this->m_HeaderPart.m_Primer);
+ this->m_IndexWriter.SetEditRate(m_EssenceDescriptor->SampleRate);
}
}
ui32_t GetDuration() const;
void PushIndexEntry(const ASDCP::MXF::IndexTableSegment::IndexEntry&);
+ void SetEditRate(const ASDCP::Rational& edit_rate);
};
if ( mxf_ver == MXFVersion_2004 )
{
m_HeaderPart.MinorVersion = MXF_2004_MinorVersion;
- m_HeaderPart.m_Preface->Version = ((MXF_ObjectModelVersion < 8) | MXF_2004_MinorVersion);
+ m_HeaderPart.m_Preface->Version = ((MXF_ObjectModelVersion << 8) | MXF_2004_MinorVersion);
m_HeaderPart.m_Preface->ObjectModelVersion = MXF_ObjectModelVersion;
}
else
{
assert(mxf_ver == MXFVersion_2011);
m_HeaderPart.MinorVersion = MXF_2011_MinorVersion;
- m_HeaderPart.m_Preface->Version = ((MXF_ObjectModelVersion < 8) | MXF_2011_MinorVersion);
+ m_HeaderPart.m_Preface->Version = ((MXF_ObjectModelVersion << 8) | MXF_2011_MinorVersion);
m_HeaderPart.m_Preface->ObjectModelVersion = MXF_ObjectModelVersion;
}
find_library(OpenSSLLib_PATH NAMES libeay32 crypto PATHS "${PROJECT_SOURCE_DIR}/../openssl" "${PROJECT_SOURCE_DIR}/../lib/openssl" "$ENV{CMAKE_HINT}/openssl" ENV CMAKE_HINT PATH_SUFFIXES "lib" "openssl" "lib/openssl")\r
find_path(OpenSSLLib_include_DIR NAMES openssl/rand.h PATHS "${PROJECT_SOURCE_DIR}/../openssl" "${PROJECT_SOURCE_DIR}/../lib/openssl" "$ENV{CMAKE_HINT}/openssl" ENV CMAKE_HINT PATH_SUFFIXES "include" "inc32")\r
find_library(XercescppLib_PATH NAMES xerces-c xerces-c_3 PATHS "${PROJECT_SOURCE_DIR}/../xercescpp" "${PROJECT_SOURCE_DIR}/../lib/xercescpp" "$ENV{CMAKE_HINT}/xercescpp" ENV CMAKE_HINT PATH_SUFFIXES "lib")\r
-find_library(XercescppLib_Debug_PATH NAMES xerces-c xerces-c_3D PATHS "${PROJECT_SOURCE_DIR}/../xercescpp" "${PROJECT_SOURCE_DIR}/../lib/xercescpp" "$ENV{CMAKE_HINT}/xercescpp" ENV CMAKE_HINT PATH_SUFFIXES "lib")\r
+find_library(XercescppLib_Debug_PATH NAMES xerces-cD xerces-c_3D xerces-c PATHS "${PROJECT_SOURCE_DIR}/../xercescpp" "${PROJECT_SOURCE_DIR}/../lib/xercescpp" "$ENV{CMAKE_HINT}/xercescpp" ENV CMAKE_HINT PATH_SUFFIXES "lib")\r
find_path(XercescppLib_include_DIR NAMES xercesc/dom/DOM.hpp PATHS "${PROJECT_SOURCE_DIR}/../xercescpp" "${PROJECT_SOURCE_DIR}/../lib/xercescpp" "$ENV{CMAKE_HINT}/xercescpp" ENV CMAKE_HINT PATH_SUFFIXES "include")\r
set(UseRandomUUID OFF CACHE BOOL "")\r
\r
)\r
\r
# header for deployment (install target)\r
-set(asdcp_deploy_header AS_DCP.h PCMParserList.h AS_DCP_internal.h KM_error.h KM_fileio.h KM_util.h KM_memio.h KM_tai.h KM_platform.h KM_log.h KM_mutex.h)\r
+set(asdcp_deploy_header AS_DCP.h PCMParserList.h AS_DCP_internal.h KM_error.h KM_fileio.h KM_util.h KM_memio.h KM_tai.h KM_platform.h KM_log.h KM_mutex.h dirent_win.h)\r
\r
# header\r
set(asdcp_src ${asdcp_src} Wav.h WavFileWriter.h MXF.h Metadata.h JP2K.h AS_DCP.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h\r
PCMParserList.h S12MTimecode.h AtmosSyncChannel_Generator.h AtmosSyncChannel_Mixer.h PCMDataProviders.h\r
- SyncEncoder.h SyncCommon.h CRC16.h UUIDInformation.h\r
+ SyncEncoder.h SyncCommon.h CRC16.h UUIDInformation.h dirent_win.h\r
)\r
\r
# ----------as02----------\r
# source\r
-set(as02_src h__02_Reader.cpp h__02_Writer.cpp AS_02_JP2K.cpp AS_02_PCM.cpp ST2052_TextParser.cpp AS_02_TimedText.cpp)\r
+set(as02_src h__02_Reader.cpp h__02_Writer.cpp AS_02_ISXD.cpp AS_02_JP2K.cpp AS_02_PCM.cpp ST2052_TextParser.cpp AS_02_TimedText.cpp)\r
\r
# header for deployment (install target)\r
set(as02_deploy_header AS_02.h Metadata.h MXF.h MXFTypes.h KLV.h MDD.h)\r
/*
-Copyright (c) 2005-2015, John Hurst
+Copyright (c) 2005-2018, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
if ( test_fcc == Wav::FCC_data )
{
- if ( chunk_size > RIFF_len )
- {
- DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
- return RESULT_RAW_FORMAT;
- }
+ if ( chunk_size != MAX_RIFF_LEN )
+ {
+ if ( chunk_size > RIFF_len )
+ {
+ DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
+ return RESULT_RAW_FORMAT;
+ }
- if (chunk_size != MAX_RIFF_LEN)
data_len = chunk_size;
+ }
+
*data_start = p - buf;
break;
}
-j <key-id-str> - Write key ID instead of creating a random value\n\
-k <key-string> - Use key for ciphertext operations\n\
-l <first>,<second>\n\
- - Integer values that set the VideoLineMap when creating\n\
- interlaced YCbCr files\n\
+ - Integer values that set the VideoLineMap\n\
-m <expr> - Write MCA labels using <expr>. Example:\n\
51(L,R,C,LFE,Ls,Rs,),HI,VIN\n\
-M - Do not create HMAC values when writing\n\
//
MXF::LineMapPair line_map;
+ bool line_map_flag;
std::string out_file, profile_name; //
std::string mca_audio_element_kind, mca_audio_content_kind;
horizontal_subsampling(2), vertical_subsampling(2), component_depth(10),
frame_layout(0), aspect_ratio(ASDCP::Rational(4,3)), field_dominance(0),
mxf_header_size(16384), cdci_WhiteRefLevel(940), cdci_BlackRefLevel(64), cdci_ColorRange(897),
- md_min_luminance(0), md_max_luminance(0), line_map(0,0)
+ md_min_luminance(0), md_max_luminance(0), line_map(0,0), line_map_flag(false)
{
memset(key_value, 0, KeyLen);
memset(key_id_value, 0, UUIDlen);
if ( ! set_video_line_map(argv[i]) )
{
return;
+ } else {
+ line_map_flag = true;
}
break;
tmp_dscr->WhiteReflevel = Options.cdci_WhiteRefLevel;
tmp_dscr->BlackRefLevel = Options.cdci_BlackRefLevel;
tmp_dscr->ColorRange = Options.cdci_ColorRange;
- tmp_dscr->VideoLineMap = Options.line_map;
+ if (Options.line_map_flag) tmp_dscr->VideoLineMap = Options.line_map;
if ( Options.md_min_luminance || Options.md_max_luminance )
{
tmp_dscr->PictureEssenceCoding = Options.picture_coding;
tmp_dscr->ComponentMaxRef = Options.rgba_MaxRef;
tmp_dscr->ComponentMinRef = Options.rgba_MinRef;
+ if (Options.line_map_flag) tmp_dscr->VideoLineMap = Options.line_map;
if ( Options.md_min_luminance || Options.md_max_luminance )
{
{
BodySID = 0;
IndexSID = 129;
+ MinorVersion = 3;
}
AS_02::MXF::AS02IndexWriterVBR::~AS02IndexWriterVBR() {}
m_CurrentSegment->IndexEntryArray.push_back(Entry);
}
+void
+AS_02::MXF::AS02IndexWriterVBR::SetEditRate(const ASDCP::Rational& edit_rate)
+{
+ m_EditRate = edit_rate;
+}
//------------------------------------------------------------------------------------------
//
{
BodySID = 0;
IndexSID = 129;
+ MinorVersion = 3;
}
AS_02::MXF::AS02IndexWriterCBR::~AS02IndexWriterCBR() {}