make way for MCA
[asdcplib.git] / src / AS_DCP_PCM.cpp
index eb0c3b71baaf1144a662462f37c9ab7ff08d6655..3956c71ed51b9948d376ad0227a9c709ea4bd1c6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2004-2011, John Hurst
+Copyright (c) 2004-2012, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 //------------------------------------------------------------------------------------------
 
+static const ASDCP::Dictionary *sg_dict = &DefaultSMPTEDict();
+static MXF::OPAtomHeader sg_OPAtomHeader(sg_dict);
+static MXF::OPAtomIndexFooter sg_OPAtomIndexFooter(sg_dict);
+
 static std::string PCM_PACKAGE_LABEL = "File Package: SMPTE 382M frame wrapping of wave audio";
 static std::string SOUND_DEF_LABEL = "Sound Track";
 
@@ -313,6 +317,30 @@ ASDCP::PCM::MXFReader::~MXFReader()
     m_Reader->Close();
 }
 
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper.  Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::PCM::MXFReader::OPAtomHeader()
+{
+  if ( m_Reader.empty() )
+    return sg_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::PCM::MXFReader::OPAtomIndexFooter()
+{
+  if ( m_Reader.empty() )
+    return sg_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
@@ -544,6 +572,29 @@ ASDCP::PCM::MXFWriter::~MXFWriter()
 {
 }
 
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper.  Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::PCM::MXFWriter::OPAtomHeader()
+{
+  if ( m_Writer.empty() )
+    return sg_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::PCM::MXFWriter::OPAtomIndexFooter()
+{
+  if ( m_Writer.empty() )
+    return sg_OPAtomIndexFooter;
+
+  return m_Writer->m_FooterPart;
+}
 
 // Open the file for writing. The file must not exist. Returns error if
 // the operation cannot be completed.