Directshow does not repaint while a movie clip is paused.
Posted on 2003-11-20
I have made a little movie player box in a dialog I have, outputing the video to a static control. Everything works great except for when I pause the player and open a window over the application, when I make the app visible again, the video is gone and directshow does not repaint the paused frame. During playback everything works great. Here is the code that responds to events:
// Function to take care of graph notication codes
long lCode, lParam1, lParam2;
LONGLONG pos = 0;
// If the IMediaEventEx pointer is NULL return
// to avoid an error
if ( cTrailer.pEvent == NULL )
while ( SUCCEEDED(cTrailer.pEvent->GetEvent(&lCode, &lParam1, &lParam2, 0)) )
cTrailer.pEvent->FreeEventParams(lCode, lParam1, lParam2);
// Reset to first frame of movie
cTrailer.pSeek->SetPositions(&pos, AM_SEEKING_AbsolutePositioning ,
I have tried handling EC_REPAINT but with no success. I am somehow conviced it has to do with the static control but I can't find a workaround.