diff options
| author | jhurst <jhurst@cinecert.com> | 2016-12-02 23:28:26 +0000 |
|---|---|---|
| committer | jhurst <> | 2016-12-02 23:28:26 +0000 |
| commit | 779d581d1176e0d09ae13a65d8047509bfa11eeb (patch) | |
| tree | a7c2fefe8a33c3a8b308ed85a7acbfc881018846 /src/AS_DCP_internal.h | |
| parent | 5f38f82f9bfc69fdbae47a71f587ab5b7e80e594 (diff) | |
o Fixed Partiton and Preface version numbers in AS-02 files
Diffstat (limited to 'src/AS_DCP_internal.h')
| -rwxr-xr-x | src/AS_DCP_internal.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/AS_DCP_internal.h b/src/AS_DCP_internal.h index c1df8ad..aaa9e60 100755 --- a/src/AS_DCP_internal.h +++ b/src/AS_DCP_internal.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2004-2013, John Hurst +Copyright (c) 2004-2016, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -122,6 +122,14 @@ namespace ASDCP { 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b, 0x43, 0x48, 0x55, 0x4b }; + // Version of MXF spec to which an MXF file conforms + enum MXFVersion + { + MXFVersion_2004, + MXFVersion_2011, + MXFVersion_MAX + }; + //------------------------------------------------------------------------------------------ // @@ -528,11 +536,11 @@ namespace ASDCP const MXF::RIP& GetRIP() const { return m_RIP; } - void InitHeader() + void InitHeader(const MXFVersion& mxf_ver) { assert(m_Dict); assert(m_EssenceDescriptor); - + m_HeaderPart.m_Primer.ClearTagList(); m_HeaderPart.m_Preface = new Preface(m_Dict); m_HeaderPart.AddChildObject(m_HeaderPart.m_Preface); @@ -542,6 +550,20 @@ namespace ASDCP m_HeaderPart.m_Preface->OperationalPattern = UL(m_Dict->ul(MDD_OP1a)); m_HeaderPart.OperationalPattern = m_HeaderPart.m_Preface->OperationalPattern; + if ( mxf_ver == MXFVersion_2004 ) + { + m_HeaderPart.MinorVersion = 2; + m_HeaderPart.m_Preface->Version = 258; + m_HeaderPart.m_Preface->ObjectModelVersion = 1; + } + else + { + assert(mxf_ver == MXFVersion_2011); + m_HeaderPart.MinorVersion = 3; + m_HeaderPart.m_Preface->Version = 259; + m_HeaderPart.m_Preface->ObjectModelVersion = 1; + } + // Identification Identification* Ident = new Identification(m_Dict); m_HeaderPart.AddChildObject(Ident); |
