diff options
| author | jhurst <jhurst@cinecert.com> | 2013-12-15 23:34:13 +0000 |
|---|---|---|
| committer | jhurst <> | 2013-12-15 23:34:13 +0000 |
| commit | 7f373b689817ee70fbe5d6a14cb0512b5260f77c (patch) | |
| tree | 0b182f46691f1420e18be08ea1952a818c546f94 /src/MXF.cpp | |
| parent | 1f41555bcf96369227cda526e36196fe512f464e (diff) | |
o Added preliminary support for timed-text wrapping for AS-02. This
work will require changes in SMPTE ST 429-5 and perhaps other
standards work, so files created with this implementation are
"speculative". Publication of the revised ST 429-5 may not occur
until early 2015.
o Moved LocalFilenameResolver into the AS_DCP public API so that it
can be used by other modules including AS-02.
o Fixed wave wrapping UL in clip-wrapped AS-02 files. Renamed some
UL constants to reflect "clip" or "frame" wrapping.
o Re-factored JP2K_PDesc_to_MD() and MD_to_JP2K_PDesc() to work
with GenericPictureEssenceDescriptor objects.
o Fixed a bug that was suppressing PictureComponentSizing,
CodingStyleDefault and QuantizationDefault when writing the
essence descriptor in a JP2K file (AS-DCP and AS-02).
o Fixed the version byte on the following UL values:
StereoscopicPictureSubDescriptor
GenericPictureEssenceDescriptor_ColorPrimaries
GenericPictureEssenceDescriptor_ActiveHeight
GenericPictureEssenceDescriptor_ActiveWidth
GenericPictureEssenceDescriptor_ActiveXOffset
GenericPictureEssenceDescriptor_ActiveYOffset
o Added some essence descriptor options to as-02-wrap.
o Added TTML timed-text wrapping option to as-02-wrap.
o Changed bit rate display in asdcp-info from mebi-bits/s to
mega-bits/s.
o Added "SMPTE" / "Interop" format type display to asdcp-info.
o Modified asdcp-wrap to assume -L when wrapping timed-text (since
there is no MXF text wrapping for Interop.)
o Fixed missing-index-partion bugs for AS-02 files.
Diffstat (limited to 'src/MXF.cpp')
| -rwxr-xr-x | src/MXF.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/MXF.cpp b/src/MXF.cpp index 15a9ba0..02bf1e9 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -1099,17 +1099,17 @@ ASDCP::MXF::OPAtomIndexFooter::WriteToFile(Kumu::FileWriter& Writer, ui64_t dura std::list<InterchangeObject*>::iterator pl_i = m_PacketList->m_List.begin(); for ( ; pl_i != m_PacketList->m_List.end() && ASDCP_SUCCESS(result); pl_i++ ) { - if ( (*pl_i)->IsA(OBJ_TYPE_ARGS(IndexTableSegment)) ) + IndexTableSegment *segment = dynamic_cast<IndexTableSegment*>(*pl_i); + + if ( segment != 0 ) { iseg_count++; - IndexTableSegment* Segment = (IndexTableSegment*)(*pl_i); - if ( m_BytesPerEditUnit != 0 ) { if ( iseg_count != 1 ) return RESULT_STATE; - Segment->IndexDuration = duration; + segment->IndexDuration = duration; } } @@ -1186,28 +1186,29 @@ ASDCP::MXF::OPAtomIndexFooter::Lookup(ui32_t frame_num, IndexTableSegment::Index std::list<InterchangeObject*>::iterator li; for ( li = m_PacketList->m_List.begin(); li != m_PacketList->m_List.end(); li++ ) { - if ( (*li)->IsA(OBJ_TYPE_ARGS(IndexTableSegment)) ) + IndexTableSegment *segment = dynamic_cast<IndexTableSegment*>(*li); + + if ( segment != 0 ) { - IndexTableSegment* Segment = (IndexTableSegment*)(*li); - ui64_t start_pos = Segment->IndexStartPosition; + ui64_t start_pos = segment->IndexStartPosition; - if ( Segment->EditUnitByteCount > 0 ) + if ( segment->EditUnitByteCount > 0 ) { if ( m_PacketList->m_List.size() > 1 ) DefaultLogSink().Error("Unexpected multiple IndexTableSegment in CBR file\n"); - if ( ! Segment->IndexEntryArray.empty() ) + if ( ! segment->IndexEntryArray.empty() ) DefaultLogSink().Error("Unexpected IndexEntryArray contents in CBR file\n"); - Entry.StreamOffset = (ui64_t)frame_num * Segment->EditUnitByteCount; + Entry.StreamOffset = (ui64_t)frame_num * segment->EditUnitByteCount; return RESULT_OK; } else if ( (ui64_t)frame_num >= start_pos - && (ui64_t)frame_num < (start_pos + Segment->IndexDuration) ) + && (ui64_t)frame_num < (start_pos + segment->IndexDuration) ) { ui64_t tmp = frame_num - start_pos; assert(tmp <= 0xFFFFFFFFL); - Entry = Segment->IndexEntryArray[(ui32_t) tmp]; + Entry = segment->IndexEntryArray[(ui32_t) tmp]; return RESULT_OK; } } @@ -1375,7 +1376,7 @@ ASDCP::MXF::InterchangeObject::Dump(FILE* stream) bool ASDCP::MXF::InterchangeObject::IsA(const byte_t* label) { - if ( m_KLLength == 0 ) + if ( m_KLLength == 0 || m_KeyStart == 0 ) return false; return ( memcmp(label, m_KeyStart, SMPTE_UL_LENGTH) == 0 ); |
