Solved

Screen capture of DirectX surface

Posted on 2002-05-12
15
549 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 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