diff options
| author | jelkins <jelkins@cinecert.com> | 2020-10-09 11:45:53 -0700 |
|---|---|---|
| committer | jelkins <jelkins@cinecert.com> | 2020-10-09 11:45:53 -0700 |
| commit | fa71fce41f9fe79ab27a35461d625931d21f588a (patch) | |
| tree | 209356efbe9698f548b7eea3a57671d74f834cd6 /src/MXF.cpp | |
| parent | 082323548f0390c9dd9d331f48aa3ed9362a30c6 (diff) | |
add new function to calculate ContainerDuration from IndexTableSegment
Diffstat (limited to 'src/MXF.cpp')
| -rwxr-xr-x | src/MXF.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/MXF.cpp b/src/MXF.cpp index c5cc07e..813ee15 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -1231,6 +1231,25 @@ ASDCP::MXF::OPAtomIndexFooter::GetMDObjectsByType(const byte_t* ObjectID, std::l } // +ui64_t +ASDCP::MXF::OPAtomIndexFooter::ContainerDuration() const +{ + ui64_t container_duration = 0; + std::list<InterchangeObject*>::iterator li; + for ( li = m_PacketList->m_List.begin(); li != m_PacketList->m_List.end(); li++ ) + { + IndexTableSegment *segment = dynamic_cast<IndexTableSegment*>(*li); + + if ( segment != 0 ) + { + container_duration += segment->IndexDuration; + } + } + + return container_duration; +} + +// ASDCP::Result_t ASDCP::MXF::OPAtomIndexFooter::Lookup(ui32_t frame_num, IndexTableSegment::IndexEntry& Entry) const { |
