delete Block.group;
}
- operator KaxBlockGroup &();
+ operator KaxBlockGroup &() const;
operator const KaxBlockGroup &() const;
- operator KaxSimpleBlock &();
- operator KaxInternalBlock &();
+ operator KaxSimpleBlock &() const;
+ operator KaxInternalBlock &() const;
operator const KaxInternalBlock &() const;
void SetBlockGroup( KaxBlockGroup &BlockRef );
return _Result;
}
-KaxBlockBlob::operator KaxBlockGroup &()
+KaxBlockBlob::operator KaxBlockGroup &() const
{
assert(!bUseSimpleBlock);
assert(Block.group);
return *Block.group;
}
-KaxBlockBlob::operator KaxInternalBlock &()
+KaxBlockBlob::operator KaxInternalBlock &() const
{
assert(Block.group);
if (bUseSimpleBlock)
return *Block.group;
}
-KaxBlockBlob::operator KaxSimpleBlock &()
+KaxBlockBlob::operator KaxSimpleBlock &() const
{
assert(bUseSimpleBlock);
assert(Block.simpleblock);
Block.simpleblock->SetDiscardable(false);
} else {
Block.simpleblock->SetKeyframe(false);
- if ((!ForwBlock || static_cast<const KaxInternalBlock &>(*ForwBlock).GlobalTimecode() <= timecode) &&
- (!PastBlock || static_cast<const KaxInternalBlock &>(*PastBlock).GlobalTimecode() <= timecode))
+ if ((!ForwBlock || static_cast<KaxInternalBlock &>(*ForwBlock).GlobalTimecode() <= timecode) &&
+ (!PastBlock || static_cast<KaxInternalBlock &>(*PastBlock).GlobalTimecode() <= timecode))
Block.simpleblock->SetDiscardable(false);
else
Block.simpleblock->SetDiscardable(true);
assert(RefdBlock);
assert(ParentBlock);
- const auto &block = static_cast<const KaxInternalBlock&>(*RefdBlock);
+ auto &block = static_cast<KaxInternalBlock&>(*RefdBlock);
SetValue(static_cast<std::int64_t>(block.GlobalTimecode()) - static_cast<std::int64_t>(ParentBlock->GlobalTimecode()) / static_cast<std::int64_t>(ParentBlock->GlobalTimecodeScale()));
}
return EbmlSInteger::UpdateSize(bSaveDefault, bForceRender);
// look for the element in the temporary references
auto it = std::find_if(myTempReferences.begin(), myTempReferences.end(),
[&](const KaxBlockBlob *myTempReference)
- { const auto &refTmp = static_cast<const KaxInternalBlock &>(*myTempReference);
+ { auto& refTmp = static_cast<KaxInternalBlock &>(*myTempReference);
return refTmp.GlobalTimecode() == BlockRef.GlobalTimecode()
&& refTmp.TrackNum() == BlockRef.TrackNumber(); });
void KaxCuePoint::PositionSet(const KaxBlockBlob & BlobReference, std::uint64_t GlobalTimecodeScale)
{
- const auto &BlockReference = static_cast<const KaxInternalBlock&>(BlobReference);
+ auto &BlockReference = static_cast<KaxInternalBlock&>(BlobReference);
const KaxBlockGroup *BlockGroupPointer = nullptr;
if (!BlobReference.IsSimpleBlock()) {
- const auto &BlockGroup = static_cast<const KaxBlockGroup&>(BlobReference);
+ auto &BlockGroup = static_cast<KaxBlockGroup&>(BlobReference);
BlockGroupPointer = &BlockGroup;
}
PositionSet(BlockReference, BlockGroupPointer, GlobalTimecodeScale);
*/
void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, std::uint64_t GlobalTimecodeScale)
{
- const auto& theBlock = static_cast<const KaxInternalBlock&>(BlockReference);
- auto & NewTime = GetChild<KaxCueRefTime>(*this);
+ auto& theBlock = static_cast<KaxInternalBlock&>(BlockReference);
+ auto& NewTime = GetChild<KaxCueRefTime>(*this);
*static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;
auto & TheClustPos = GetChild<KaxCueRefCluster>(*this);