diff options
| author | jhurst <jhurst@cinecert.com> | 2006-03-11 01:43:02 +0000 |
|---|---|---|
| committer | jhurst <> | 2006-03-11 01:43:02 +0000 |
| commit | 9bfe9676115531eb76649e1ebd5e14b904b53ae2 (patch) | |
| tree | df29b4a9f7d1bbb00821560ac3bca69ec7982683 /src/KLV.h | |
| parent | e73ef2046cf4f6beb730be071022aaedb3b44bba (diff) | |
metadata reformed...
Diffstat (limited to 'src/KLV.h')
| -rwxr-xr-x | src/KLV.h | 53 |
1 files changed, 38 insertions, 15 deletions
@@ -32,8 +32,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef _KLV_H_ #define _KLV_H_ -#include <FileIO.h> -#include <MemIO.h> +#include "FileIO.h" +#include "MemIO.h" +#include "MDD.h" + namespace ASDCP { @@ -69,8 +71,8 @@ namespace ASDCP { public: virtual ~IArchive() {} - virtual Result_t ReadFrom(ASDCP::MemIOReader& Reader) = 0; - virtual Result_t WriteTo(ASDCP::MemIOWriter& Writer) = 0; + virtual Result_t Unarchive(ASDCP::MemIOReader& Reader) = 0; + virtual Result_t Archive(ASDCP::MemIOWriter& Writer) = 0; }; } // namespace ASDCP @@ -79,16 +81,6 @@ namespace ASDCP namespace ASDCP { // - class IPrimerLookup - { - public: - virtual ~IPrimerLookup() {} - virtual void ClearTagList() = 0; - virtual Result_t InsertTag(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0; - virtual Result_t TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0; - }; - - // struct MDDEntry { byte_t ul[SMPTE_UL_LENGTH]; @@ -99,7 +91,38 @@ namespace ASDCP }; // - const MDDEntry* GetMDDEntry(const byte_t*); + class Dict + { + public: + static const MDDEntry* FindUL(const byte_t*); + static const MDDEntry& Type(MDD_t type_id); + static bool Replace(const MDDEntry& Entry); + static void Restore(const byte_t* ul); + static void RestoreAll(); + + inline static const byte_t* ul(MDD_t type_id) { + return Type(type_id).ul; + } + + private: + ASDCP_NO_COPY_CONSTRUCT(Dict); + + protected: + Dict(); + + public: + ~Dict(); + }; + + // + class IPrimerLookup + { + public: + virtual ~IPrimerLookup() {} + virtual void ClearTagList() = 0; + virtual Result_t InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag) = 0; + virtual Result_t TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0; + }; // class KLVPacket |
