Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Screen Cap WITH Media Player Content?

Hello,

  I was playing with my screen capture utility the other day and I noticed that, while it caps the screen perfectly, and shows me the mouse pointer etc..  It doesn't show me whats playing with in a MOV/AVI/MPEG viewer..

  This is the screen cap code I use (basically) http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20335134.html

  When my screen capture program caps the screen, if there is a Media Player window open, it wont capture whats in the media player.. It just gives a black blank area..

What causes this?  Is this an error in my code?  How do I fix this so I CAN capture the screen and get whats in the media player?

Thanks.

-Jason
0
Palamedes
Asked:
Palamedes
  • 2
1 Solution
 
Wim ten BrinkCommented:
No, this is not an error in your code. Unfortunately, it isn't possible to get screen caps from certain kinds of streams because the system streams the data directly to the videocard bypassing the videosystem of Windows itself.

What happens is this: Windows draws a black rectangle in some place where the video needs to be displayed. It then starts sending video data directly towards the videocard. The videocard on it's turn then merges the normal video screen it receives from Windows with the video data it receives through the stream. The videocard determines the location of a black rectangle and fills this area with the video data.
The result is that Windows speeds up the processing of video data a lot faster, since it's the hardware itself decoding the MPG data. If Windows had to decode it itself, the processor would be too busy decoding, thus would slow down the system enormously.
Compare this to the blue-screen techniques that are used for movies. The actor acts in front of a blue screen and the blue is then replaced with some other images.

Is there a way to capture the video data? Not as far as I know. I believe it's related to the use of DirectX, though.
0
 
PalamedesAuthor Commented:
Oh..wow.. thanks Alex..  I didn't realize it worked that way..

So there is absolutely no way to directly copy the information from the card?  I realize this would probably take some serious programming..
0
 
Wim ten BrinkCommented:
I don't think it's possible, although I'm not 100% sure. It could be that through DirectX or some other technique, you can still get the screen contents. But with DirectX, the CPU just lets the videocard do most of the processing and the videocard does not send the screen information back to the system. So I fear it's not possible.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now