diff options
| author | jhurst <jhurst@cinecert.com> | 2021-04-13 15:50:50 -0700 |
|---|---|---|
| committer | jhurst <jhurst@cinecert.com> | 2021-04-13 15:50:50 -0700 |
| commit | b14d706a72c706c9c59dbdf64a9e41f32465e060 (patch) | |
| tree | 642c62a644544afb531a8fdbfd4e610bb72728ed /src/AS_02_internal.h | |
| parent | 4e0891ab9ee94b822043126ea07e97641015e9b7 (diff) | |
o Added a Clone() method to InterchangeObject and derivatives
that allows making a descriptor copy that is not owned by
any other strucure. The caller must arrange to delete the
object pointer returned.
o While implementing the above it became obvious that the
reference-to-a-pointer-to-the-dictionary idiom that is used
throughout the lower levels of the MXF library was the
cause of much more grief than it was originally designed to
prevent. This was made even more obvious when I replaced all
of it with simple pointers, which revealed several shadow
instances of m_Dict that were only reliable while the object
that held them was valid.
Diffstat (limited to 'src/AS_02_internal.h')
| -rw-r--r-- | src/AS_02_internal.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/AS_02_internal.h b/src/AS_02_internal.h index b5d8282..c998003 100644 --- a/src/AS_02_internal.h +++ b/src/AS_02_internal.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2011-2018, Robert Scheler, Heiko Sparenberg Fraunhofer IIS, +Copyright (c) 2011-2021, Robert Scheler, Heiko Sparenberg Fraunhofer IIS, John Hurst All rights reserved. @@ -60,7 +60,7 @@ namespace AS_02 h__AS02Reader(); public: - h__AS02Reader(const ASDCP::Dictionary&); + h__AS02Reader(const ASDCP::Dictionary*); virtual ~h__AS02Reader(); Result_t OpenMXFRead(const std::string& filename); @@ -90,10 +90,10 @@ namespace AS_02 AS02IndexWriterVBR(); public: - const ASDCP::Dictionary*& m_Dict; + const ASDCP::Dictionary* m_Dict; ASDCP::IPrimerLookup* m_Lookup; - AS02IndexWriterVBR(const ASDCP::Dictionary*&); + AS02IndexWriterVBR(const ASDCP::Dictionary*); virtual ~AS02IndexWriterVBR(); // @@ -121,12 +121,12 @@ namespace AS_02 AS02IndexWriterCBR(); public: - const ASDCP::Dictionary*& m_Dict; + const ASDCP::Dictionary* m_Dict; ASDCP::IPrimerLookup* m_Lookup; ui32_t m_Duration; ui32_t m_SampleSize; - AS02IndexWriterCBR(const ASDCP::Dictionary*&); + AS02IndexWriterCBR(const ASDCP::Dictionary*); virtual ~AS02IndexWriterCBR(); // @@ -154,8 +154,8 @@ namespace AS_02 ui64_t m_ECStart; // offset of the first essence element // - h__AS02Writer(const ASDCP::Dictionary& d) : - ASDCP::MXF::TrackFileWriter<ASDCP::MXF::OP1aHeader>(d), m_IndexWriter(m_Dict), m_ECStart(0) {} + h__AS02Writer(const ASDCP::Dictionary *d) : + ASDCP::MXF::TrackFileWriter<ASDCP::MXF::OP1aHeader>(d), m_IndexWriter(d), m_ECStart(0) {} ~h__AS02Writer() {} @@ -305,7 +305,7 @@ namespace AS_02 public: IndexStrategy_t m_IndexStrategy; // per SMPTE ST 2067-5 - h__AS02WriterFrame(const Dictionary&); + h__AS02WriterFrame(const Dictionary*); virtual ~h__AS02WriterFrame(); Result_t WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,const byte_t* EssenceUL, @@ -324,7 +324,7 @@ namespace AS_02 ui64_t m_ClipStart; // state variable for clip-wrap-in-progress IndexStrategy_t m_IndexStrategy; // per SMPTE ST 2067-5 - h__AS02WriterClip(const Dictionary&); + h__AS02WriterClip(const Dictionary*); virtual ~h__AS02WriterClip(); bool HasOpenClip() const; |
