mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
31f28da0f3
Because VOCTRL_CHECK_EVENTS is processed asynchronously (as of 088a007,) the GUI thread no longer gets regular wakeups, so the old check that made sure the video window matched the parent window's size in --wid embedding mode did not run very often. This made --wid embedding not very usable. Instead of polling for window size changes, use Windows hooks to react to them when they happen. When the parent window is owned by the same process as the video window, use a WH_CALLWNDPROC hook. When the parent window is not owned by the same process, WinEvents must be used, which are not as smooth, but still work for this purpose. Since neither SetWindowsHookEx nor SetWinEventHook take a context parameter to send data to the hook function, the hook functions must find the child window by its class instead, so there are a few changes to ensure this is fast and the class is unique. This also fixes up the logic to handle window destruction. When a parent window is destroyed, its children are also destroyed, so this gives us a way to react to parent window destruction without polling. |
||
---|---|---|
.. | ||
decode | ||
filter | ||
out | ||
csputils.c | ||
csputils.h | ||
fmt-conversion.c | ||
fmt-conversion.h | ||
gpu_memcpy.c | ||
gpu_memcpy.h | ||
hwdec.c | ||
hwdec.h | ||
image_writer.c | ||
image_writer.h | ||
img_format.c | ||
img_format.h | ||
img_fourcc.h | ||
mp_image_pool.c | ||
mp_image_pool.h | ||
mp_image.c | ||
mp_image.h | ||
sws_utils.c | ||
sws_utils.h | ||
vaapi.c | ||
vaapi.h | ||
vdpau_functions.inc | ||
vdpau_mixer.c | ||
vdpau_mixer.h | ||
vdpau.c | ||
vdpau.h |