Skip to content

cf_video_update

Category: video
GitHub: cute_video.h


Advances playback by an elapsed time, decoding a frame when one is due.

bool cf_video_update(CF_Video* video, float dt);
Parameters Description
video The video.
dt Seconds elapsed, usually CF_DELTA_TIME.

Return Value

Returns true if a new frame became current on this call.

Remarks

Call this once a frame and draw cf_video_texture regardless of what it returns -- a video slower than the display simply keeps showing the picture it is on. A single call never decodes more than a few frames, so a long stall drops behind rather than freezing the game catching up. At the end of the file this stops, unless cf_video_set_looped says otherwise.

CF_Video
cf_video_next_frame
cf_video_texture
cf_video_set_looped
cf_video_is_finished