Solved

Screen capture of DirectX surface

Posted on 2002-05-12
15
529 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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 remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now