Movie Shutdown

When used with multi-threaded rendering, the GFx::Movie Release operation may need to be serviced by the render thread if it is executed before renderer objects are destroyed; servicing is required to release any render thread references to data structures that may be internal to the movie. By default, the movie shutdown command will be queued from Movie destructor through the Render::ThreadCommandQueue interface mentioned earlier. Developers must implement the ThreadCommandQueue interface to ensure proper shutdown.

As an alternative to servicing the command queue on the render thread, advance thread can use movie shutdown polling interface to first initiate a shutdown and then wait for it to be complete before releasing the movie. To do so, first call Movie::ShutdownRendering(false) to initiate shutdown and then use Movie::IsShutdownRenderingComplete to test for its completion every frame. On the render thread, NextCapture will handle the initiated shutdown and return false. Once shutdown is processed, advance thread can execute movie release without blocking.