How to capture frames fromTMediaPlayer (VCL)

624 views Asked by At

How to capture all frames (in RAM, not to disk) from TMediaPlayer (VCL) without showing the video on screen?


I tried this:

The MediaPlayer is set to show the movie in a panel:

MediaPlayer1.Display := pnlFakeScreen;
pnlFakeScreen.Visible:= true; 
pnlFakeScreen.top:= -10000; 

I use this to get the image from the invisible panel:

ADC := GetDC(pnlFakeScreen.Handle);
Bitblt(BMP.Canvas.Handle, 0,0,  BMP.Width, BMP.Height, ADC, 0, 0, SRCCOPY);

The capture does not work when the panel is invisible or out of screen.

0

There are 0 answers