IceCold
IceCold

Reputation: 21164

How to capture frames fromTMediaPlayer (VCL)

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.

Upvotes: 1

Views: 669

Answers (0)

Related Questions