/*
-Copyright (c) 2008-2011, John Hurst
+Copyright (c) 2008-2012, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
{
Array<RIP::Pair>::const_iterator pi;
RIP::Pair TmpPair;
- ui32_t sequence = 1;
+ ui32_t sequence = 0;
// Look up the partition start in the RIP using the SID.
// Count the sequence length in because this is the sequence
// value needed to complete the HMAC.
- for ( pi = m_HeaderPart.m_RIP.PairArray.begin(); pi != m_HeaderPart.m_RIP.PairArray.end(); pi++, sequence++ )
+ for ( pi = m_HeaderPart.m_RIP.PairArray.begin(); pi != m_HeaderPart.m_RIP.PairArray.end(); ++pi, ++sequence )
{
if ( (*pi).BodySID == DescObject->EssenceStreamID )
{
// read the essence packet
assert(m_Dict);
if( ASDCP_SUCCESS(result) )
- result = ReadEKLVPacket(0, 1, FrameBuf, m_Dict->ul(MDD_GenericStream_DataElement), Ctx, HMAC);
+ result = ReadEKLVPacket(0, sequence, FrameBuf, m_Dict->ul(MDD_GenericStream_DataElement), Ctx, HMAC);
}
}
}
{
}
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::TimedText::MXFReader::OPAtomHeader()
+{
+ if ( m_Reader.empty() )
+ {
+ assert(g_OPAtomHeader);
+ return *g_OPAtomHeader;
+ }
+
+ return m_Reader->m_HeaderPart;
+}
+
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomIndexFooter&
+ASDCP::TimedText::MXFReader::OPAtomIndexFooter()
+{
+ if ( m_Reader.empty() )
+ {
+ assert(g_OPAtomIndexFooter);
+ return *g_OPAtomIndexFooter;
+ }
+
+ return m_Reader->m_FooterPart;
+}
+
// Open the file for reading. The file must exist. Returns error if the
// operation cannot be completed.
ASDCP::Result_t
{
}
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::TimedText::MXFWriter::OPAtomHeader()
+{
+ if ( m_Writer.empty() )
+ {
+ assert(g_OPAtomHeader);
+ return *g_OPAtomHeader;
+ }
+
+ return m_Writer->m_HeaderPart;
+}
+
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomIndexFooter&
+ASDCP::TimedText::MXFWriter::OPAtomIndexFooter()
+{
+ if ( m_Writer.empty() )
+ {
+ assert(g_OPAtomIndexFooter);
+ return *g_OPAtomIndexFooter;
+ }
+
+ return m_Writer->m_FooterPart;
+}
// Open the file for writing. The file must not exist. Returns error if
// the operation cannot be completed.