Full-screen, exclusive-mode video and D3D debugging
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.graphics only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... graphics Profile…
 Up
Full-screen, exclusive-mode video and D3D debugging         


Author: Doctor Bonzo
Date: Sep 2, 2008 10:39

I'm developing a video playback app using using a custom allocator-presenter
for VMR9, developed from one of the Dx9 SDK samples. On the release system,
this will be a full-screen, single-monitor display controlled via TCP. My
development system is dual monitor with a single graphics card (this means
single 'adapter', yes?). I would like to test the app by having the video
display full screen (exclusive mode) on one monitor and control it from a
telnet window on the other monitor. Video display is OK on one monitor until
I activate the telnet window on the other. At this point I get 'device lost'
and the video window minimizes itself. I sort of understand where the
'device lost' is coming from - though I'm not sure where the minimization is
happening. Exclusive-mode seems to...
Show full article (1.61Kb)
4 Comments
RE: Full-screen, exclusive-mode video and D3D debugging         


Author: Arto
Date: Sep 11, 2008 07:02

Hi,

Yes, you need to re-create the 3D device to go between fullscreen and
windowed. And yes, you can only use one display. I'd suggest using
accelerator keys to control the application from the keyboard while in
exclusive mode.

Yes, exclusive mode is the same as Windowed = FALSE in the parameters.

I did a solution for this some time ago and could provide some details if
you wish. As I recall, it is a bit tricky to go between exclusive and
windowed mode when using the VMR9 renderer. It leaves unreleased COM
interfaces if you don't do some tricks I'd need to go and look in my source
code.

As far as I know exclusive mode really means exlusive mode. It doesn't go
through the window manager or something so you can not really do anything in
any other window while using exclusive mode unless you let it lose its device
in the mean time.

Let me know if you need some more help.

Arto

"Doctor Bonzo" wrote:
> I'm developing a video playback app using using a custom allocator-presenter
> for VMR9, developed from one of the Dx9 SDK samples. On the release system,
> this will be a full-screen, single-monitor...
Show full article (2.59Kb)
no comments
RE: Full-screen, exclusive-mode video and D3D debugging         


Author: Doctor Bonzo
Date: Sep 11, 2008 08:34

Hi Arto,

Thanks very much for your reply.

I've been proceeding to develop with the presenter only in fullscreen,
exclusive mode and have had some success without switching between non- and
windowed modes. I find the terminology really confusing since there seems to
be at least 2 other uses of "exclusive mode" in the DirectX canon - one for
input devices and one for DirectDraw surfaces. For my own disambiguation,
I've been thinking in terms of windowed and non-windowed Direct3D devices.

I've discovered that if my WndProc claims to handle WM_NCACTIVATE messages,
then my app doesn't get minimized "behind my back" and I can effectively
debug in a 2 monitor system. Apparently someone hooks my app window and does
stuff when it loses focus through this message. I'm guessing that this
happens inside IDirect3D9::CreateDevice. This 'cheat' seems to keep me from
getting a device-lost return from IDirect3DDevice9::Present, too. I'm pretty
nervous about leaving this in a release build, though, since I don't know
what else might be going on. I'd love to know the whole story, but I haven't
been able to dig it out of any dox.
Show full article (2.12Kb)
no comments
RE: Full-screen, exclusive-mode video and D3D debugging         


Author: Arto
Date: Sep 11, 2008 13:42

Hi,

I uploaded my source code to my blog at
http://www.ostrogothia.com/?page_id=405 if you want to check it out. You can
find the code for resetting devices etc in the SyncVMR9 project in the
Allocator.cpp file, method CAllocator::ResetDevice. I now remember that you
have to release the *pins* of the VMR9 before reset and then reconnect them
again. I think you will recognize a lot in the source as it was started as a
tweak to the AllocatorPresenter demo project. I think it is possible under
some circumstances to recreate the device w/o releasing the pins but sooner
or later you run into trouble and you also end up leaking memory.

Are you sure that you need to run in exclusive mode? Fullscreen in
non-exclusive mode is much easier to handle because you don't need to
re-create the device. I did get much more fluid video in exclusive mode
though through better timing of the Present method.

Read more about the GothPlayer project on the blog pages.

Pls also note that I'm really an amateur programmer. I haven't written a
commercial line of code since 1989 :-) So there might be a few
"unconventional" solutions in the code. I don't think it leaks any memory
though.
Show full article (3.49Kb)
no comments
RE: Full-screen, exclusive-mode video and D3D debugging         


Author: Arto
Date: Sep 12, 2008 23:55

My ISP changed the IP address of my web site a couple of days ago during a
repair without notifying me so the source code that I published has probably
been unreachable for some time. I should be back on-line in 24 h or so. -A
no comments

RELATED THREADS
SubjectArticles qty Group
Re: Restrict FE application to one user at a time - "Exclusive" isn't Exclusive!comp.databases.msaccess ·