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

Method ResolveMaskSourceDuration

src/EffectBase.cpp:342–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342double EffectBase::ResolveMaskSourceDuration() const {
343 if (!mask_reader)
344 return 0.0;
345
346 if (mask_reader->info.duration > 0.0f)
347 return static_cast<double>(mask_reader->info.duration);
348
349 if (mask_reader->info.video_length > 0 &&
350 mask_reader->info.fps.num > 0 && mask_reader->info.fps.den > 0) {
351 return static_cast<double>(mask_reader->info.video_length) / mask_reader->info.fps.ToDouble();
352 }
353
354 return 0.0;
355}
356
357int64_t EffectBase::MapMaskFrameNumber(int64_t frame_number) {
358 if (!mask_reader)

Callers

nothing calls this directly

Calls 1

ToDoubleMethod · 0.80

Tested by

no test coverage detected