Jump to content
  • Advertisement
Sign in to follow this  

VMR-9 - can't detect when movie has ended

This topic is 4115 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am using VMR-9 to render videos, like the sample VMR9allocator. Unfortunately, I cannot tell if the video has ended playing. The sample uses this code:
//CComPtr<IMediaControl> g_mediaControl;

        OAFilterState state;
        g_mediaControl->GetState(0, & state );

Unfortunately, when the video has ended, state continues to be 'State_Running'. Can anyone suggest an alternative way? Simon

Share this post

Link to post
Share on other sites
Hi ,you cannot test if the movie ended using the state , instead try something like this:

CComPtr<IMediaEvent> m_pEvent;
m_pGraph->QueryInterface(IID_IMediaEvent, reinterpret_cast<void**>(&m_pEvent));


long evCode = 0;
m_pEvent->WaitForCompletion(0, &evCode);


// movie ended


Hope this helps

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!