Video playback loop at 25 frames per second
You get a VideoPlayer with a Read() that returns the next frame and a call that renders a frame. Write the playback loop: frames must be shown at a steady 25 frames per second even though reading takes a variable amount of time. Use threads safely, for example a reader thread filling a bounded buffer and a renderer drawing on a fixed clock, and handle the end of the video.
No answer yet. Write the first one; the best answer gets endorsed.
