5

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.

jww
  • 97,681
  • 90
  • 411
  • 885
Aki24x
  • 1,058
  • 1
  • 13
  • 28
  • 2
    The source code for CamStudio is available here http://sourceforge.net/projects/camstudio/ It might give you some ideas. BTW: Your question is not appropriate for this site. – Steve Wellens Jan 11 '14 at 02:54
  • 1
    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") – Alexei Levenkov Jan 11 '14 at 03:23
  • 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. – Aki24x Jan 11 '14 at 05:52
  • Steve, thx for your advise, but CamStudio is using GDI BitBlt method which is low-performance in Windows Aero ON case. – Aki24x Jan 11 '14 at 06:08
  • You could try taking a look at [OBS's source](https://github.com/jp9000/OBS). – Jesse Webb Jan 11 '14 at 07:17
  • 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) – Aki24x Jan 13 '14 at 18:05
  • @Aki24x Did you figure this out? I also need to do fast screen capture on Windows 7 with aero enabled. – tunafish24 Jan 04 '19 at 09:13

0 Answers0