VDesc.ColorSiting = VDescObj->ColorSiting;
VDesc.CodedContentType = VDescObj->CodedContentType;
- VDesc.LowDelay = VDescObj->LowDelay == 0 ? false : true;
+ VDesc.LowDelay = VDescObj->LowDelay.get() == 0 ? false : true;
VDesc.BitRate = VDescObj->BitRate;
VDesc.ProfileAndLevel = VDescObj->ProfileAndLevel;
return RESULT_OK;
h__Reader(const Dictionary& d) : ASDCP::h__ASDCPReader(d) {}
virtual ~h__Reader() {}
- Result_t OpenRead(const char*);
+ Result_t OpenRead(const std::string&);
Result_t ReadFrame(ui32_t, FrameBuffer&, AESDecContext*, HMACContext*);
Result_t ReadFrameGOPStart(ui32_t, FrameBuffer&, AESDecContext*, HMACContext*);
Result_t FindFrameGOPStart(ui32_t, ui32_t&);
//
//
ASDCP::Result_t
-ASDCP::MPEG2::MXFReader::h__Reader::OpenRead(const char* filename)
+ASDCP::MPEG2::MXFReader::h__Reader::OpenRead(const std::string& filename)
{
Result_t result = OpenMXFRead(filename);
if ( ASDCP_FAILURE(m_IndexAccess.Lookup(FrameNum, TmpEntry)) )
{
- DefaultLogSink().Error("Frame value out of range: %u\n", FrameNum);
return RESULT_RANGE;
}
if ( ASDCP_FAILURE(m_IndexAccess.Lookup(FrameNum, TmpEntry)) )
{
- DefaultLogSink().Error("Frame value out of range: %u\n", FrameNum);
return RESULT_RANGE;
}
if ( stream == 0 )
stream = stderr;
- fprintf(stream, "Frame: %06u, %c%-2hu, %7u bytes",
+ fprintf(stream, "Frame: %06u, %c%-2hhu, %7u bytes",
m_FrameNumber, FrameTypeChar(m_FrameType), m_TemporalOffset, m_Size);
if ( m_GOPStart )
// Open the file for reading. The file must exist. Returns error if the
// operation cannot be completed.
ASDCP::Result_t
-ASDCP::MPEG2::MXFReader::OpenRead(const char* filename) const
+ASDCP::MPEG2::MXFReader::OpenRead(const std::string& filename) const
{
return m_Reader->OpenRead(filename);
}
virtual ~h__Writer(){}
- Result_t OpenWrite(const char*, ui32_t HeaderSize);
+ Result_t OpenWrite(const std::string&, ui32_t HeaderSize);
Result_t SetSourceStream(const VideoDescriptor&);
Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0);
Result_t Finalize();
// Open the file for writing. The file must not exist. Returns error if
// the operation cannot be completed.
ASDCP::Result_t
-ASDCP::MPEG2::MXFWriter::h__Writer::OpenWrite(const char* filename, ui32_t HeaderSize)
+ASDCP::MPEG2::MXFWriter::h__Writer::OpenWrite(const std::string& filename, ui32_t HeaderSize)
{
if ( ! m_State.Test_BEGIN() )
return RESULT_STATE;
if ( ASDCP_SUCCESS(result) )
{
- result = WriteASDCPHeader(MPEG_PACKAGE_LABEL, UL(m_Dict->ul(MDD_MPEG2_VESWrapping)),
+ m_FooterPart.SetDeltaParams(IndexTableSegment::DeltaEntry(-1, 0, 0));
+
+ result = WriteASDCPHeader(MPEG_PACKAGE_LABEL, UL(m_Dict->ul(MDD_MPEG2_VESWrappingFrame)),
PICT_DEF_LABEL, UL(m_EssenceUL), UL(m_Dict->ul(MDD_PictureDataDef)),
m_VDesc.EditRate, derive_timecode_rate_from_edit_rate(m_VDesc.EditRate));
}
Entry.StreamOffset = m_StreamOffset;
if ( ASDCP_SUCCESS(result) )
- result = WriteEKLVPacket(FrameBuf, m_EssenceUL, Ctx, HMAC);
+ result = WriteEKLVPacket(FrameBuf, m_EssenceUL, MXF_BER_LENGTH, Ctx, HMAC);
if ( ASDCP_FAILURE(result) )
return result;
// Open the file for writing. The file must not exist. Returns error if
// the operation cannot be completed.
ASDCP::Result_t
-ASDCP::MPEG2::MXFWriter::OpenWrite(const char* filename, const WriterInfo& Info,
+ASDCP::MPEG2::MXFWriter::OpenWrite(const std::string& filename, const WriterInfo& Info,
const VideoDescriptor& VDesc, ui32_t HeaderSize)
{
if ( Info.LabelSetType == LS_MXF_SMPTE )