本文整理汇总了C++中ofx::Clip::getFrameRange方法的典型用法代码示例。如果您正苦于以下问题:C++ Clip::getFrameRange方法的具体用法?C++ Clip::getFrameRange怎么用?C++ Clip::getFrameRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::Clip
的用法示例。
在下文中一共展示了Clip::getFrameRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/* override the time domain action, only for the general context */
bool
RetimerPlugin::getTimeDomain(OfxRangeD &range)
{
// this should only be called in the general context, ever!
if(getContext() == OFX::eContextGeneral) {
// If we are a general context, we can changed the duration of the effect, so have a param to do that
// We need a separate param as it is impossible to derive this from a speed param and the input clip
// duration (the speed may be animating or wired to an expression).
double duration = duration_->getValue(); //don't animate
// how many frames on the input clip
OfxRangeD srcRange = srcClip_->getFrameRange();
range.min = 0;
range.max = srcRange.max * duration;
return true;
}
return false;
}