diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-18 15:07:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-18 15:07:41 +0100 |
| commit | c2bac22380bea453665a24c6f39200a977771daf (patch) | |
| tree | a464d94724318b81484eb3011fa0a946205550c3 /asdcplib/src | |
| parent | 564f68cb2c258e61c1e70950c9d036859ea8619a (diff) | |
| parent | 59617eb2230e47b59882c4f9ca6092ce05f53cf1 (diff) | |
Merge master.
Diffstat (limited to 'asdcplib/src')
| -rwxr-xr-x | asdcplib/src/AS_DCP.h | 15 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_JP2K.cpp | 75 | ||||
| -rwxr-xr-x | asdcplib/src/AS_DCP_internal.h | 4 | ||||
| -rwxr-xr-x | asdcplib/src/JP2K_Codestream_Parser.cpp | 29 | ||||
| -rw-r--r-- | asdcplib/src/KM_fileio.cpp | 77 | ||||
| -rwxr-xr-x | asdcplib/src/KM_fileio.h | 7 | ||||
| -rwxr-xr-x | asdcplib/src/KM_prng.cpp | 21 | ||||
| -rwxr-xr-x | asdcplib/src/KM_prng.h | 3 | ||||
| -rwxr-xr-x | asdcplib/src/KM_util.cpp | 9 | ||||
| -rwxr-xr-x | asdcplib/src/KM_util.h | 3 | ||||
| -rwxr-xr-x | asdcplib/src/h__Writer.cpp | 20 | ||||
| -rw-r--r-- | asdcplib/src/wscript | 6 |
12 files changed, 244 insertions, 25 deletions
diff --git a/asdcplib/src/AS_DCP.h b/asdcplib/src/AS_DCP.h index b227c063..2681bf14 100755 --- a/asdcplib/src/AS_DCP.h +++ b/asdcplib/src/AS_DCP.h @@ -87,6 +87,7 @@ This project depends upon the following libraries: #define _AS_DCP_H_ #include <KM_error.h> +#include <KM_platform.h> #include <stdio.h> #include <stdarg.h> #include <math.h> @@ -1090,6 +1091,8 @@ namespace ASDCP { // encrypted headers. Result_t OpenReadFrame(const char* 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; @@ -1162,20 +1165,26 @@ namespace ASDCP { virtual MXF::OPAtomHeader& OPAtomHeader(); virtual MXF::OPAtomIndexFooter& OPAtomIndexFooter(); - // 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 char* 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; }; // diff --git a/asdcplib/src/AS_DCP_JP2K.cpp b/asdcplib/src/AS_DCP_JP2K.cpp index ca6d5270..e67bd8df 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-2012, John Hurst All rights reserved. @@ -33,6 +35,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <iostream> #include <iomanip> +using std::cout; using namespace ASDCP::JP2K; using Kumu::GenRandomValue; @@ -812,10 +815,11 @@ public: ~lh__Writer(){} - Result_t OpenWrite(const char*, EssenceType_t type, ui32_t HeaderSize); + Result_t OpenWrite(const char*, 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(); Result_t JP2K_PDesc_to_MD(JP2K::PictureDescriptor& PDesc); }; @@ -900,15 +904,21 @@ lh__Writer::JP2K_PDesc_to_MD(JP2K::PictureDescriptor& PDesc) } -// 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 char* filename, EssenceType_t type, ui32_t HeaderSize) +lh__Writer::OpenWrite(const char* 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) ) { @@ -978,7 +988,7 @@ 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; @@ -988,7 +998,31 @@ lh__Writer::WriteFrame(const JP2K::FrameBuffer& FrameBuf, bool add_index, 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); + } + + m_FramesWritten++; + 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 ) { @@ -1069,11 +1103,11 @@ ASDCP::JP2K::MXFWriter::OPAtomIndexFooter() return m_Writer->m_FooterPart; } -// 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 char* 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()); @@ -1082,7 +1116,7 @@ ASDCP::JP2K::MXFWriter::OpenWrite(const char* filename, const WriterInfo& Info, 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); @@ -1099,12 +1133,21 @@ ASDCP::JP2K::MXFWriter::OpenWrite(const char* filename, const WriterInfo& Info, // 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. @@ -1117,6 +1160,12 @@ ASDCP::JP2K::MXFWriter::Finalize() return m_Writer->Finalize(); } +ui64_t +ASDCP::JP2K::MXFWriter::Tell() const +{ + return m_Writer->m_File.Tell(); +} + //------------------------------------------------------------------------------------------ // @@ -1227,7 +1276,7 @@ ASDCP::JP2K::MXFSWriter::OpenWrite(const char* filename, const WriterInfo& Info, 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, false); if ( ASDCP_SUCCESS(result) ) { diff --git a/asdcplib/src/AS_DCP_internal.h b/asdcplib/src/AS_DCP_internal.h index 4c1507c8..73106a26 100755 --- a/asdcplib/src/AS_DCP_internal.h +++ b/asdcplib/src/AS_DCP_internal.h @@ -237,8 +237,10 @@ namespace ASDCP ui32_t TCFrameRate, ui32_t BytesPerEditUnit = 0); Result_t WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf, - const byte_t* EssenceUL, AESEncContext* Ctx, HMACContext* HMAC); + const byte_t* EssenceUL, AESEncContext* Ctx, HMACContext* HMAC, std::string* hash = 0); + Result_t FakeWriteEKLVPacket(int size); + Result_t WriteMXFFooter(); }; diff --git a/asdcplib/src/JP2K_Codestream_Parser.cpp b/asdcplib/src/JP2K_Codestream_Parser.cpp index c7891231..5ab7a322 100755 --- a/asdcplib/src/JP2K_Codestream_Parser.cpp +++ b/asdcplib/src/JP2K_Codestream_Parser.cpp @@ -91,6 +91,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 @@ -224,6 +244,15 @@ ASDCP::JP2K::CodestreamParser::OpenReadFrame(const char* filename, FrameBuffer& 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 2914f982..d48e7554 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> @@ -49,7 +51,6 @@ using namespace Kumu; typedef struct _stati64 fstat_t; #define S_IFLNK 0 - // win32 has WriteFileGather() and ReadFileScatter() but they // demand page alignment and page sizing, making them unsuitable // for use with arbitrary buffer sizes. @@ -614,7 +615,10 @@ 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() {} // @@ -639,6 +643,37 @@ 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 //------------------------------------------------------------------------------------------ @@ -798,6 +833,34 @@ Kumu::FileWriter::OpenWrite(const char* filename) // 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); + + m_Handle = ::CreateFileA(filename, + (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 + ); + + ::SetErrorMode(prev); + + if ( m_Handle == INVALID_HANDLE_VALUE ) + return Kumu::RESULT_FILEOPEN; + + m_IOVec = new h__iovec; + return Kumu::RESULT_OK; +} + +// +Kumu::Result_t Kumu::FileWriter::Writev(ui32_t* bytes_written) { assert( ! m_IOVec.empty() ); @@ -830,6 +893,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; } @@ -860,6 +924,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; } @@ -1006,6 +1072,10 @@ Kumu::FileWriter::Writev(ui32_t* bytes_written) 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; return RESULT_OK; @@ -1025,6 +1095,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; @@ -1034,7 +1105,7 @@ Kumu::FileWriter::Write(const byte_t* buf, ui32_t buf_len, ui32_t* bytes_written } -#endif // KM_WIN32 +#endif //------------------------------------------------------------------------------------------ diff --git a/asdcplib/src/KM_fileio.h b/asdcplib/src/KM_fileio.h index b078e32b..cb00acc8 100755 --- a/asdcplib/src/KM_fileio.h +++ b/asdcplib/src/KM_fileio.h @@ -35,6 +35,7 @@ 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> @@ -298,6 +299,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(); @@ -317,6 +320,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_prng.cpp b/asdcplib/src/KM_prng.cpp index 06b22d91..463ae157 100755 --- a/asdcplib/src/KM_prng.cpp +++ b/asdcplib/src/KM_prng.cpp @@ -1,3 +1,5 @@ +/* -*- c-basic-offset: 2; -*- */ + /* Copyright (c) 2006-2009, John Hurst All rights reserved. @@ -98,7 +100,9 @@ public: set_key(rng_key); - m_libdcp_test_rng_state = 1; +#ifdef LIBDCP_POSIX + reset(); +#endif } // @@ -153,6 +157,13 @@ public: /* XXX */ #endif } + +#ifdef LIBDCP_POSIX + void reset () + { + m_libdcp_test_rng_state = 1; + } +#endif }; @@ -206,6 +217,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 4d7ab2b7..0b941f3b 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_util.cpp b/asdcplib/src/KM_util.cpp index 23e8a1a6..b1814840 100755 --- a/asdcplib/src/KM_util.cpp +++ b/asdcplib/src/KM_util.cpp @@ -534,6 +534,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) diff --git a/asdcplib/src/KM_util.h b/asdcplib/src/KM_util.h index 892670e6..a9793ba0 100755 --- a/asdcplib/src/KM_util.h +++ b/asdcplib/src/KM_util.h @@ -381,6 +381,9 @@ namespace Kumu 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; diff --git a/asdcplib/src/h__Writer.cpp b/asdcplib/src/h__Writer.cpp index 5d3a1d5a..d743e300 100755 --- a/asdcplib/src/h__Writer.cpp +++ b/asdcplib/src/h__Writer.cpp @@ -32,6 +32,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AS_DCP_internal.h" #include "KLV.h" +using std::cout; using namespace ASDCP; using namespace ASDCP::MXF; @@ -499,11 +500,13 @@ ASDCP::h__Writer::WriteMXFHeader(const std::string& PackageLabel, const UL& Wrap // standard method of writing a plaintext or encrypted frame Result_t ASDCP::h__Writer::WriteEKLVPacket(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; + m_File.StartHashing(); + byte_t overhead[128]; Kumu::MemIOWriter Overhead(overhead, 128); assert(m_Dict); @@ -635,6 +638,21 @@ ASDCP::h__Writer::WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf, const byte if ( ASDCP_SUCCESS(result) ) result = m_File.Writev(); + if (hash) { + *hash = m_File.StopHashing(); + } + + return result; +} + +Result_t +ASDCP::h__Writer::FakeWriteEKLVPacket(int size) +{ + Result_t result = RESULT_OK; + + m_StreamOffset += size; + m_File.Seek(size, Kumu::SP_POS); + return result; } diff --git a/asdcplib/src/wscript b/asdcplib/src/wscript index 6f9e1f44..661971ac 100644 --- a/asdcplib/src/wscript +++ b/asdcplib/src/wscript @@ -8,7 +8,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DASDCP_PLATFORM="linux"') def build(bld): - if bld.env.STATIC_LIBDCP: + if bld.env.STATIC: obj = bld(features = 'cxx cxxstlib') else: obj = bld(features = 'cxx cxxshlib') @@ -27,7 +27,7 @@ def build(bld): KM_prng.cpp """ - if bld.env.STATIC_LIBDCP: + if bld.env.STATIC: obj = bld(features = 'cxx cxxstlib') else: obj = bld(features = 'cxx cxxshlib') @@ -66,6 +66,6 @@ def build(bld): MDD.cpp """ - if bld.env.STATIC_LIBDCP: + if bld.env.STATIC: bld.install_files('${PREFIX}/lib', 'libkumu-libdcp.a') bld.install_files('${PREFIX}/lib', 'libasdcp-libdcp.a') |
