\brief MXF objects
*/
-#include "MXF.h"
-#include "Metadata.h"
-#include <KM_log.h>
+#include <asdcp/MXF.h>
+#include <asdcp/Metadata.h>
+#include <asdcp/KM_log.h>
using Kumu::DefaultLogSink;
using Kumu::GenRandomValue;
ASDCP_TEST_NULL(Object);
std::map<UUID, InterchangeObject*>::iterator mi = m_Map.find(ObjectID);
-
+
if ( mi == m_Map.end() )
{
*Object = 0;
// could be one of several values
if ( ASDCP_SUCCESS(result) )
result = ASDCP::MXF::Partition::InitFromBuffer(m_ValueStart, m_ValueLength);
-
+
return result;
}
{
Tag = (*i).second;
}
-
+
return RESULT_OK;
}
fprintf(stream, "Primer: %u %s\n",
(ui32_t)LocalTagEntryBatch.size(),
( LocalTagEntryBatch.size() == 1 ? "entry" : "entries" ));
-
+
Batch<LocalTagEntry>::iterator i = LocalTagEntryBatch.begin();
for ( ; i != LocalTagEntryBatch.end(); i++ )
{
{
DefaultLogSink().Warn("Improbably huge HeaderByteCount value: %qu\n", HeaderByteCount);
}
-
+
result = m_HeaderData.Capacity(Kumu::xmin(4*Kumu::Megabyte, static_cast<ui32_t>(HeaderByteCount)));
if ( ASDCP_SUCCESS(result) )
if ( m_Preface == 0 )
return RESULT_STATE;
- if ( HeaderSize < 4096 )
+ if ( HeaderSize < 4096 )
{
DefaultLogSink().Error("HeaderSize %u is too small. Must be >= 4096\n", HeaderSize);
return RESULT_PARAM;
ASDCP::FrameBuffer HeaderBuffer;
HeaderByteCount = HeaderSize - ArchiveSize();
assert (HeaderByteCount <= 0xFFFFFFFFL);
- Result_t result = HeaderBuffer.Capacity((ui32_t) HeaderByteCount);
+ Result_t result = HeaderBuffer.Capacity((ui32_t) HeaderByteCount);
m_Preface->m_Lookup = &m_Primer;
std::list<InterchangeObject*>::iterator pl_i = m_PacketList->m_List.begin();
//
ASDCP::MXF::OPAtomIndexFooter::OPAtomIndexFooter(const Dictionary*& d) :
- Partition(d), m_Dict(d),
- m_CurrentSegment(0), m_BytesPerEditUnit(0), m_BodySID(0),
+ Partition(d),
+ m_CurrentSegment(0), m_BytesPerEditUnit(0), m_BodySID(0), m_Dict(d),
m_ECOffset(0), m_Lookup(0)
{
BodySID = 0;
{
Result_t result = RESULT_OK;
const byte_t* end_p = p + l;
-
+
while ( ASDCP_SUCCESS(result) && p < end_p )
{
// parse the packets and index them by uid, discard KLVFill items
assert(m_Dict);
ASDCP::FrameBuffer FooterBuffer;
ui32_t footer_size = m_PacketList->m_List.size() * MaxIndexSegmentSize; // segment-count * max-segment-size
- Result_t result = FooterBuffer.Capacity(footer_size);
+ Result_t result = FooterBuffer.Capacity(footer_size);
ui32_t iseg_count = 0;
if ( m_CurrentSegment != 0 )
void
ASDCP::MXF::OPAtomIndexFooter::PushIndexEntry(const IndexTableSegment::IndexEntry& Entry)
{
- if ( m_BytesPerEditUnit != 0 ) // are we CBR? that's bad
+ if ( m_BytesPerEditUnit != 0 ) // are we CBR? that's bad
{
DefaultLogSink().Error("Call to PushIndexEntry() failed: index is CBR\n");
return;
{
result = KLVPacket::InitFromBuffer(p, l);
}
-
+
return result;
}
}
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
-
+
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
return false;
}
-
+
if ( i->second.ul.Value()[10] != 2 ) // magic depends on UL "Essence Facet" byte (see ST 428-12)
{
DefaultLogSink().Error("Not a soundfield group symbol: '%s'\n", symbol_buf.c_str());
}
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
-
+
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
else if ( ! symbol_buf.empty() )
{
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
-
+
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
}
//
-ASDCP::MXF::ASDCP_MCAConfigParser::ASDCP_MCAConfigParser(const Dictionary*& d) : m_Dict(d), m_ChannelCount(0)
+ASDCP::MXF::ASDCP_MCAConfigParser::ASDCP_MCAConfigParser(const Dictionary*& d) : m_ChannelCount(0), m_Dict(d)
{
typedef mca_label_map_t::value_type pair;
m_LabelMap.insert(pair("L", label_traits("Left" , true, m_Dict->ul(MDD_DCAudioChannel_L))));