summaryrefslogtreecommitdiff
path: root/src/AS_DCP_MPEG2.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2012-02-02 01:58:43 +0000
committerjhurst <>2012-02-02 01:58:43 +0000
commit99f3c9bd7e314ed2342598ad0e2357c68c79e732 (patch)
tree09b3986d426dead4cbd63774db9ce1c5ac216a1e /src/AS_DCP_MPEG2.cpp
parent1e0a44f949436b95b7def495dcaff9232dadf750 (diff)
make way for MCA
Diffstat (limited to 'src/AS_DCP_MPEG2.cpp')
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp53
1 files changed, 52 insertions, 1 deletions
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 252c1fa..ea7ed74 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.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 MPEG_PACKAGE_LABEL = "File Package: SMPTE 381M frame wrapping of MPEG2 video elementary stream";
static std::string PICT_DEF_LABEL = "Picture Track";
@@ -335,6 +339,30 @@ ASDCP::MPEG2::MXFReader::~MXFReader()
{
}
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::MPEG2::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::MPEG2::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
@@ -611,6 +639,29 @@ ASDCP::MPEG2::MXFWriter::~MXFWriter()
{
}
+// Warning: direct manipulation of MXF structures can interfere
+// with the normal operation of the wrapper. Caveat emptor!
+//
+ASDCP::MXF::OPAtomHeader&
+ASDCP::MPEG2::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::MPEG2::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.