MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getFrameRate

Method getFrameRate

Engine/OfxClipInstance.cpp:402–424  ·  view source on GitHub ↗

Frame Rate -

Source from the content-addressed store, hash-verified

400
401// Frame Rate -
402double
403OfxClipInstance::getFrameRate() const
404{
405 /*
406 The frame rate property cannot be held onto images, hence return the "actual" frame rate,
407 taking into account the node from which the image came from wrt the identity state
408 */
409 EffectInstancePtr effect = getEffectHolder();
410
411 if ( isOutput() || (getName() == CLIP_OFX_ROTO) ) {
412 return effect->getFrameRate();
413 }
414
415 EffectInstancePtr inputNode = getAssociatedNode();
416 if (inputNode) {
417 inputNode = inputNode->getNearestNonIdentity( effect->getCurrentTime() );
418 }
419 if (!inputNode) {
420 return effect->getApp()->getProjectFrameRate();
421 } else {
422 return inputNode->getFrameRate();
423 }
424}
425
426// overridden from OFX::Host::ImageEffect::ClipInstance
427// Frame Range (startFrame, endFrame) -

Callers 1

getUnmappedFrameRateMethod · 0.45

Calls 6

isOutputFunction · 0.85
getNameFunction · 0.85
getNearestNonIdentityMethod · 0.80
getCurrentTimeMethod · 0.45
getProjectFrameRateMethod · 0.45
getAppMethod · 0.45

Tested by

no test coverage detected