0

I'm being annoyed by an odd behavior of Interop.quartztypelib in making media player with c#. With the help this link

http://www.codeproject.com/Articles/2632/DirectShow-MediaPlayer-in-C?msg=4853463#xx4853463xx

I created my own video player with Interop.quartztypelib. There's an important function for me to implement is that my application shall be able to capture the video image, just like you click "ALT" + "Printscreen" to make a screenshot of an active window in windows. But surprisingly I found that in the image captured by my application (I use

Graphics.CopyFromScreen

in my code), there's no video image on the video screen! I got the image of my form (the video player) but not the image of the video being played! And clicking "ALT" + "Printscreen" just gives me the same result! I'm wondering if this Interop.quartztypelib doesn't support image capture. Anybody knows if there's a way to do settings to enable this? Thanks.

jcraffael
  • 81
  • 3
  • 12

1 Answers1

0

Printscreen doesn't do that

You need to implement some way of switching out of overlay, or some other way of getting a still. There is some trick with hardware acceleration, buts its not really applicable to you as the application dev. You're probably have to get antiquated with rendering api's.

For OpenGL api I think it would be glReadPixels. For directX here's a SO question. I'm going to guess its directX in your case.

Community
  • 1
  • 1
Nathan Cooper
  • 6,262
  • 4
  • 36
  • 75
  • Thank you for the reply! From the first link "Printscreen doesn't do that" I solved the problem by changing the hardware accelaration on destop. But anyway a programmatic way to do this is preferable. From the link "here's a SO question" unfortunately I did't get any idea. Could you inspire me a bit about that? Thanks a gain! :) – jcraffael Jul 02 '14 at 15:13