Real time desktop capture to memory on Windows with Aero desktop [closed]
Asked Answered
E

0

6

Using C++ or C#, I am trying to capture desktop in real time speed(more than 30fps) into memory. So that I can do whatever I want. But I can't do it with Windows Aero desktop.

However, some desktop capture software does real time capture even though Windows Aero is ON. Like Google Chrome Desktop Capture, TeamViewer and Windows Remote Desktop, they can capture entire desktop in a real time speed (30fps) in case of a fast movement video is playing back on a desktop.

Based on the information on the Internet, I tried following method so far:

  1. GDI BitBlt capture or DirectX GetFrontBuffer This will have very low-performance if Windows Aero is ON. Keep capturing with this method for long time will eventually turning off Windows Aero by Windows.

  2. DWMRegisterThumbnail This will have very good performance even though Windows Aero is ON. However, the problem is this cannot obtain the image of desktop after all windows are composite. So, layered window(tooltip, drop down list box) will not be captured.

  3. Magnifier.dll This will have somewhat good performance even though Windows Aero is ON. However, magnifier.dll will directly draw into a window, so I cannot directly capture the image into memory.

If someone knows or clue of how they achieve it, please give me an advise.

Eurythmic answered 11/1, 2014 at 2:45 Comment(7)
The source code for CamStudio is available here sourceforge.net/projects/camstudio It might give you some ideas. BTW: Your question is not appropriate for this site.Geranium
Side note: I don't think remote desktop "captures entire desktop" in sense of this question ( similar to behavior of video adapter which does not "capture entire desktop")Christie
Steve, thx for your advise. I narrowed down the question. Alexei, I heard remote desktop is only sending drawing request or something, but if I play back a video w/fast movement, I think they have to send almost entire desktop.Eurythmic
Steve, thx for your advise, but CamStudio is using GDI BitBlt method which is low-performance in Windows Aero ON case.Eurythmic
You could try taking a look at OBS's source.Ledezma
OBS is also using GDI BitBlt for window capture. For D3D capture, it looks like doing some tricky stuff unlike just copying from a front buffer of desktop - I haven't traced entire code yet. It can be there's no good solution when Windows Aero is turned ON unless WIndows 8.1 (which supports desktop mirroring API)Eurythmic
@Eurythmic Did you figure this out? I also need to do fast screen capture on Windows 7 with aero enabled.Derive

© 2022 - 2024 — McMap. All rights reserved.