[FFmpeg-devel] [PATCHv2] Add Win32 GDI-based screen grabbing
Don Moir
donmoir at comcast.net
Fri Nov 29 16:13:47 CET 2013
----- Original Message -----
From: "Christophe Gisquet" <christophe.gisquet at gmail.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Cc: "Calvin Walton" <calvin.walton at kepstin.ca>
Sent: Monday, December 02, 2013 11:36 AM
Subject: Re: [FFmpeg-devel] [PATCHv2] Add Win32 GDI-based screen grabbing
> Hi,
>
> 2013/12/2 Calvin Walton <calvin.walton at kepstin.ca>:
>> + if (!strncmp(filename, "title=", 6)) {
>> + name = filename + 6;
>> + hwnd = FindWindow(NULL, name);
>> + if (!hwnd) {
>> + av_log(s1, AV_LOG_ERROR,
>> + "Can't find window '%s', aborting.\n", name);
>> + ret = AVERROR(EIO);
>> + goto error;
>> + }
>
> You probably weren't affected for some reason, but I remember having
> issues with the window thumbnails from the taskbar being captured
> instead of the actual window. I don't remember how I solved this
> (checking window size or class maybe?)
>
> Also, this is awfully slow if I remember correctly. I don't know what
> the expected method would be nowadays (ie not a 15yo one).
>
> Best regards,
> --
> Christophe
You might also want to check your usage of GetBitmapBits in windows vista and above with aero turned on. In vista and above GDI is
not hardware accelerated when aero is on and depending on how you use GDI, it can cause a fast machine to come to a crawl. BitBlt
seems to be ok, but pixel manipulation can be terrible. You could use a dib section and then no need to use GetBitmapBits because
you would alreadly have a pointer to the bits. When aero is turned off, GDI goes back to hardware acceleration.
Just saying beware if your not aware already.
More information about the ffmpeg-devel
mailing list