FastLED 3.9.15
Loading...
Searching...
No Matches

◆ durationMicros()

i32 fl::video::VideoImpl::durationMicros ( ) const

Definition at line 76 of file video_impl.cpp.hpp.

76 {
77 if (!mStream) {
78 return -1;
79 }
80 i32 frames = mStream->framesRemaining();
81 if (frames < 0) {
82 return -1; // Stream case, duration unknown
83 }
84 fl::u32 micros_per_frame =
85 mFrameInterpolator->getFrameTracker().microsecondsPerFrame();
86 return (frames * micros_per_frame); // Convert to milliseconds
87}
FrameInterpolatorPtr mFrameInterpolator
Definition video_impl.h:69
PixelStreamPtr mStream
Definition video_impl.h:67

References mFrameInterpolator, and mStream.