VB DX7 and AVI's!
gravyboyI can play avi's on a surface - using a 3rd party interface DLL - and I can display text on a surface. You'd think therefore that I can combine the two to show text on an AVI on a display surface..... Nope, the problem I have (apart from not being able to code c/c+/c++) is that the DLL I have will only play the AVI on the front-surface - so no flipping the back to the front.... I need to find a way of pushing the avi a frame at a time to an offscreen surface, then putting the text on another offscreen surface, blitting one onto the other, and then flipping the lot to the front and starting again.... Like I said the stumbling block is the AVI....any help will be appreciated...
AmrazekWhich 3rd-party DLL are you using?
gravyboyMichael Braitmaier's . . . for dx7. It writes single frames to the display surface...I really need to write to an off-screen plain surface to have the facility to blit the text onto it before flipping.
gravyboyI've just looked at the CAPS properties of the Video Renderer - PrimarySurface, VideoMemory, Visible . . . and I think that this is why the DLL writes to this surface.... If I set the surface as VideoMemory will this be invisible? ??:(??
Eric ColemanThat library is just for playing a video, not for getting individual frames of the avi file. I'm not familiar enough with the DirectShow portion of DirectX to help, so you might want to consider DirectX8, which I'm not sure if it allows you to read an avi file frame by frame, its just something to consider. Also, could try contacting the author of the DLL and asking him questions.
gravyboyI can use D'show to manipulate the video ie get each frame - my problem is how to expose the frame to a d'draw surface for overlaying.... As far as I can see in VB there isn't an interface for displaying d'show as d'draw surfaces.... And I'd love for someone to prove me wrong.
Eric ColemanThe problem is that microsoft didn't put the direct show information into the VB directx 7 type library, which is probably why Michael Braitmaier created that DLL in the first place. I have never had a need to play a video in my game, or at least to extract individual frames, so I don't know that much about direct show. As far as I know, your only options, which you may not like, are to either find some C++ source code and create a DLL that can extract the frames, or like I said before contact Michael and ask for some help. Game programming isn't easy, most of the time you'll have to find creative solutions to your problems, which for most people is why they like game programming; its a challenge. If you do succede with getting avi frames to a direct draw surface, you could write a tutorial on it or something describing what you had to do.