[FFmpeg-devel] [PATCH v4 1/1] avdevice/gdigrab add use_captureblt option

fgodt fgodtdev at hotmail.com
Tue Jan 21 03:32:19 EET 2020


在 2020/1/17 10:04, fgodt 写道:
>
> On 2020/1/17 上午2:00, Calvin Walton wrote:
>> On Thu, 2020-01-16 at 09:08 +0800, fgodt wrote:
>>
>>>> By default, this is set to @code{1}, which means that gdigrab will
>>>> use
>>>> the CAPTUREBLT flag when grabbing images of a window. With this
>>>> flag
>>>> set, gdigrab will capture the entire contents of a window even if
>>>> it is
>>>> covered by other windows on the screen.
>>>>
>>>> If this option is set to @code{0}, the image captured will match
>>>> what
>>>> you see on the screen: the contents of any windows covering the
>>>> selected window will be visible in the capture.
>>>>
>>>> Depending on your Windows version and graphics settings, you may
>>>> see
>>>> the mouse cursor flicker on your screen while capturing with this
>>>> option set to @code{1}. If that happens, you can disable CAPTUREBLT
>>>> by
>>>> setting this option to @code{0}.
>>>>
>>> Thanks for you suggestion, but there is issue, without the
>>> CAPTUREBLT
>>> flag not change any thing for normal window in captured video, the
>>> worke
>>> same like use CAPTUREBLT flag. So the can capture window even if it
>>> is
>>> covered.
>> Ah, fun, this is based on a misinterpretation of the windows
>> documentation:
>>
>> CAPTUREBLT
>> Includes any windows that are layered on top of your window in the
>> resulting image. By default, the image only contains your window.
>>
>> But according to this StackOverflow response:
>> https://stackoverflow.com/a/4646999
>>
>> What that actually means is that CAPTUREBLT includes windows with the
>> "WS_EX_LAYERED" window style that overlap the window, not *any* window.
>>
>> Layered windows are described in:
>> https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#layered-windows 
>>
>>
>>
>> I think we should unconditionally remove the CAPTUREBLT flag, there's
>> no need for any options or documentation changes.
>>
> Thanks, if we remove CAPTUREBLT flag the user may can't capture 
> layered window(use WS_EX_LAYERED extended), it is ok for this?
>
Judging from this mail, remove CAPTUREBLT flag looks good for solve this 
issue.


More information about the ffmpeg-devel mailing list