1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00
mpv/video
James Ross-Gowan 31f28da0f3 w32_common: use hooks to detect parent window resize
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.
2016-08-26 20:02:58 +10:00
..
decode vd_lavc: minor simplification 2016-08-23 12:07:46 +02:00
filter vf_rotate: allow arbitrary rotation 2016-08-19 09:37:52 +02:00
out w32_common: use hooks to detect parent window resize 2016-08-26 20:02:58 +10:00
csputils.c csp: document deviations from the references where they occur 2016-07-05 19:16:49 +02:00
csputils.h vo_opengl: generalize HDR tone mapping mechanism 2016-07-03 19:42:52 +02:00
fmt-conversion.c build: merge d3d11va and dxva2 hwaccel checks 2016-05-11 15:40:31 +02:00
fmt-conversion.h Update license headers 2015-04-13 12:10:01 +02:00
gpu_memcpy.c Fix misspellings 2016-06-26 13:47:21 +02:00
gpu_memcpy.h video: refactor GPU memcpy usage 2015-09-25 19:18:16 +02:00
hwdec.c video: refactor how VO exports hwdec device handles 2016-05-09 20:03:22 +02:00
hwdec.h videotoolbox: add --hwdec=videotoolbox-copy for h/w accelerated decoding with video filters 2016-07-15 01:01:17 +02:00
image_writer.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
image_writer.h screenshots: add option to prevent 16 bit output 2015-04-29 21:05:04 +02:00
img_format.c video: remove d3d11 video processor use from OpenGL interop 2016-05-29 19:00:55 +02:00
img_format.h video: remove d3d11 video processor use from OpenGL interop 2016-05-29 19:00:55 +02:00
img_fourcc.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
mp_image_pool.c mp_image_pool: add mp_image_pool_add 2016-02-16 12:36:50 -08:00
mp_image_pool.h mp_image_pool: add mp_image_pool_add 2016-02-16 12:36:50 -08:00
mp_image.c video: change hw_subfmt meaning 2016-07-15 13:04:17 +02:00
mp_image.h video: change hw_subfmt meaning 2016-07-15 13:04:17 +02:00
sws_utils.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
sws_utils.h vf_scale: libswscale is being stupid 2015-03-01 22:32:38 +01:00
vaapi.c video: change hw_subfmt meaning 2016-07-15 13:04:17 +02:00
vaapi.h vaapi: determine surface format in decoder, not in renderer 2016-04-11 22:03:26 +02:00
vdpau_functions.inc vo_vdpau: directly get surface size from surface for screenshots 2015-06-05 22:34:16 +02:00
vdpau_mixer.c vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00
vdpau_mixer.h vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00
vdpau.c vdpau: get surface data as nv12 if possible 2016-06-21 21:31:58 +02:00
vdpau.h vdpau: get surface data as nv12 if possible 2016-06-21 21:31:58 +02:00