| 74 | } |
| 75 | |
| 76 | i32 VideoImpl::durationMicros() const { |
| 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 | } |
| 88 | |
| 89 | bool VideoImpl::draw(fl::u32 now, fl::span<CRGB> leds) { |
| 90 | if (!mTime) { |
nothing calls this directly
no test coverage detected