X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2FMXF.h;h=3ae2c856e27c698e21324327822ad4b87df70eb4;hb=e414c3671619d27816c1961339b02f7352c70711;hp=f3c244907af75ba2fe6a7b70fa53b015b5e0c2a2;hpb=deadc1bf01e8bc68905c7d33578ffb77b8317c8f;p=asdcplib.git diff --git a/src/MXF.h b/src/MXF.h index f3c2449..3ae2c85 100755 --- a/src/MXF.h +++ b/src/MXF.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2005-2006, John Hurst +Copyright (c) 2005-2009, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41,13 +41,13 @@ namespace ASDCP class InterchangeObject; // - typedef ASDCP::MXF::InterchangeObject* (*MXFObjectFactory_t)(); + typedef ASDCP::MXF::InterchangeObject* (*MXFObjectFactory_t)(const Dictionary*&); // void SetObjectFactory(UL label, MXFObjectFactory_t factory); // - InterchangeObject* CreateObject(const byte_t* label); + InterchangeObject* CreateObject(const Dictionary*& Dict, const UL& label); // seek an open file handle to the start of the RIP KLV packet @@ -57,6 +57,7 @@ namespace ASDCP class RIP : public ASDCP::KLVFilePacket { ASDCP_NO_COPY_CONSTRUCT(RIP); + RIP(); public: // @@ -78,24 +79,26 @@ namespace ASDCP return str_buf; } - inline virtual bool Unarchive(Kumu::MemIOReader* Reader) { + inline bool HasValue() const { return true; } + inline ui32_t ArchiveLength() const { return sizeof(ui32_t) + sizeof(ui64_t); } + + inline bool Unarchive(Kumu::MemIOReader* Reader) { if ( ! Reader->ReadUi32BE(&BodySID) ) return false; if ( ! Reader->ReadUi64BE(&ByteOffset) ) return false; return true; } - inline virtual bool HasValue() const { return true; } - - inline virtual bool Archive(Kumu::MemIOWriter* Writer) const { + inline bool Archive(Kumu::MemIOWriter* Writer) const { if ( ! Writer->WriteUi32BE(BodySID) ) return false; if ( ! Writer->WriteUi64BE(ByteOffset) ) return false; return true; } }; + const Dictionary*& m_Dict; Array PairArray; - RIP() {} + RIP(const Dictionary*& d) : m_Dict(d) {} virtual ~RIP() {} virtual Result_t InitFromFile(const Kumu::FileReader& Reader); virtual Result_t WriteToFile(Kumu::FileWriter& Writer); @@ -108,12 +111,15 @@ namespace ASDCP class Partition : public ASDCP::KLVFilePacket { ASDCP_NO_COPY_CONSTRUCT(Partition); + Partition(); protected: class h__PacketList; mem_ptr m_PacketList; public: + const Dictionary*& m_Dict; + ui16_t MajorVersion; ui16_t MinorVersion; ui32_t KAGSize; @@ -128,10 +134,11 @@ namespace ASDCP UL OperationalPattern; Batch