Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectShow Fullscreen (multi file problem)

Started by Chod Feb 17, 2004 at 12:09 AM 8 replies 2.8k views
Original Post
Chod
Chod
Hey guys, I am developing an app that needs to play 2 files one after the other in full screen mode. Now this sounds fairly simple and i have it working with one minor glitch. I used the PlayWnd example in the dx9 sdk as a template, but when i send the second file to be played it drops out of fullscreen for a second (not even a second) and then goes back into fullscreen. I want to find a way around this. Any ideas? It could be the way im loading the files... any tips, links or tutorials you guys could point me to? Thanks in advance, Chod.
booncol
booncol
try multithreaded device
or maybe vmr?
superjosh
superjosh
If you are rebuilding the graph everytime you play a new file, then that is probably the problem. The video renderer is removed and re-added, which would explain the flicker from fullscreen to non fullscreen.

You could try leaving the video renderer and manually connecting the pins, or if I remember correctly, there's a way to pass a flag to Render() which will render to existing renderers.

VMR would probably work better since it doesn't switch resolution. With VMR you make your video window the full size of the screen and it resizes the video acordingly. Also, with VMR you could do neat things like transitions, since it supports mixing of more than one video source.


[edited by - superjosh on February 17, 2004 1:37:00 AM]
Chod
Chod
Hey guys,

Okay well ive been trying to work out what does the "fullscreen dropout" and i have found the culprit but no work around.

When i release the IVideoWindow it drops out. But if i dont release it before i requery it... i get boned because of memory leaks. So any suggestions for a work around? I tried to assign the pVW to another pVW and then release the other after i have queried the first... does that make any sense?

Heres some code: (note this is a modified PlayWnd Sample from ms)

*pVW2 = *pVW;
JIF(pGB->QueryInterface(IID_IVideoWindow, (void **)&pVW));
pVW2->Release();
pVW2 = NULL;
Chod
Chod
Yea well like i said,

when i try to use the same Video Window (without releasing it safely every time) it causes a memory leak to occur. When i do release it and then reload it, i get the fullscreen dropout etc.

Its a lose lose situation Ill look in to VMR tmrw and hopefully that might solve my problems but if not im going to be getting grey hairs early in my life

Any help is appreciated!!!

Chod.

[edited by - Chod on February 23, 2004 5:50:27 AM]
Chod
Chod
Okay,

Well i cant find a decent VMR9 tutorial/example to show how to full screen clips, etc.

I have however tried a new approach. What i am trying to do is to create 2 sets of GraphBuilders and VideoWindows. When the first one stops i want to fullscreen the second one (which is already prepared) and while its running prepare the first one again. So this should solve my problem... BUT... i think its still dropping out. For me to change fullscreen from one video window to the next... the first one STILL must drop out.

There has to be a way around this? I saw that DES could help... anyone got experience with it? Or perhaps a VMR9 guru could drop a line?

Thanks again.

Chod.
Chod
Chod
Bump!

Come on guys, someone has to know something.

Any help is appreciated.

Chod.
eFoDay
eFoDay
could u use 2 graph builders and 1 video window?
Chod
Chod
Hrm,

Well im trying to figure out if the memory leak when re-using the same video window is because of all the graphs that are built or the video window itself.

If its because of the graphs then 2 graphs and 1 video window could work. Ill try that now...

However, if its the videowindows causing leaks then 2 graphs wont help

But thanks for the input.. keep it coming

Chod.

Topic Locked

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

Sign in to reply to this topic.