MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / GetMaxFrame

Method GetMaxFrame

src/Timeline.cpp:479–484  ·  view source on GitHub ↗

Compute the highest frame# based on the latest time and FPS

Source from the content-addressed store, hash-verified

477
478// Compute the highest frame# based on the latest time and FPS
479int64_t Timeline::GetMaxFrame() {
480 const double fps = info.fps.ToDouble();
481 const double t = GetMaxTime();
482 // Inclusive start, exclusive end -> ceil at the end boundary
483 return static_cast<int64_t>(std::ceil(t * fps));
484}
485
486// Compute the first frame# based on the first clip position
487int64_t Timeline::GetMinFrame() {

Callers 4

isReadyMethod · 0.80
resolveTimelineEndMethod · 0.80
Timeline.cppFile · 0.80
mainFunction · 0.80

Calls 1

ToDoubleMethod · 0.80

Tested by

no test coverage detected