DirectShow & D3D9 problems

Started by
4 comments, last by domin 18 years ago
Hi all. Sorry for my terrible english at first. I'am using DirectShow interfaces to play cut scenes im my game project. I'am using windowless mode (using the Video Mixing Renderer). I have following problems: 1. I'am using D3D9 to render graphics and using the same window to render cut scenes. When video finishes and D3D restarted rendering some strange artefact appears. It is hard to describie... Like groups of pixels in various colors... 2. Second thing - when I start my engine in windowed mode, play cut scene and start rendering after cut scene is complete FPS counter seems to be locked at 60 fps... So it look like DS forces vsync... 3. And last problem - sometimes video does not appear - only sound is playing. It happens randomly, without any rule... If anyone have any experience with DirectShow and D3D and have similar problems please reply...
Advertisement
Please help! If somebody has ANY sugestions abut this topic...
Any chance of a screenshot for 1)?

As for 2, If you're in fullscreen mode (Your window covers the entire screen), then if your D3D device's presentation parameters specify a presentation interval of D3DPRESENT_INTERVAL_ONE, then your app will wait for a v-sync. To disable v-sync, use D3DPRESENT_INTERVAL_IMMEDIATE.

For 3: No idea, sorry.

Generally, do you have the debug runtimes installed? That won't help too much with DirectShow I don't think, but D3D will show warnings and errors if you stick the debug output up to max.
Unfortunately I have no answers as such, but what you've described seems to be very similar to what I experienced a while back.

I've been meaning to revisit the code, but just haven't had time lately.

mrmrcoleman seemed posted some information about it a while back, you might want to browse through some these search results.

Quote:Original post by domin
1. I'am using D3D9 to render graphics and using the same window to render cut scenes. When video finishes and D3D restarted rendering some strange artefact appears. It is hard to describie... Like groups of pixels in various colors...
Are you absolutely sure that DirectShow is completely shut down and terminated?

Quote:Original post by domin
3. And last problem - sometimes video does not appear - only sound is playing. It happens randomly, without any rule...
That sounds like a video codec problem to me. But if you say it happens randomly then it could well be that the video is getting hidden behind something - I seem to remember that DShow did some funky stuff with creating new DC's/Windows, but I forget the details.

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Big thanks for your answers:

Evil Steve:

Quote:
Any chance of a screenshot for 1)?

Sorry, I don't have own web space to place it on...

Quote:
As for 2, If you're in fullscreen mode (Your window covers the entire screen), then if your D3D device's presentation parameters specify a presentation interval of D3DPRESENT_INTERVAL_ONE, then your app will wait for a v-sync. To disable v-sync, use D3DPRESENT_INTERVAL_IMMEDIATE.

Right, but I'm always using D3DPRESENT_INTERVAL_IMMEDIATE, so this is not the problem.

Quote:
Generally, do you have the debug runtimes installed? That won't help too much with DirectShow I don't think, but D3D will show warnings and errors if you stick the debug output up to max.

Yes, I'm using maximum debugging, but, like you say, DirectShow does not have any debug output like other DirectX components. D3D says nothing related to described problems.



jollyjeffers:

Quote:
Are you absolutely sure that DirectShow is completely shut down and terminated?

Absolutely - checked it 1000 times...

Quote:
That sounds like a video codec problem to me. But if you say it happens randomly then it could well be that the video is getting hidden behind something - I seem to remember that DShow did some funky stuff with creating new DC's/Windows, but I forget the details.

No, it is pure mpeg1 video, and on the same video file problems happens or not, depending on... who knows...

Anyway, thanks for your time.
Hi - one more thing - lastly I found that setting SwapEffect in D3DPRESENT_PARAMETERS to D3DSWAPEFFECT_COPY while creating D3D Device fixes all problems except one, FPS is reduced down to monitor freq. So I suppose that all problems are connected with method used by D3D to swap front and back buffers. Maybe D3DSWAPEFFECT_COPY synchronize in some way video displaying rate with swapping buffers...

Hope this give you some sugestions how to complete solve this problem.

This topic is closed to new replies.

Advertisement