Solved

Screen capture of DirectX surface

Posted on 2002-05-12
15
543 Views
Last Modified: 2013-12-03
How to do the subj?
Is there any more or less documented way?
I need to make screen capture containing e.g. RealPlayer or the like video window.
Of course I'm speaking about how to that from my own application!
0
Comment
Question by:abb1
15 Comments
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7005091
I found there no difference between GDI and DirectX screen capture under Win2K.
0
 
LVL 3

Author Comment

by:abb1
ID: 7005133
And what about others (9x/Me)?
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7007439
It maybe has some problems under win9x/me, I don't know:o(
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 3

Author Comment

by:abb1
ID: 7007702
Please omit "maybe" and you'll be completely right! :) Hence is my Q.
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7007800
Really? I don't know:o(
Now, I don't know other method except implement a tiny driver.
*: I don't know the LCD(maybe same as VGA), so the following is about VGA only.

In you tiny driver, you can use MmMapIoSpace map the physical address 0xA0000(which is VGA screen memory) to system address space, then you can save the content in a file. Remember, the content of memory depend on the VGA mode, If the DirectX always under 640*480*256, your code will simple, otherwise you should detect the mode first and then save it in some different ways.
0
 
LVL 3

Author Comment

by:abb1
ID: 7007872
As I know that A000 was for pure VGA only... SVGA's use more space. Am I wrong?
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7009940
No, All VGA compatible card use the same address under Windows, actually I have tested it on my DELL P4 computer. But I havn't tested it on laptop.
0
 
LVL 3

Author Comment

by:abb1
ID: 7010385
So, well.
The next step: can I achieve that without a driver? As I know it is possible to access the hardware ports under W9x via ring0 jump. Is it possible to do something similar with memory addresses?
And is there any doc about video memory structure?
Shorter -- give me link to some at least very raw sample and we'll stop this thread :)
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7012778
Yeah, you jump to ring0 just like CIH virus. But I don't know how find the VGA physical address with this method. You can try it.
Sorry, I don't know any link or sample about this.
Actually, If there are some applications that can do this, you can analyse(with SoftICE, IDA and other great tools) it and find the way.
Can you find the sample of SoftICE or other famous tools? :-)
Not everything has the link or sample. :O(
You can refer to the http://www.bsdg.org/swag/EGAVGA for VGA info.
0
 

Expert Comment

by:mov
ID: 7072373
Hmm.. If you are trying to capture video picture which is shown by realplayer or windows mediaplayer, and then you notice hey, it didn't capture anything, its cause videocard draws it straight to screen without having it first in vidmem. So its useless trying to capture picture from videolayer. First you have to tell system to draw it in mem, and then it gets little slower put capturing is then made possible.

But as in your topic, capturing directx surface in your own program is to just take pointer to your surface and start reading it from start to end and writing those down as your X and Y sizes and remembering the colourdepth.

hmm... was there something else I wanted to say.. yeah, I'm not sure what we are talking overhere and why we are talking about old historic a000:0000 realmode address space, that scares me. Usually I'm avoiding to write straight into display memory cause of synchronization and other issues, which will come with todays hardware, thats why believing into drivers that handle those are the most best way to get speed and power out of your vidcard.

ok, I'm off, mov.
0
 
LVL 3

Author Comment

by:abb1
ID: 7073095
As I've found, all goes well (with a capture) when I decrease a hardware acceleration (from the maximum to some medium value). Then all goes well with a simple capturing like PrtScreen does!
So, I apologize, maybe my question was incorrect -- no DX stuff needed here! But maybe anybody of the above could explain me what happens when I Decrease acceleration and whether can I do that without rebooting?
Otherwise I don't see (even in theory) any programmical solution here...
Sorry again!
0
 
LVL 3

Author Comment

by:abb1
ID: 10706760
Agree. Thanks.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 10743452
PAQed, with points refunded (400)

CetusMOD
Community Support Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question