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_TimedText.cpp | |
| parent | 1e0a44f949436b95b7def495dcaff9232dadf750 (diff) | |
make way for MCA
Diffstat (limited to 'src/AS_DCP_TimedText.cpp')
| -rw-r--r-- | src/AS_DCP_TimedText.cpp | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/AS_DCP_TimedText.cpp b/src/AS_DCP_TimedText.cpp index f7d64bd..5d31a8d 100644 --- a/src/AS_DCP_TimedText.cpp +++ b/src/AS_DCP_TimedText.cpp @@ -1,5 +1,5 @@ /* -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 @@ -37,6 +37,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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 TIMED_TEXT_PACKAGE_LABEL = "File Package: SMPTE 429-5 clip wrapping of D-Cinema Timed Text data"; static std::string TIMED_TEXT_DEF_LABEL = "Timed Text Track"; @@ -341,6 +345,30 @@ ASDCP::TimedText::MXFReader::~MXFReader() { } +// 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() ) + 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::TimedText::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 @@ -647,6 +675,29 @@ ASDCP::TimedText::MXFWriter::~MXFWriter() { } +// 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() ) + 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::TimedText::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. |
