Archived

This topic is now archived and is closed to further replies.

Courtney

DirectShow Help (desparately) needed

Recommended Posts

Courtney    122
First let me start off by saying I am pretty new with DirectX and I may have a little difficulty with this but let me give it a try... I have a DirectDraw fullscreen game I am writing in C++. It is currently working along with my DirectSound background music...no problem so far. Now I need to play a video in an area on the game screen. I have gotten a video to display and it plays using DirectShow but there is a problem... Here is the symptom... The video flickers while playing Here is what I think is happening... The game is constantly redrawing the screen and uses page flipping. I believe that the DirectShow video renderer is simply blasting frames onto the directdraw primary surface and is not taking into account the secondary background surface, thus I am seeing video frames every over time I flip the surfaces. Any thoughts on what I am doing would be superb!! Is there a way to deal with this page flipping issue if in fact this is the issue? Should I be creating a new child window and displaying the video in that window? I tried using the default player window but of course it does not appear on top of the full screen exclusive application window. Help is desparately needed...failure is not an option! Thanks in advance! Courtney

Share this post


Link to post
Share on other sites
krez    443
um, i have never used DirectShow before, so my advice might be completely useless, but...
i assume you have to somehow tell DirectShow where to put it''s images, right? well, when you flip the surfaces, the primary and the backbuffer switch references... so maybe each time you flip them you need to re-assign where the DirectShow draws to?

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
Courtney    122
More info...

I just realized that I probably should have also stated I am using the DirectDraw 8 SDK... I am not using Direct3D as this is a 2D game.

I have looked at the PlayWnd sample in the DirectShow samples folder and this is the code I stole for my use. In particular the PlayMovieInWindow() function.

Share this post


Link to post
Share on other sites
Courtney    122
It would sure be nice if that was all there was to it...

From what I can tell in the PlayMovieInWindow() function from the PlayWnd sample code... The only thing I am really doing is using the PutOwner() function passing in the handle to the main application window...no where in this sample code does it seem to do anything above and beyond that (such as telling DirectShow what surface to render on....)

Still DESPARATELY need someone out there who has tackled this before!

Share this post


Link to post
Share on other sites
krez    443
hmm... maybe it is drawing the DirectShow stuff onto the actual form? perhaps you cannot use DirectShow in full-screen mode?
once again i am probably wrong, and i am going to shut up now...

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites