Change History
+2015-11-10 - bug fixes, IMF text, pink noise
+ o I moved personal dev environment from older gcc to newer clang. Many
+ small changes were made to satisfy the new compiler:
+ - Altered many printf format codes to use the correct format for the
+ given integer type.
+ - Parenthesized some expressions to clarify previously ambiguous
+ expectation about precedence.
+ - Created macro KM_MACOSX for use in OS-specific code selection.
+ - Removed last uses of the old C-language abs(), now using Kumu::xabs().
+ - Removed last uses of the old C-language atoi(), not using strtol().
+ o Added platform-independent call Kumu::GetExecutablePath() (to be tested
+ on win32).
+ o Added new capabilities to Result_t.
+ o Added imlementation of SMPTE ST 2092-1 pink noise generator.
+ o Added pinkwave CLI utility.
+ o Added font support to the IMF timed-text wrapper.
+ o Fixed a bug that was causing Array properties to be written without
+ the (count, length) header (from PAL).
+ o General review of Batch/Array distinction throughout the project.
+ o Cleaned up definitions of optional properties in all MXF metadata packs.
+ o Fixed Win32 build (from Crowe).
+ o Fixed a bug that caused incorrect failure when parsing JPEG 2000
+ codestreams having fewer than five decomposition levels. (from Korneder).
+ o Fixed missing UUID generation in some instances of the MCALinkID property.
+ o Added -w option to asdcp-wrap to support use of WTF label with MCA.
+ o Altered asdcp-wrap to recognize "-C <UL>" when MCA is being used.
+ o Fixed broken -A <w>/<h> option in as-02-wrap and phdr-wrap.
+ o asdcp-wrap and as-02-wrap now allow split channel groups in MCA labels.
+
2015-02-23 - bug fixes
o Fixed a new bug introduced by the fix to large numbers of subtitle ancillary
# For example, if asdcplib version 1.0.0 were modified to accomodate changes
# in file format, and if no changes were made to AS_DCP.h, the new version would be
# 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
-AC_INIT([asdcplib], [2.4.10], [asdcplib@cinecert.com])
+AC_INIT([asdcplib], [2.5.11rc1], [asdcplib@cinecert.com])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/KM_error.h])
if ( ber_len > ( buf_len - SMPTE_UL_LENGTH ) )
{
- DefaultLogSink().Error("BER encoding length exceeds buffer size\n");
+ DefaultLogSink().Error("BER encoding length exceeds buffer size.\n");
return RESULT_FAIL;
}
if ( ber_len == 0 )
{
- DefaultLogSink().Error("KLV format error, zero BER length not allowed\n");
+ DefaultLogSink().Error("KLV format error, zero BER length not allowed.\n");
return RESULT_FAIL;
}
ui64_t tmp_size;
if ( ! Kumu::read_BER(buf + SMPTE_UL_LENGTH, &tmp_size) )
{
+ DefaultLogSink().Error("KLV format error, BER decode failure.\n");
return RESULT_FAIL;
}
/*
-Copyright (c) 2004-2014, John Hurst
+Copyright (c) 2004-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
#ifndef _KM_ERROR_H_
#define _KM_ERROR_H_
+#include <string>
+
#define KM_DECLARE_RESULT(sym, i, l) const Result_t RESULT_##sym = Result_t(i, #sym, l);
namespace Kumu
class Result_t
{
int value;
- const char* label;
- const char* symbol;
+ std::string label, symbol, message;
Result_t();
public:
static unsigned int End();
static const Result_t& Get(unsigned int);
- Result_t(int v, const char* s, const char* l);
+ Result_t(int v, const std::string& s, const std::string& l);
+ Result_t(const Result_t& rhs);
+ const Result_t& operator=(const Result_t& rhs);
~Result_t();
+ const Result_t operator()(const std::string& message) const;
+ const Result_t operator()(const int& line, const char* filename) const;
+ const Result_t operator()(const std::string& message, const int& line, const char* filename) const;
+
inline bool operator==(const Result_t& rhs) const { return value == rhs.value; }
inline bool operator!=(const Result_t& rhs) const { return value != rhs.value; }
- inline bool Success() const { return ( value >= 0 ); }
+ inline bool Success() const { return ! ( value < 0 ); }
inline bool Failure() const { return ( value < 0 ); }
inline int Value() const { return value; }
inline operator int() const { return value; }
-
- inline const char* Label() const { return label; }
- inline operator const char*() const { return label; }
-
- inline const char* Symbol() const { return symbol; }
+ inline const char* Label() const { return label.c_str(); }
+ inline operator const char*() const { return label.c_str(); }
+ inline const char* Symbol() const { return symbol.c_str(); }
+ inline const char* Message() const { return message.c_str(); }
};
KM_DECLARE_RESULT(FALSE, 1, "Successful but not true.");
// See Result_t above for an explanation of RESULT_* symbols.
# define KM_TEST_NULL(p) \
if ( (p) == 0 ) { \
- return Kumu::RESULT_PTR; \
+ return Kumu::RESULT_PTR(__LINE__, __FILE__); \
}
// Returns RESULT_PTR if the given argument is NULL. See Result_t
# define KM_TEST_NULL_STR(p) \
KM_TEST_NULL(p); \
if ( (p)[0] == '\0' ) { \
- return Kumu::RESULT_NULL_STR; \
+ return Kumu::RESULT_NULL_STR(__LINE__, __FILE__); \
}
// RESULT_STATE is ambiguous. Use these everywhere it is assigned to provide some context
}
//
-Kumu::Result_t::Result_t(int v, const char* s, const char* l) : value(v), symbol(s), label(l)
+Kumu::Result_t::Result_t(int v, const std::string& s, const std::string& l) : value(v), symbol(s), label(l)
{
- assert(l);
- assert(s);
+ assert(!l.empty());
+ assert(!s.empty());
if ( v == 0 )
return;
return;
}
+
+Kumu::Result_t::Result_t(const Result_t& rhs)
+{
+ value = rhs.value;
+ symbol = rhs.symbol;
+ label = rhs.label;
+ message = rhs.message;
+}
+
Kumu::Result_t::~Result_t() {}
+//
+const Kumu::Result_t&
+Kumu::Result_t::operator=(const Result_t& rhs)
+{
+ value = rhs.value;
+ symbol = rhs.symbol;
+ label = rhs.label;
+ message = rhs.message;
+ return *this;
+}
+
+//
+const Kumu::Result_t
+Kumu::Result_t::operator()(const std::string& message) const
+{
+ Result_t result = *this;
+ result.message = message;
+ return result;
+}
+
+static int const MESSAGE_BUF_MAX = 2048;
+
+//
+const Kumu::Result_t
+Kumu::Result_t::operator()(const int& line, const char* filename) const
+{
+ assert(filename);
+ char buf[MESSAGE_BUF_MAX];
+ snprintf(buf, MESSAGE_BUF_MAX-1, "%s, line %d", filename, line);
+
+ Result_t result = *this;
+ result.message = buf;
+ return result;
+}
+
+//
+const Kumu::Result_t
+Kumu::Result_t::operator()(const std::string& message, const int& line, const char* filename) const
+{
+ assert(filename);
+ char buf[MESSAGE_BUF_MAX];
+ snprintf(buf, MESSAGE_BUF_MAX-1, "%s, line %d", filename, line);
+
+ Result_t result = *this;
+ result.message = message + buf;
+ return result;
+}
+
//------------------------------------------------------------------------------------------
// DTrace internals
#include <KM_error.h>
#include <KM_tai.h>
#include <string.h>
-#include <string>
#include <list>
namespace Kumu
if ( ASDCP_SUCCESS(result) )
{
Kumu::MemIOReader MemRDR(m_ValueStart, m_ValueLength - 4);
- result = PairArray.Unarchive(&MemRDR) ? RESULT_OK : RESULT_KLV_CODING;
+ result = PairArray.Unarchive(&MemRDR) ? RESULT_OK : RESULT_KLV_CODING(__LINE__, __FILE__);
}
if ( ASDCP_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize RIP\n");
+ DefaultLogSink().Error("Failed to initialize RIP.\n");
return result;
}
if ( ASDCP_SUCCESS(result) )
{
- result = RESULT_KLV_CODING;
+ result = RESULT_KLV_CODING(__LINE__, __FILE__);
Kumu::MemIOWriter MemWRT(Buffer.Data(), Buffer.Capacity());
if ( PairArray.Archive(&MemWRT) )
ASDCP::MXF::Partition::InitFromBuffer(const byte_t* p, ui32_t l)
{
Kumu::MemIOReader MemRDR(p, l);
- Result_t result = RESULT_KLV_CODING;
+ Result_t result = RESULT_KLV_CODING(__LINE__, __FILE__);
if ( MemRDR.ReadUi16BE(&MajorVersion) )
if ( MemRDR.ReadUi16BE(&MinorVersion) )
result = RESULT_OK;
if ( ASDCP_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize Partition\n");
+ DefaultLogSink().Error("Failed to initialize Partition.\n");
return result;
}
if ( ASDCP_SUCCESS(result) )
{
Kumu::MemIOWriter MemWRT(Buffer.Data(), Buffer.Capacity());
- result = RESULT_KLV_CODING;
+ result = RESULT_KLV_CODING(__LINE__, __FILE__);
if ( MemWRT.WriteUi16BE(MajorVersion) )
if ( MemWRT.WriteUi16BE(MinorVersion) )
if ( MemWRT.WriteUi32BE(KAGSize) )
if ( ASDCP_SUCCESS(result) )
{
Kumu::MemIOReader MemRDR(m_ValueStart, m_ValueLength);
- result = LocalTagEntryBatch.Unarchive(&MemRDR) ? RESULT_OK : RESULT_KLV_CODING;
+ result = LocalTagEntryBatch.Unarchive(&MemRDR) ? RESULT_OK : RESULT_KLV_CODING(__LINE__, __FILE__);
}
if ( ASDCP_SUCCESS(result) )
}
if ( ASDCP_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize Primer\n");
+ DefaultLogSink().Error("Failed to initialize Primer.\n");
return result;
}
assert(m_Dict);
ASDCP::FrameBuffer LocalTagBuffer;
Kumu::MemIOWriter MemWRT(Buffer.Data() + kl_length, Buffer.Capacity() - kl_length);
- Result_t result = LocalTagEntryBatch.Archive(&MemWRT) ? RESULT_OK : RESULT_KLV_CODING;
+ Result_t result = LocalTagEntryBatch.Archive(&MemWRT) ? RESULT_OK : RESULT_KLV_CODING(__LINE__, __FILE__);
if ( ASDCP_SUCCESS(result) )
{
if ( read_count != m_HeaderData.Capacity() )
{
- DefaultLogSink().Error("Short read of OP-Atom header metadata; wanted %u, got %u\n",
+ DefaultLogSink().Error("Short read of OP-Atom header metadata; wanted %u, got %u.\n",
m_HeaderData.Capacity(), read_count);
- return RESULT_KLV_CODING;
+ return RESULT_KLV_CODING(__LINE__, __FILE__);
}
}
object->m_Lookup = &m_Primer;
result = object->InitFromBuffer(p, end_p - p);
+
const byte_t* redo_p = p;
p += object->PacketLength();
- // hexdump(p, object->PacketLength());
if ( ASDCP_SUCCESS(result) )
{
}
else
{
- DefaultLogSink().Error("Error initializing packet\n");
+ DefaultLogSink().Error("Error initializing OP1a header packet.\n");
+ // Kumu::hexdump(p-object->PacketLength(), object->PacketLength());
delete object;
}
}
}
else
{
- DefaultLogSink().Error("Error initializing packet\n");
+ DefaultLogSink().Error("Error initializing OPAtom footer packet.\n");
delete object;
}
}
if ( ASDCP_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize OPAtomIndexFooter\n");
+ {
+ DefaultLogSink().Error("Failed to initialize OPAtomIndexFooter.\n");
+ }
return result;
}
public:
optional_property() : m_has_value(false) {}
- optional_property(const PropertyType& value) : m_property(value), m_has_value(false) {}
- const optional_property<PropertyType>& operator=(const PropertyType& rhs) { this->m_property = rhs; this->m_has_value = true; return *this; }
+ optional_property(const PropertyType& value) : m_property(value), m_has_value(true) {}
+ const optional_property<PropertyType>& operator=(const PropertyType& rhs) {
+ this->m_property = rhs;
+ this->m_has_value = true;
+ return *this;
+ }
bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; }
bool operator==(const optional_property<PropertyType>& rhs) const { return this->m_property == rhs.m_property; }
operator PropertyType&() { return this->m_property; }
const PropertyType& const_get() const { return m_property; }
};
+ // wrapper object manages optional properties
+ template <class PropertyType>
+ class optional_container_property
+ {
+ PropertyType m_property;
+
+ public:
+ optional_container_property() {}
+ optional_container_property(const PropertyType& value) : m_property(value) {}
+ const optional_container_property<PropertyType>& operator=(const PropertyType& rhs) {
+ this->Copy(rhs.m_property);
+ return *this;
+ }
+
+ bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; }
+ bool operator==(const optional_property<PropertyType>& rhs) const { return this->m_property == rhs.m_property; }
+ operator PropertyType&() { return this->m_property; }
+ void set(const PropertyType& rhs) { this->m_property = rhs; }
+ void reset(const PropertyType& rhs) { this->clear(); }
+ bool empty() const { return ! this->m_property.HasValue(); }
+ PropertyType& get() { return m_property; }
+ const PropertyType& const_get() const { return m_property; }
+ };
+
// base class of all metadata objects
//
class InterchangeObject : public ASDCP::KLVPacket
DefaultLogSink().Error("Malformed Set\n");
m_ElementMap.clear();
- result = RESULT_KLV_CODING;
+ result = RESULT_KLV_CODING(__LINE__, __FILE__);
}
}
if ( FindTL(Entry) )
{
if ( m_size < m_capacity ) // don't try to unarchive an empty item
- return Object->Unarchive(this) ? RESULT_OK : RESULT_KLV_CODING;
+ {
+ // TODO: carry on if uachive fails
+ return Object->Unarchive(this) ? RESULT_OK : RESULT_FALSE(__LINE__, __FILE__);
+ }
}
return RESULT_FALSE;
ASDCP_TEST_NULL(value);
if ( FindTL(Entry) )
- return MemIOReader::ReadUi8(value) ? RESULT_OK : RESULT_KLV_CODING;
+ return MemIOReader::ReadUi8(value) ? RESULT_OK : RESULT_FALSE(__LINE__, __FILE__);
return RESULT_FALSE;
}
ASDCP_TEST_NULL(value);
if ( FindTL(Entry) )
- return MemIOReader::ReadUi16BE(value) ? RESULT_OK : RESULT_KLV_CODING;
+ return MemIOReader::ReadUi16BE(value) ? RESULT_OK : RESULT_FALSE(__LINE__, __FILE__);
return RESULT_FALSE;
}
ASDCP_TEST_NULL(value);
if ( FindTL(Entry) )
- return MemIOReader::ReadUi32BE(value) ? RESULT_OK : RESULT_KLV_CODING;
+ return MemIOReader::ReadUi32BE(value) ? RESULT_OK : RESULT_FALSE(__LINE__, __FILE__);
return RESULT_FALSE;
}
ASDCP_TEST_NULL(value);
if ( FindTL(Entry) )
- return MemIOReader::ReadUi64BE(value) ? RESULT_OK : RESULT_KLV_CODING;
+ return MemIOReader::ReadUi64BE(value) ? RESULT_OK : RESULT_FALSE(__LINE__, __FILE__);
return RESULT_FALSE;
}
return RESULT_FAIL;
}
- if ( ! MemIOWriter::WriteUi8(TmpTag.a) ) return RESULT_KLV_CODING;
- if ( ! MemIOWriter::WriteUi8(TmpTag.b) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi8(TmpTag.a) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( ! MemIOWriter::WriteUi8(TmpTag.b) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
return RESULT_OK;
}
// write a temp length
byte_t* l_p = CurrentData();
- if ( ! MemIOWriter::WriteUi16BE(0) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi16BE(0) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
ui32_t before = Length();
- if ( ! Object->Archive(this) ) return RESULT_KLV_CODING;
- if ( (Length() - before) > 0xffffL ) return RESULT_KLV_CODING;
+ if ( ! Object->Archive(this) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( (Length() - before) > 0xffffL ) return RESULT_KLV_CODING(__LINE__, __FILE__);
Kumu::i2p<ui16_t>(KM_i16_BE(Length() - before), l_p);
}
if ( ASDCP_SUCCESS(result) )
{
- if ( ! MemIOWriter::WriteUi16BE(sizeof(ui8_t)) ) return RESULT_KLV_CODING;
- if ( ! MemIOWriter::WriteUi8(*value) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi16BE(sizeof(ui8_t)) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( ! MemIOWriter::WriteUi8(*value) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
}
return result;
if ( KM_SUCCESS(result) )
{
- if ( ! MemIOWriter::WriteUi16BE(sizeof(ui16_t)) ) return RESULT_KLV_CODING;
- if ( ! MemIOWriter::WriteUi16BE(*value) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi16BE(sizeof(ui16_t)) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( ! MemIOWriter::WriteUi16BE(*value) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
}
return result;
if ( KM_SUCCESS(result) )
{
- if ( ! MemIOWriter::WriteUi16BE(sizeof(ui32_t)) ) return RESULT_KLV_CODING;
- if ( ! MemIOWriter::WriteUi32BE(*value) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi16BE(sizeof(ui32_t)) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( ! MemIOWriter::WriteUi32BE(*value) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
}
return result;
if ( KM_SUCCESS(result) )
{
- if ( ! MemIOWriter::WriteUi16BE(sizeof(ui64_t)) ) return RESULT_KLV_CODING;
- if ( ! MemIOWriter::WriteUi64BE(*value) ) return RESULT_KLV_CODING;
+ if ( ! MemIOWriter::WriteUi16BE(sizeof(ui64_t)) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
+ if ( ! MemIOWriter::WriteUi64BE(*value) ) return RESULT_KLV_CODING(__LINE__, __FILE__);
}
return result;
ui32_t item_count, item_size;
if ( ! Reader->ReadUi32BE(&item_count) ) return false;
if ( ! Reader->ReadUi32BE(&item_size) ) return false;
- if ( this->ItemSize() != item_size ) return false;
+
+ if ( item_count > 0 )
+ {
+ if ( this->ItemSize() != item_size ) return false;
+ }
bool result = true;
for ( ui32_t i = 0; i < item_count && result; ++i )
virtual ~SimpleArray() {}
//
- virtual bool Unarchive(Kumu::MemIOReader* Reader)
+ bool Unarchive(Kumu::MemIOReader* Reader)
{
bool result = true;
{
T Tmp;
result = Tmp.Unarchive(Reader);
- this->push_back(Tmp);
+
+ if ( result )
+ {
+ this->push_back(Tmp);
+ }
}
return result;
}
- inline virtual bool HasValue() const { return ! this->empty(); }
+ inline bool HasValue() const { return ! this->empty(); }
- virtual ui32_t ArchiveLength() const {
+ ui32_t ArchiveLength() const {
ui32_t arch_size = 0;
typename std::list<T>::const_iterator l_i = this->begin();
}
//
- virtual bool Archive(Kumu::MemIOWriter* Writer) const {
+ bool Archive(Kumu::MemIOWriter* Writer) const {
bool result = true;
typename std::list<T>::const_iterator l_i = this->begin();
/*
-Copyright (c) 2005-2012, John Hurst
+Copyright (c) 2005-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
//
-GenericPictureEssenceDescriptor::GenericPictureEssenceDescriptor(const Dictionary*& d) : FileDescriptor(d), m_Dict(d), SignalStandard(0), SampledWidth(0), SampledXOffset(0), DisplayHeight(0), DisplayXOffset(0), DisplayF2Offset(0), AlphaTransparency(0), ImageAlignmentOffset(0), ImageEndOffset(0), ActiveWidth(0), ActiveXOffset(0)
+GenericPictureEssenceDescriptor::GenericPictureEssenceDescriptor(const Dictionary*& d) : FileDescriptor(d), m_Dict(d), SignalStandard(0), SampledWidth(0), SampledXOffset(0), DisplayHeight(0), DisplayXOffset(0), DisplayF2Offset(0), AlphaTransparency(0), ImageAlignmentOffset(0), ImageEndOffset(0), ActiveHeight(0), ActiveYOffset(0)
{
assert(m_Dict);
m_UL = m_Dict->ul(MDD_GenericPictureEssenceDescriptor);
result = TLVSet.ReadObject(OBJ_READ_ARGS_OPT(GenericPictureEssenceDescriptor, ColorPrimaries));
ColorPrimaries.set_has_value( result == RESULT_OK );
}
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, AlternativeCenterCuts));
+ if ( ASDCP_SUCCESS(result) ) {
+ result = TLVSet.ReadObject(OBJ_READ_ARGS_OPT(GenericPictureEssenceDescriptor, AlternativeCenterCuts));
+ }
if ( ASDCP_SUCCESS(result) ) {
result = TLVSet.ReadUi32(OBJ_READ_ARGS_OPT(GenericPictureEssenceDescriptor, ActiveWidth));
ActiveWidth.set_has_value( result == RESULT_OK );
if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, PictureEssenceCoding));
if ( ASDCP_SUCCESS(result) && ! CodingEquations.empty() ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, CodingEquations));
if ( ASDCP_SUCCESS(result) && ! ColorPrimaries.empty() ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, ColorPrimaries));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, AlternativeCenterCuts));
+ if ( ASDCP_SUCCESS(result) && ! AlternativeCenterCuts.empty() ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, AlternativeCenterCuts));
if ( ASDCP_SUCCESS(result) && ! ActiveWidth.empty() ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, ActiveWidth));
if ( ASDCP_SUCCESS(result) && ! ActiveHeight.empty() ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, ActiveHeight));
if ( ASDCP_SUCCESS(result) && ! ActiveXOffset.empty() ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS_OPT(GenericPictureEssenceDescriptor, ActiveXOffset));
if ( ! ColorPrimaries.empty() ) {
fprintf(stream, " %22s = %s\n", "ColorPrimaries", ColorPrimaries.get().EncodeString(identbuf, IdentBufferLen));
}
- fprintf(stream, " %22s:\n", "AlternativeCenterCuts");
- AlternativeCenterCuts.Dump(stream);
+ if ( ! AlternativeCenterCuts.empty() ) {
+ fprintf(stream, " %22s:\n", "AlternativeCenterCuts");
+ AlternativeCenterCuts.get().Dump(stream);
+ }
if ( ! ActiveWidth.empty() ) {
fprintf(stream, " %22s = %d\n", "ActiveWidth", ActiveWidth.get());
}
{
assert(m_Dict);
Result_t result = MCALabelSubDescriptor::InitFromTLVSet(TLVSet);
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(AudioChannelLabelSubDescriptor, SoundfieldGroupLinkID));
+ if ( ASDCP_SUCCESS(result) ) {
+ result = TLVSet.ReadObject(OBJ_READ_ARGS_OPT(AudioChannelLabelSubDescriptor, SoundfieldGroupLinkID));
+ SoundfieldGroupLinkID.set_has_value( result == RESULT_OK );
+ }
return result;
}
{
assert(m_Dict);
Result_t result = MCALabelSubDescriptor::WriteToTLVSet(TLVSet);
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(AudioChannelLabelSubDescriptor, SoundfieldGroupLinkID));
+ if ( ASDCP_SUCCESS(result) && ! SoundfieldGroupLinkID.empty() ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS_OPT(AudioChannelLabelSubDescriptor, SoundfieldGroupLinkID));
return result;
}
stream = stderr;
MCALabelSubDescriptor::Dump(stream);
- fprintf(stream, " %22s = %s\n", "SoundfieldGroupLinkID", SoundfieldGroupLinkID.EncodeString(identbuf, IdentBufferLen));
+ if ( ! SoundfieldGroupLinkID.empty() ) {
+ fprintf(stream, " %22s = %s\n", "SoundfieldGroupLinkID", SoundfieldGroupLinkID.get().EncodeString(identbuf, IdentBufferLen));
+ }
}
//
{
assert(m_Dict);
Result_t result = MCALabelSubDescriptor::InitFromTLVSet(TLVSet);
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(SoundfieldGroupLabelSubDescriptor, GroupOfSoundfieldGroupsLinkID));
+ if ( ASDCP_SUCCESS(result) ) {
+ result = TLVSet.ReadObject(OBJ_READ_ARGS_OPT(SoundfieldGroupLabelSubDescriptor, GroupOfSoundfieldGroupsLinkID));
+ }
return result;
}
{
assert(m_Dict);
Result_t result = MCALabelSubDescriptor::WriteToTLVSet(TLVSet);
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(SoundfieldGroupLabelSubDescriptor, GroupOfSoundfieldGroupsLinkID));
+ if ( ASDCP_SUCCESS(result) && ! GroupOfSoundfieldGroupsLinkID.empty() ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS_OPT(SoundfieldGroupLabelSubDescriptor, GroupOfSoundfieldGroupsLinkID));
return result;
}
stream = stderr;
MCALabelSubDescriptor::Dump(stream);
- fprintf(stream, " %22s:\n", "GroupOfSoundfieldGroupsLinkID");
- GroupOfSoundfieldGroupsLinkID.Dump(stream);
+ if ( ! GroupOfSoundfieldGroupsLinkID.empty() ) {
+ fprintf(stream, " %22s:\n", "GroupOfSoundfieldGroupsLinkID");
+ GroupOfSoundfieldGroupsLinkID.get().Dump(stream);
+ }
}
//
/*
-Copyright (c) 2005-2012, John Hurst
+Copyright (c) 2005-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
UUID ProductUID;
Kumu::Timestamp ModificationDate;
VersionType ToolkitVersion;
- optional_property<UTF16String> Platform;
+ optional_property<UTF16String > Platform;
Identification(const Dictionary*& d);
Identification(const Identification& rhs);
public:
const Dictionary*& m_Dict;
UMID LinkedPackageUID;
- optional_property<ui32_t> IndexSID;
+ optional_property<ui32_t > IndexSID;
ui32_t BodySID;
EssenceContainerData(const Dictionary*& d);
public:
const Dictionary*& m_Dict;
UMID PackageUID;
- optional_property<UTF16String> Name;
+ optional_property<UTF16String > Name;
Kumu::Timestamp PackageCreationDate;
Kumu::Timestamp PackageModifiedDate;
Array<UUID> Tracks;
public:
const Dictionary*& m_Dict;
- optional_property<UUID> PackageMarker;
+ optional_property<UUID > PackageMarker;
MaterialPackage(const Dictionary*& d);
MaterialPackage(const MaterialPackage& rhs);
const Dictionary*& m_Dict;
ui32_t TrackID;
ui32_t TrackNumber;
- optional_property<UTF16String> TrackName;
- optional_property<UUID> Sequence;
+ optional_property<UTF16String > TrackName;
+ optional_property<UUID > Sequence;
GenericTrack(const Dictionary*& d);
GenericTrack(const GenericTrack& rhs);
public:
const Dictionary*& m_Dict;
UL DataDefinition;
- optional_property<ui64_t> Duration;
+ optional_property<ui64_t > Duration;
StructuralComponent(const Dictionary*& d);
StructuralComponent(const StructuralComponent& rhs);
public:
const Dictionary*& m_Dict;
- optional_property<ui32_t> LinkedTrackID;
+ optional_property<ui32_t > LinkedTrackID;
Rational SampleRate;
- optional_property<ui64_t> ContainerDuration;
+ optional_property<ui64_t > ContainerDuration;
UL EssenceContainer;
- optional_property<UL> Codec;
+ optional_property<UL > Codec;
FileDescriptor(const Dictionary*& d);
FileDescriptor(const FileDescriptor& rhs);
const Dictionary*& m_Dict;
Rational AudioSamplingRate;
ui8_t Locked;
- optional_property<ui8_t> AudioRefLevel;
- optional_property<ui8_t> ElectroSpatialFormulation;
+ optional_property<ui8_t > AudioRefLevel;
+ optional_property<ui8_t > ElectroSpatialFormulation;
ui32_t ChannelCount;
ui32_t QuantizationBits;
- optional_property<ui8_t> DialNorm;
+ optional_property<ui8_t > DialNorm;
UL SoundEssenceCoding;
GenericSoundEssenceDescriptor(const Dictionary*& d);
public:
const Dictionary*& m_Dict;
ui16_t BlockAlign;
- optional_property<ui8_t> SequenceOffset;
+ optional_property<ui8_t > SequenceOffset;
ui32_t AvgBps;
- optional_property<UL> ChannelAssignment;
- optional_property<Rational> ReferenceImageEditRate;
- optional_property<ui8_t> ReferenceAudioAlignmentLevel;
+ optional_property<UL > ChannelAssignment;
+ optional_property<Rational > ReferenceImageEditRate;
+ optional_property<ui8_t > ReferenceAudioAlignmentLevel;
WaveAudioDescriptor(const Dictionary*& d);
WaveAudioDescriptor(const WaveAudioDescriptor& rhs);
public:
const Dictionary*& m_Dict;
- optional_property<ui8_t> SignalStandard;
+ optional_property<ui8_t > SignalStandard;
ui8_t FrameLayout;
ui32_t StoredWidth;
ui32_t StoredHeight;
- optional_property<ui32_t> StoredF2Offset;
- optional_property<ui32_t> SampledWidth;
- optional_property<ui32_t> SampledHeight;
- optional_property<ui32_t> SampledXOffset;
- optional_property<ui32_t> SampledYOffset;
- optional_property<ui32_t> DisplayHeight;
- optional_property<ui32_t> DisplayWidth;
- optional_property<ui32_t> DisplayXOffset;
- optional_property<ui32_t> DisplayYOffset;
- optional_property<ui32_t> DisplayF2Offset;
+ optional_property<ui32_t > StoredF2Offset;
+ optional_property<ui32_t > SampledWidth;
+ optional_property<ui32_t > SampledHeight;
+ optional_property<ui32_t > SampledXOffset;
+ optional_property<ui32_t > SampledYOffset;
+ optional_property<ui32_t > DisplayHeight;
+ optional_property<ui32_t > DisplayWidth;
+ optional_property<ui32_t > DisplayXOffset;
+ optional_property<ui32_t > DisplayYOffset;
+ optional_property<ui32_t > DisplayF2Offset;
Rational AspectRatio;
- optional_property<ui8_t> ActiveFormatDescriptor;
- optional_property<ui8_t> AlphaTransparency;
- optional_property<UL> TransferCharacteristic;
- optional_property<ui32_t> ImageAlignmentOffset;
- optional_property<ui32_t> ImageStartOffset;
- optional_property<ui32_t> ImageEndOffset;
- optional_property<ui8_t> FieldDominance;
+ optional_property<ui8_t > ActiveFormatDescriptor;
+ optional_property<ui8_t > AlphaTransparency;
+ optional_property<UL > TransferCharacteristic;
+ optional_property<ui32_t > ImageAlignmentOffset;
+ optional_property<ui32_t > ImageStartOffset;
+ optional_property<ui32_t > ImageEndOffset;
+ optional_property<ui8_t > FieldDominance;
UL PictureEssenceCoding;
- optional_property<UL> CodingEquations;
- optional_property<UL> ColorPrimaries;
- Batch<UL> AlternativeCenterCuts;
- optional_property<ui32_t> ActiveWidth;
- optional_property<ui32_t> ActiveHeight;
- optional_property<ui32_t> ActiveXOffset;
- optional_property<ui32_t> ActiveYOffset;
+ optional_property<UL > CodingEquations;
+ optional_property<UL > ColorPrimaries;
+ optional_property<Batch<UL> > AlternativeCenterCuts;
+ optional_property<ui32_t > ActiveWidth;
+ optional_property<ui32_t > ActiveHeight;
+ optional_property<ui32_t > ActiveXOffset;
+ optional_property<ui32_t > ActiveYOffset;
GenericPictureEssenceDescriptor(const Dictionary*& d);
GenericPictureEssenceDescriptor(const GenericPictureEssenceDescriptor& rhs);
public:
const Dictionary*& m_Dict;
- optional_property<ui32_t> ComponentMaxRef;
- optional_property<ui32_t> ComponentMinRef;
- optional_property<ui32_t> AlphaMinRef;
- optional_property<ui32_t> AlphaMaxRef;
- optional_property<ui8_t> ScanningDirection;
+ optional_property<ui32_t > ComponentMaxRef;
+ optional_property<ui32_t > ComponentMinRef;
+ optional_property<ui32_t > AlphaMinRef;
+ optional_property<ui32_t > AlphaMaxRef;
+ optional_property<ui8_t > ScanningDirection;
RGBAEssenceDescriptor(const Dictionary*& d);
RGBAEssenceDescriptor(const RGBAEssenceDescriptor& rhs);
ui32_t XTOsize;
ui32_t YTOsize;
ui16_t Csize;
- optional_property<Raw> PictureComponentSizing;
- optional_property<Raw> CodingStyleDefault;
- optional_property<Raw> QuantizationDefault;
- optional_property<RGBALayout> J2CLayout;
+ optional_property<Raw > PictureComponentSizing;
+ optional_property<Raw > CodingStyleDefault;
+ optional_property<Raw > QuantizationDefault;
+ optional_property<RGBALayout > J2CLayout;
JPEG2000PictureSubDescriptor(const Dictionary*& d);
JPEG2000PictureSubDescriptor(const JPEG2000PictureSubDescriptor& rhs);
const Dictionary*& m_Dict;
ui32_t ComponentDepth;
ui32_t HorizontalSubsampling;
- optional_property<ui32_t> VerticalSubsampling;
- optional_property<ui8_t> ColorSiting;
- optional_property<ui8_t> ReversedByteOrder;
- optional_property<ui16_t> PaddingBits;
- optional_property<ui32_t> AlphaSampleDepth;
- optional_property<ui32_t> BlackRefLevel;
- optional_property<ui32_t> WhiteReflevel;
- optional_property<ui32_t> ColorRange;
+ optional_property<ui32_t > VerticalSubsampling;
+ optional_property<ui8_t > ColorSiting;
+ optional_property<ui8_t > ReversedByteOrder;
+ optional_property<ui16_t > PaddingBits;
+ optional_property<ui32_t > AlphaSampleDepth;
+ optional_property<ui32_t > BlackRefLevel;
+ optional_property<ui32_t > WhiteReflevel;
+ optional_property<ui32_t > ColorRange;
CDCIEssenceDescriptor(const Dictionary*& d);
CDCIEssenceDescriptor(const CDCIEssenceDescriptor& rhs);
public:
const Dictionary*& m_Dict;
- optional_property<ui8_t> SingleSequence;
- optional_property<ui8_t> ConstantBFrames;
- optional_property<ui8_t> CodedContentType;
- optional_property<ui8_t> LowDelay;
- optional_property<ui8_t> ClosedGOP;
- optional_property<ui8_t> IdenticalGOP;
- optional_property<ui8_t> MaxGOP;
- optional_property<ui8_t> BPictureCount;
- optional_property<ui32_t> BitRate;
- optional_property<ui8_t> ProfileAndLevel;
+ optional_property<ui8_t > SingleSequence;
+ optional_property<ui8_t > ConstantBFrames;
+ optional_property<ui8_t > CodedContentType;
+ optional_property<ui8_t > LowDelay;
+ optional_property<ui8_t > ClosedGOP;
+ optional_property<ui8_t > IdenticalGOP;
+ optional_property<ui8_t > MaxGOP;
+ optional_property<ui8_t > BPictureCount;
+ optional_property<ui32_t > BitRate;
+ optional_property<ui8_t > ProfileAndLevel;
MPEG2VideoDescriptor(const Dictionary*& d);
MPEG2VideoDescriptor(const MPEG2VideoDescriptor& rhs);
UUID ResourceID;
UTF16String UCSEncoding;
UTF16String NamespaceURI;
- optional_property<UTF16String> RFC5646LanguageTagList;
+ optional_property<UTF16String > RFC5646LanguageTagList;
TimedTextDescriptor(const Dictionary*& d);
TimedTextDescriptor(const TimedTextDescriptor& rhs);
UL MCALabelDictionaryID;
UUID MCALinkID;
UTF16String MCATagSymbol;
- optional_property<UTF16String> MCATagName;
- optional_property<ui32_t> MCAChannelID;
- optional_property<ISO8String> RFC5646SpokenLanguage;
+ optional_property<UTF16String > MCATagName;
+ optional_property<ui32_t > MCAChannelID;
+ optional_property<ISO8String > RFC5646SpokenLanguage;
MCALabelSubDescriptor(const Dictionary*& d);
MCALabelSubDescriptor(const MCALabelSubDescriptor& rhs);
public:
const Dictionary*& m_Dict;
- UUID SoundfieldGroupLinkID;
+ optional_property<UUID > SoundfieldGroupLinkID;
AudioChannelLabelSubDescriptor(const Dictionary*& d);
AudioChannelLabelSubDescriptor(const AudioChannelLabelSubDescriptor& rhs);
public:
const Dictionary*& m_Dict;
- Array<UUID> GroupOfSoundfieldGroupsLinkID;
+ optional_property<Array<UUID> > GroupOfSoundfieldGroupsLinkID;
SoundfieldGroupLabelSubDescriptor(const Dictionary*& d);
SoundfieldGroupLabelSubDescriptor(const SoundfieldGroupLabelSubDescriptor& rhs);
return get_UUID_from_element(Child, outID);
}
-//
-static ASDCP::Rational
-decode_rational(const char* str_rat)
-{
- assert(str_rat);
- ui32_t Num = atoi(str_rat);
- ui32_t Den = 0;
-
- const char* den_str = strrchr(str_rat, ' ');
- if ( den_str != 0 )
- Den = atoi(den_str+1);
-
- return ASDCP::Rational(Num, Den);
-}
-
//
Result_t
ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const std::string& filename)
if ( ns == 0 )
{
- DefaultLogSink(). Warn("Document has no namespace name, assuming %s\n", c_dcst_namespace_name);
+ DefaultLogSink(). Warn("Document has no namespace name, assuming \"%s\".\n", c_dcst_namespace_name);
m_TDesc.NamespaceName = c_dcst_namespace_name;
}
else
UUID DocID;
if ( ! get_UUID_from_child_element("Id", &m_Root, DocID) )
{
- DefaultLogSink(). Error("Id element missing from input document\n");
+ DefaultLogSink(). Error("Id element missing from input document.\n");
return RESULT_FORMAT;
}
if ( EditRate == 0 )
{
- DefaultLogSink(). Error("EditRate element missing from input document\n");
+ DefaultLogSink().Error("EditRate element missing from input document.\n");
return RESULT_FORMAT;
}
- m_TDesc.EditRate = decode_rational(EditRate->GetBody().c_str());
+ if ( ! DecodeRational(EditRate->GetBody().c_str(), m_TDesc.EditRate) )
+ {
+ DefaultLogSink().Error("Error decoding edit rate value: \"%s\"\n", EditRate->GetBody().c_str());
+ return RESULT_FORMAT;
+ }
if ( m_TDesc.EditRate != EditRate_23_98
&& m_TDesc.EditRate != EditRate_24
o All option arguments must be separated from the option by whitespace.\n\n");
}
-//
-static ASDCP::Rational
-decode_rational(const char* str_rat)
-{
- assert(str_rat);
- ui32_t Num = atoi(str_rat);
- ui32_t Den = 1;
-
- const char* den_str = strrchr(str_rat, '/');
- if ( den_str != 0 )
- Den = atoi(den_str+1);
-
- return ASDCP::Rational(Num, Den);
-}
//
//
{
case 'A':
TEST_EXTRA_ARG(i, 'A');
- edit_rate = decode_rational(argv[i]);
+ if ( ! DecodeRational(argv[i], aspect_ratio) )
+ {
+ fprintf(stderr, "Error decoding aspect ratio value: %s\n", argv[i]);
+ return;
+ }
break;
case 'a':
case 'r':
TEST_EXTRA_ARG(i, 'r');
- edit_rate = decode_rational(argv[i]);
+ if ( ! DecodeRational(argv[i], edit_rate) )
+ {
+ fprintf(stderr, "Error decoding edit rate value: %s\n", argv[i]);
+ return;
+ }
+
break;
case 'R':
return RESULT_FAIL;
}
- if ( Options.use_interop_sound_wtf )
+ if ( Options.channel_assignment.HasValue() )
+ {
+ essence_descriptor->ChannelAssignment = Options.channel_assignment;
+ }
+ else if ( Options.use_interop_sound_wtf )
{
essence_descriptor->ChannelAssignment = g_dict->ul(MDD_DCAudioChannelCfg_4_WTF);
}
case 'd':
TEST_EXTRA_ARG(i, 'd');
- duration = atoi(argv[i]); // TODO: test for negative value, should use strtol()
+ duration = Kumu::xabs(strtol(argv[i], 0, 10));
break;
case '9':
}
else
{
- DefaultLogSink().Error("Error initializing packet\n");
+ DefaultLogSink().Error("Error initializing index segment packet.\n");
delete object;
}
}
if ( KM_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize AS02IndexReader\n");
+ {
+ DefaultLogSink().Error("Failed to initialize AS02IndexReader.\n");
+ }
return result;
}
case 'c':
mode = MMT_CREATE;
TEST_EXTRA_ARG(i, 'c');
- chunk_count = atoi(argv[i]);
+ chunk_count = Kumu::xabs(strtol(argv[i], 0, 10));
break;
case 'V': version_flag = true; break;
o All option arguments must be separated from the option by whitespace.\n\n");
}
-//
-static ASDCP::Rational
-decode_rational(const char* str_rat)
-{
- assert(str_rat);
- ui32_t Num = atoi(str_rat);
- ui32_t Den = 0;
-
- const char* den_str = strrchr(str_rat, '/');
- if ( den_str != 0 )
- Den = atoi(den_str+1);
-
- return ASDCP::Rational(Num, Den);
-}
-
//
//
class CommandOptions
{
case 'A':
TEST_EXTRA_ARG(i, 'A');
- edit_rate = decode_rational(argv[i]);
+ if ( ! DecodeRational(argv[i], aspect_ratio) )
+ {
+ fprintf(stderr, "Error decoding aspect ratio value: %s\n", argv[i]);
+ return;
+ }
break;
case 'a':
case 'r':
TEST_EXTRA_ARG(i, 'r');
- edit_rate = decode_rational(argv[i]);
+ if ( ! DecodeRational(argv[i], edit_rate) )
+ {
+ fprintf(stderr, "Error decoding edit rate value: %s\n", argv[i]);
+ return;
+ }
+
break;
case 'R':
\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=\"2.4.9\" \\r
+ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"2.5.11rc1\" \\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=\"2.4.9\" \\r
+ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DPACKAGE_VERSION=\"2.5.11rc1\" \\r
/I"$(WITH_OPENSSL)"\inc32\r
!endif\r
LIB_EXE = lib.exe\r
DCData_ByteStream_Parser.obj DCData_Sequence_Parser.obj \\r
AtmosSyncChannel_Generator.obj AtmosSyncChannel_Mixer.obj \\r
PCMDataProviders.obj SyncEncoder.obj CRC16.obj \\r
- UUIDInformation.obj\r
+ UUIDInformation.obj ST2095_PinkNoise.obj\r
AS02_OBJS = h__02_Reader.obj h__02_Writer.obj AS_02_JP2K.obj \\r
- AS_02_PCM.obj\r
+ AS_02_PCM.obj AS_02_TimedText.obj ST2052_TextParser.obj\r
+PHDR_OBJS = AS_02_PHDR.obj\r
\r
{$(SRCDIR)\}.cpp{}.obj:\r
$(CXX) $(CXXFLAGS) -Fd$(OBJDIR)\ /c $<\r
{$(SRCDIR)\}.c{}.obj:\r
$(CXX) $(CXXFLAGS) -Fd$(OBJDIR)\ /c $<\r
\r
-all: kmfilegen.exe kmrandgen.exe kmuuidgen.exe asdcp-test.exe \\r
- asdcp-wrap.exe asdcp-unwrap.exe asdcp-info.exe \\r
- blackwave.exe klvwalk.exe j2c-test.exe wavesplit.exe \r
+all: \\r
+ kmfilegen.exe \\r
+ kmrandgen.exe \\r
+ kmuuidgen.exe \\r
+ asdcp-test.exe \\r
+ asdcp-wrap.exe \\r
+ asdcp-unwrap.exe \\r
+ asdcp-info.exe \\r
+ blackwave.exe \\r
+ pinkwave.exe \\r
+ wavesplit.exe\r
+ j2c-test.exe \\r
+ klvwalk.exe \\r
+ klvsplit.exe\r
!IFDEF USE_AS_02\r
- as-02-wrap.exe as-02-unwrap.exe \\r
+all += as-02-wrap.exe \\r
+ as-02-unwrap.exe\r
+!ENDIF\r
+!IFDEF USE_PHDR\r
+all += phdr-wrap.exe \\r
+ phdr-unwrap.exe\r
!ENDIF\r
\r
clean:\r
- erase *.exe *.lib *.obj *.ilk *.pdb *.idb\r
+ erase *.exe *.lib *.obj *.ilk *.pdb *.idb *.manifest\r
\r
libkumu.lib : $(KUMU_OBJS)\r
!IFDEF WITH_XERCES\r
$(LIB_EXE) $(LIBFLAGS) /OUT:libas02.lib $**\r
!ENDIF\r
\r
+!IFDEF USE_PHDR\r
+libas02-phdr.lib: libas02.lib libasdcp.lib libkumu.lib $(PHDR_OBJS)\r
+ $(LIB_EXE) $(LIBFLAGS) /OUT:libas02-phdr.lib $**\r
+!ENDIF\r
+\r
blackwave.exe: libasdcp.lib blackwave.obj\r
- $(LINK) $(LINKFLAGS) /OUT:blackwave.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:blackwave.exe $** Advapi32.lib user32.lib\r
+\r
+pinkwave.exe: libasdcp.lib pinkwave.obj\r
+ $(LINK) $(LINKFLAGS) /OUT:pinkwave.exe $** Advapi32.lib user32.lib\r
\r
wavesplit.exe: libasdcp.lib wavesplit.obj\r
- $(LINK) $(LINKFLAGS) /OUT:wavesplit.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:wavesplit.exe $** Advapi32.lib user32.lib\r
\r
kmuuidgen.exe: libkumu.lib kmuuidgen.obj\r
- $(LINK) $(LINKFLAGS) /OUT:kmuuidgen.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:kmuuidgen.exe $** Advapi32.lib user32.lib\r
\r
kmrandgen.exe: libkumu.lib kmrandgen.obj\r
- $(LINK) $(LINKFLAGS) /OUT:kmrandgen.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:kmrandgen.exe $** Advapi32.lib user32.lib\r
\r
kmfilegen.exe: libkumu.lib kmfilegen.obj\r
- $(LINK) $(LINKFLAGS) /OUT:kmfilegen.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:kmfilegen.exe $** Advapi32.lib user32.lib\r
\r
klvwalk.exe: libasdcp.lib klvwalk.obj\r
- $(LINK) $(LINKFLAGS) /OUT:klvwalk.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:klvwalk.exe $** Advapi32.lib user32.lib\r
\r
asdcp-test.exe: libasdcp.lib asdcp-test.obj\r
- $(LINK) $(LINKFLAGS) /OUT:asdcp-test.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:asdcp-test.exe $** Advapi32.lib user32.lib\r
\r
asdcp-wrap.exe: libasdcp.lib asdcp-wrap.obj\r
- $(LINK) $(LINKFLAGS) /OUT:asdcp-wrap.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:asdcp-wrap.exe $** Advapi32.lib user32.lib\r
\r
asdcp-unwrap.exe: libasdcp.lib asdcp-unwrap.obj\r
- $(LINK) $(LINKFLAGS) /OUT:asdcp-unwrap.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:asdcp-unwrap.exe $** Advapi32.lib user32.lib\r
\r
asdcp-info.exe: libasdcp.lib asdcp-info.obj\r
- $(LINK) $(LINKFLAGS) /OUT:asdcp-info.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:asdcp-info.exe $** Advapi32.lib user32.lib\r
\r
asdcp-util.exe: libasdcp.lib asdcp-util.obj\r
- $(LINK) $(LINKFLAGS) /OUT:asdcp-util.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:asdcp-util.exe $** Advapi32.lib user32.lib\r
\r
j2c-test.exe: libasdcp.lib j2c-test.obj\r
- $(LINK) $(LINKFLAGS) /OUT:j2c-test.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:j2c-test.exe $** Advapi32.lib user32.lib\r
\r
!IFDEF USE_AS_02\r
as-02-wrap.exe: libas02.lib as-02-wrap.obj\r
- $(LINK) $(LINKFLAGS) /OUT:as-02-wrap.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:as-02-wrap.exe $** Advapi32.lib user32.lib\r
\r
as-02-unwrap.exe: libas02.lib as-02-unwrap.obj\r
- $(LINK) $(LINKFLAGS) /OUT:as-02-unwrap.exe $** Advapi32.lib\r
+ $(LINK) $(LINKFLAGS) /OUT:as-02-unwrap.exe $** Advapi32.lib user32.lib\r
+!ENDIF\r
+\r
+!IFDEF USE_PHDR\r
+phdr-wrap.exe: libas02-phdr.lib phdr-wrap.obj\r
+ $(LINK) $(LINKFLAGS) /OUT:phdr-wrap.exe $** Advapi32.lib user32.lib\r
+\r
+phdr-unwrap.exe: libas02-phdr.lib phdr-unwrap.obj\r
+ $(LINK) $(LINKFLAGS) /OUT:phdr-unwrap.exe $** Advapi32.lib user32.lib\r
!ENDIF\r
\r
\r