content of screen

Started by
9 comments, last by _dogo 18 years ago
Hi, could anybody tell me where the content of screen is stored? i mean if there is more windows opened, only the current windows image is in the framebuffer, isnt it? for example if there is a movie and other programs running at a time, and they cover a part of each other (nothing can be seen totally, and nothing is hidden totally), what is the place that stores this visible screen? thanx
credo
Advertisement
Probably on the GPU, but it doesn't matter, because no matter where it is, you can't access it directly (for all intents and purposes).

What do you want to do, exactly? You may be able to get away with some kind of hooking process.
i want to make a modification to ANY content of screen.
I found a way to make this with dx8, dx9, oGL games with hooking (like Taksi), but dont know how to do this with movies.
further, the greatest problem is to make this when more apps are running, for example a windowed game and a movie at one time...
(by the way does anyone know how to push the screen into VGA mode?)

thank you
credo
You might be able to grab the HDC of a window that has a movie rendered to it and muck with that, but just like hooking with GL, D3D, etc., this won't get you want you want in a general sense.

I ask again, WHAT do you want to ACTUALLY do?

You cannot directly access the framebuffer from user-mode code; it's simply not possible (it would be a huge liability in a modern operating system). You cannot "force the screen into VGA mode," (this is not DOS) although you can change the resolution using GDI or D3D, but not to any arbitrary resolution.
To make it worse, video windows tends to use an overlay surface, thus it's not composed into a frame buffer at all, the mixing of the main surface and the overlays happens when the graphics adpaters generates the video output signal.

You might be able to use some very low level, graphics adpater (driver) dependent hook or api, probably only intended for debugging purposes.

Quite simply you need access to the overlay surface owned by the video player.. and that I believe is very non-trivial.

...and I also believe you will be disappointed to find out its not in a standard RGB format but instead in one of them funky YUV formats (refer to a 4CC document to discover exactly how many overlay formats you will need to consider.. its quite large)

The best solution is to use a player that does not use hardware acceleration of any kind, then all the pixels actualy find their way to the primary surface.
thank for replies.
I have to create a program that creates a "second screen", with the original screen-content's modification. So I have to make solution for ANY players, for ANY games, for everything...

As i know, content of overlays cannot be accessed. So they must be disabled...
Overlays:some programs, like nView Desktop Manager can disable overlays, i would be quite happy to find out HOW...
anyway, Fraps can record movies without this, so there MUST be som reachable way...
jpetrie: i quess it will be enough for me (i hope...). do you know the exact way to do that (i need 640*480 resolution). I searched msdn, but i have quota on internet (job :D ), so i couldnt find in short time :)
credo
i found something like setDisplayMode, i think its be ok for me.

i only have to find out how to disable overlays.

dont you have ANY idea, ANY references...?
it would save my life...:)
thx
credo
i solved the resolution in gdi with ChangeDisplayResolution();

but i would like to go further: can i force the videocard to vga mode?
is there any way?
credo
Quote:Original post by _dogo
i only have to find out how to disable overlays.

dont you have ANY idea, ANY references...?
it would save my life...:)
thx

I don't know about disabling them in code, but if you change your "display acceleration" slider (in the display/advanced options) to minimum then overlays should be done manually.

This topic is closed to new replies.

Advertisement