summaryrefslogtreecommitdiff
path: root/src/AS_02_IAB.cpp
diff options
context:
space:
mode:
authormilla <marc.illa@dolby.com>2021-05-26 14:13:38 +0200
committermilla <marc.illa@dolby.com>2021-06-03 14:12:33 +0200
commitc45055937fb80cf78384e942dea0a57b5bf4b14c (patch)
treebdc6e5ad02c185da6ef55452b67406c1c64fe1fe /src/AS_02_IAB.cpp
parentf9d7fbc33aa571c547d916b145712469efd9f4b8 (diff)
Added API functions in AS_02_IAB.h: AddDmsGenericPartUtf8Text for write and ReadGenericStreamPartitionPayload for read. These functions are a wrapper so that the writer and reader call their implementation of AddDmsGenericPartUtf8Text and ReadGenericStreamPartitionPayload respectively. In the case of the AddDmsGenericPartUtf8Text 2 new parameters have been added: trackDescription and dataDescription.
Diffstat (limited to 'src/AS_02_IAB.cpp')
-rw-r--r--src/AS_02_IAB.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/AS_02_IAB.cpp b/src/AS_02_IAB.cpp
index aa551d9..8aea196 100644
--- a/src/AS_02_IAB.cpp
+++ b/src/AS_02_IAB.cpp
@@ -264,6 +264,17 @@ AS_02::IAB::MXFWriter::WriteFrame(const ui8_t* frame, ui32_t sz) {
}
Result_t
+AS_02::IAB::MXFWriter::AddDmsGenericPartUtf8Text(const ASDCP::FrameBuffer& FrameBuf, ASDCP::AESEncContext* Ctx,
+ ASDCP::HMACContext* HMAC, const std::string& trackDescription, const std::string& dataDescription)
+{
+ if ( m_Writer.empty() )
+ return RESULT_INIT;
+
+ m_Writer->FlushIndexPartition();
+ return m_Writer->AddDmsGenericPartUtf8Text(FrameBuf, Ctx, HMAC, trackDescription, dataDescription);
+}
+
+Result_t
AS_02::IAB::MXFWriter::Finalize() {
/* are we running */
@@ -591,6 +602,17 @@ AS_02::IAB::MXFReader::ReadFrame(ui32_t frame_number, AS_02::IAB::MXFReader::Fra
}
Result_t
+AS_02::IAB::MXFReader::ReadGenericStreamPartitionPayload(const ui32_t SID, ASDCP::FrameBuffer& frame_buf)
+{
+ if ( m_Reader && m_Reader->m_File->IsOpen() )
+ {
+ return m_Reader->ReadGenericStreamPartitionPayload(SID, frame_buf, 0, 0 /*no encryption*/);
+ }
+
+ return RESULT_INIT;
+}
+
+Result_t
AS_02::IAB::MXFReader::FillWriterInfo(WriterInfo& Info) const {
/* are we already running */