summaryrefslogtreecommitdiff
path: root/src/Index.cpp
diff options
context:
space:
mode:
authorJohn Hurst <jhurst@cinecert.com>2021-05-20 16:52:29 -0700
committerGitHub <noreply@github.com>2021-05-20 16:52:29 -0700
commitface28d822719aa6028ffca21097225c2a94e4ca (patch)
tree9063c8d62dd0309632c69c86d00b77993efae615 /src/Index.cpp
parent7db1295803aa777fc9bfe3c0f1b06c75f183102e (diff)
parente5b0a7dbeaaa2b16ea63d7265ed7413f8de2df10 (diff)
Merge pull request #84 from cinecert/mxf_types_constructor
Dictionary reference refactor
Diffstat (limited to 'src/Index.cpp')
-rwxr-xr-xsrc/Index.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Index.cpp b/src/Index.cpp
index 6406e0f..0815f25 100755
--- a/src/Index.cpp
+++ b/src/Index.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2005-2012, John Hurst
+Copyright (c) 2005-2021, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -34,8 +34,8 @@ const ui32_t kl_length = ASDCP::SMPTE_UL_LENGTH + ASDCP::MXF_BER_LENGTH;
//
-ASDCP::MXF::IndexTableSegment::IndexTableSegment(const Dictionary*& d) :
- InterchangeObject(d), m_Dict(d), RtFileOffset(0), RtEntryOffset(0),
+ASDCP::MXF::IndexTableSegment::IndexTableSegment(const Dictionary* d) :
+ InterchangeObject(d), RtFileOffset(0), RtEntryOffset(0),
IndexStartPosition(0), IndexDuration(0), EditUnitByteCount(0),
IndexSID(129), BodySID(1), SliceCount(0), PosTableCount(0)
{
@@ -48,6 +48,13 @@ ASDCP::MXF::IndexTableSegment::~IndexTableSegment()
{
}
+ASDCP::MXF::IndexTableSegment::IndexTableSegment(const IndexTableSegment& rhs) : InterchangeObject(rhs.m_Dict)
+{
+ assert(m_Dict);
+ m_UL = m_Dict->ul(MDD_IndexTableSegment);
+ Copy(rhs);
+}
+
//
void
ASDCP::MXF::IndexTableSegment::Copy(const IndexTableSegment& rhs)
@@ -66,6 +73,13 @@ ASDCP::MXF::IndexTableSegment::Copy(const IndexTableSegment& rhs)
}
//
+ASDCP::MXF::InterchangeObject*
+ASDCP::MXF::IndexTableSegment::Clone() const
+{
+ return new IndexTableSegment(*this);
+}
+
+//
ASDCP::Result_t
ASDCP::MXF::IndexTableSegment::InitFromTLVSet(TLVReader& TLVSet)
{