Sign in to follow this  

DirectShow HELP!!!

This topic is 4685 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

I want to play animations when the player clicks a hotspot on the screen. Im using VC++ 6.0 and DirectX 8.1. I simply want to play video with sound, then resume as I left off before the video. I have looked at some tutorials for DirectShow, but am fairly lost with it. The DX 8.1 SDK includes a program titled Cutscene that provides a function to play a video. I would like to integrate this into my program, but am having trouble. The cutscene function creates a new window, then changes the video settings and goes to fullscreen mode. I can get the program to play my video, but the program does not resume correctly. How can I integrate the Cutscene function into my existing window so that the video just plays on top of what is already there without changing any video settings, then resumes? The relevant code is at: http://www.t7g3.com/Pages/source.zip

Share this post


Link to post
Share on other sites
Hello.

I don't really have time to go into this now but there are some really good tutorials over on Flipcode.com here:

http://www.flipcode.com/articles/index.shtml

Look for 'DirectShow For Media Playback In Windows by Chris Thompson'.

There is also a vert simple example here on Gamedev.net.

Mark Coleman.

Share this post


Link to post
Share on other sites
Thanks for the help! I am able to get DirectShow to play video in my application now. I still have a couple problems, though. The video usually plays through it's duration, then stops and resumes gameplay. On some occasions, the animation flashes for a second, then stops. The pattern seems to be random, and I cannot predict failure. The program seems to succeed on the first run, then after closing the app and restarting, it fails. However, this isn't always the case. Any ideas what may cause this? What should i look for?

The game loop calls a redrawFrame function that sends an image to the backbuffer, then to the screen, but I have set flags when in video mode to cease this until the video is complete. I have set up a windows event handler to check for the end of the video; the animation fails to run even when the event handler is bypassed. I'm not sure what else to look for. Any ideas?

Share this post


Link to post
Share on other sites

This topic is 4685 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this