0

I want to capture the bitmap of the screen underneath my application. My application is the top level window. I found a post on stackoverflow: - How can I capture screen under my own window excluding my own window

I have followed the last answer on the above post but there is persistent flickering of my capturing application during the capturing process.

Is there any solution to capture the screen bitmap below my top level capturing application using DirectShow APIs without causing flickering? The captured video is expected not to contain any GUI elements of my capturing application.

Community
  • 1
  • 1
sunil_rbc
  • 772
  • 1
  • 8
  • 13

1 Answers1

1

This is essentially a duplicate of your previous question How can I omit capturing of a button/region using DirectShow APIs?, which you extend by adding new details and link reference.

Nevertheless, DirectShow API does not offer ANY desktop capture capabilities. Its CPushSourceDesktop Sample indeed is offering a close thing: it's demonstrating that desktop image obtained using GDI API can be streamed as video using DirectShow. That is, there is no desktop capture using DirectShow API anyway.

With GDI you need to force window repaint for windows that are below your application UI. You can do this by hiding your application and, hence, flickering. Other methods involve requests to paint into helper DC and this does not work well with all applications, and require that you do the image composition from separate windows yourself - then you can stream the result using DirectShow.

Community
  • 1
  • 1
Roman R.
  • 68,205
  • 6
  • 94
  • 158