Merge pull request #25 from remia/fix/non-pod-variadic-warning
[asdcplib.git] / src / h__02_Writer.cpp
index 37393caf91903f18b5712c6ced5b7bca839dd941..9b1c6c6d27625db4d94b3e77825ae455b62d6038 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2011-2016, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
+Copyright (c) 2011-2018, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
 John Hurst
 
 All rights reserved.
@@ -47,6 +47,7 @@ AS_02::MXF::AS02IndexWriterVBR::AS02IndexWriterVBR(const ASDCP::Dictionary*& d)
 {
   BodySID = 0;
   IndexSID = 129;
+  MinorVersion = 3;
 }
 
 AS_02::MXF::AS02IndexWriterVBR::~AS02IndexWriterVBR() {}
@@ -165,6 +166,11 @@ AS_02::MXF::AS02IndexWriterVBR::PushIndexEntry(const IndexTableSegment::IndexEnt
   m_CurrentSegment->IndexEntryArray.push_back(Entry);
 }
 
+void
+AS_02::MXF::AS02IndexWriterVBR::SetEditRate(const ASDCP::Rational& edit_rate)
+{
+  m_EditRate = edit_rate;
+}
 
 //------------------------------------------------------------------------------------------
 //
@@ -177,12 +183,14 @@ AS_02::h__AS02WriterFrame::~h__AS02WriterFrame() {}
 
 //
 Result_t
-AS_02::h__AS02WriterFrame::WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,const byte_t* EssenceUL, AESEncContext* Ctx, HMACContext* HMAC)
+AS_02::h__AS02WriterFrame::WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,const byte_t* EssenceUL,
+                                          const ui32_t& MinEssenceElementBerLength,
+                                          AESEncContext* Ctx, HMACContext* HMAC)
 {
   ui64_t this_stream_offset = m_StreamOffset; // m_StreamOffset will be changed by the call to Write_EKLV_Packet
 
   Result_t result = Write_EKLV_Packet(m_File, *m_Dict, m_HeaderPart, m_Info, m_CtFrameBuf, m_FramesWritten,
-                                     m_StreamOffset, FrameBuf, EssenceUL, Ctx, HMAC);
+                                     m_StreamOffset, FrameBuf, EssenceUL, MinEssenceElementBerLength, Ctx, HMAC);
 
   if ( KM_SUCCESS(result) )
     {  
@@ -223,6 +231,7 @@ AS_02::MXF::AS02IndexWriterCBR::AS02IndexWriterCBR(const ASDCP::Dictionary*& d)
 {
   BodySID = 0;
   IndexSID = 129;
+  MinorVersion = 3;
 }
 
 AS_02::MXF::AS02IndexWriterCBR::~AS02IndexWriterCBR() {}