From 99f3c9bd7e314ed2342598ad0e2357c68c79e732 Mon Sep 17 00:00:00 2001 From: jhurst Date: Thu, 2 Feb 2012 01:58:43 +0000 Subject: make way for MCA --- src/AS_DCP_PCM.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'src/AS_DCP_PCM.cpp') diff --git a/src/AS_DCP_PCM.cpp b/src/AS_DCP_PCM.cpp index eb0c3b7..3956c71 100755 --- a/src/AS_DCP_PCM.cpp +++ b/src/AS_DCP_PCM.cpp @@ -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. -- cgit v1.2.3