Skip to main content
gamedev.net
🔒 Locked

DirectShow HELP!!!

Started by R67en 1 reply 1k views
Original Post
R67en
R67en
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
mrmrcoleman
mrmrcoleman
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.
R67en
R67en
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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.