diff options
| author | jhurst <jhurst@cinecert.com> | 2012-02-02 01:58:43 +0000 |
|---|---|---|
| committer | jhurst <> | 2012-02-02 01:58:43 +0000 |
| commit | 99f3c9bd7e314ed2342598ad0e2357c68c79e732 (patch) | |
| tree | 09b3986d426dead4cbd63774db9ce1c5ac216a1e /src/AS_DCP_JP2K.cpp | |
| parent | 1e0a44f949436b95b7def495dcaff9232dadf750 (diff) | |
make way for MCA
Diffstat (limited to 'src/AS_DCP_JP2K.cpp')
| -rwxr-xr-x | src/AS_DCP_JP2K.cpp | 100 |
1 files changed, 99 insertions, 1 deletions
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp index 72b975d..9e676ae 100755 --- a/src/AS_DCP_JP2K.cpp +++ b/src/AS_DCP_JP2K.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2004-2010, John Hurst +Copyright (c) 2004-2012, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -38,6 +38,10 @@ using Kumu::GenRandomValue; //------------------------------------------------------------------------------------------ +static const ASDCP::Dictionary *sg_dict = &DefaultSMPTEDict(); +static MXF::OPAtomHeader sg_OPAtomHeader(sg_dict); +static MXF::OPAtomIndexFooter sg_OPAtomIndexFooter(sg_dict); + static std::string JP2K_PACKAGE_LABEL = "File Package: SMPTE 429-4 frame wrapping of JPEG 2000 codestreams"; static std::string JP2K_S_PACKAGE_LABEL = "File Package: SMPTE 429-10 frame wrapping of stereoscopic JPEG 2000 codestreams"; static std::string PICT_DEF_LABEL = "Picture Track"; @@ -461,6 +465,30 @@ ASDCP::JP2K::MXFReader::~MXFReader() { } +// Warning: direct manipulation of MXF structures can interfere +// with the normal operation of the wrapper. Caveat emptor! +// +ASDCP::MXF::OPAtomHeader& +ASDCP::JP2K::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::JP2K::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 @@ -635,6 +663,30 @@ ASDCP::JP2K::MXFSReader::~MXFSReader() { } +// Warning: direct manipulation of MXF structures can interfere +// with the normal operation of the wrapper. Caveat emptor! +// +ASDCP::MXF::OPAtomHeader& +ASDCP::JP2K::MXFSReader::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::JP2K::MXFSReader::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 @@ -977,6 +1029,29 @@ ASDCP::JP2K::MXFWriter::~MXFWriter() { } +// Warning: direct manipulation of MXF structures can interfere +// with the normal operation of the wrapper. Caveat emptor! +// +ASDCP::MXF::OPAtomHeader& +ASDCP::JP2K::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::JP2K::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. @@ -1079,6 +1154,29 @@ ASDCP::JP2K::MXFSWriter::~MXFSWriter() { } +// Warning: direct manipulation of MXF structures can interfere +// with the normal operation of the wrapper. Caveat emptor! +// +ASDCP::MXF::OPAtomHeader& +ASDCP::JP2K::MXFSWriter::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::JP2K::MXFSWriter::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. |
