diff options
| author | mikey <mikey@cinecert.com> | 2013-04-12 23:39:31 +0000 |
|---|---|---|
| committer | mikey <> | 2013-04-12 23:39:31 +0000 |
| commit | 252740d6f7d8924c6af30e55d2da487356a0acdc (patch) | |
| tree | ba01aa630cf6cd11e7c286a60380aa35be916616 /src/h__Reader.cpp | |
| parent | c9e20228d6c328a0b446c1417e0082389ff045ff (diff) | |
Added atmos support and new ULs per SMPTE 429-2:2013 - see README for deets.
Diffstat (limited to 'src/h__Reader.cpp')
| -rwxr-xr-x | src/h__Reader.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp index da2aca2..77d732f 100755 --- a/src/h__Reader.cpp +++ b/src/h__Reader.cpp @@ -75,19 +75,26 @@ ASDCP::h__ASDCPReader::OpenMXFRead(const char* filename) if ( KM_SUCCESS(result) ) { - // if this is a three partition file, go to the body - // partition and read the partition pack - if ( m_HeaderPart.m_RIP.PairArray.size() > 2 ) - { - Array<RIP::Pair>::iterator r_i = m_HeaderPart.m_RIP.PairArray.begin(); - r_i++; - m_File.Seek((*r_i).ByteOffset); - result = m_BodyPart.InitFromFile(m_File); - } + // if this is a three partition file, go to the body + // partition and read the partition pack + if ( m_HeaderPart.m_RIP.PairArray.size() > 2 ) + { + Array<RIP::Pair>::iterator r_i = m_HeaderPart.m_RIP.PairArray.begin(); + r_i++; + m_File.Seek((*r_i).ByteOffset); + result = m_BodyPart.InitFromFile(m_File); + if( !ASDCP_SUCCESS(result) ) + { + DefaultLogSink().Error("ASDCP::h__Reader::OpenMXFRead, m_BodyPart.InitFromFile failed\n"); + } + } } + else + DefaultLogSink().Error("ASDCP::h__Reader::OpenMXFRead, TrackFileReader::OpenMXFRead failed\n"); + if ( KM_SUCCESS(result) ) - m_HeaderPart.BodyOffset = m_File.Tell(); + m_HeaderPart.BodyOffset = m_File.Tell(); return result; } @@ -148,6 +155,14 @@ ASDCP::h__ASDCPReader::ReadEKLVFrame(ui32_t FrameNum, ASDCP::FrameBuffer& FrameB EssenceUL, Ctx, HMAC); } +Result_t +ASDCP::h__ASDCPReader::LocateFrame(ui32_t FrameNum, Kumu::fpos_t& streamOffset, + i8_t& temporalOffset, i8_t& keyFrameOffset) +{ + return ASDCP::MXF::TrackFileReader<OPAtomHeader, OPAtomIndexFooter>::LocateFrame(m_HeaderPart, FrameNum, + streamOffset, temporalOffset, keyFrameOffset); +} + //------------------------------------------------------------------------------------------ // |
