diff options
| author | jhurst <jhurst@cinecert.com> | 2012-02-21 02:09:32 +0000 |
|---|---|---|
| committer | jhurst <> | 2012-02-21 02:09:32 +0000 |
| commit | 1a5727137f5b5ff8aecd3ec5a162c198c8c0a5e7 (patch) | |
| tree | c61a1e8ba29253e51a8ebe310db2e0fad217cd78 /src/h__Reader.cpp | |
| parent | 80463afc197c90372d3f4c7890c6520f1040aedc (diff) | |
mega datetime patch
Diffstat (limited to 'src/h__Reader.cpp')
| -rwxr-xr-x | src/h__Reader.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp index 62fa834..23b1e1a 100755 --- a/src/h__Reader.cpp +++ b/src/h__Reader.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 @@ -29,16 +29,41 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \brief MXF file reader base class */ +#define DEFAULT_MD_DECL #include "AS_DCP_internal.h" #include "KLV.h" using namespace ASDCP; using namespace ASDCP::MXF; +static Kumu::Mutex sg_DefaultMDInitLock; +static bool sg_DefaultMDTypesInit = false; +static const ASDCP::Dictionary *sg_dict; + +// +void +ASDCP::default_md_object_init() +{ + if ( ! sg_DefaultMDTypesInit ) + { + Kumu::AutoMutex BlockLock(sg_DefaultMDInitLock); + + if ( ! sg_DefaultMDTypesInit ) + { + sg_dict = &DefaultSMPTEDict(); + g_OPAtomHeader = new ASDCP::MXF::OPAtomHeader(sg_dict); + g_OPAtomIndexFooter = new ASDCP::MXF::OPAtomIndexFooter(sg_dict); + sg_DefaultMDTypesInit = true; + } + } +} + + // ASDCP::h__Reader::h__Reader(const Dictionary& d) : m_HeaderPart(m_Dict), m_BodyPart(m_Dict), m_FooterPart(m_Dict), m_Dict(&d), m_EssenceStart(0) { + default_md_object_init(); } ASDCP::h__Reader::~h__Reader() |
