1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-11 17:39:38 +00:00
mpv/video
wm4 97a82bcd56 win32: move window handling to a separate thread
The windows message loop now runs in a separate thread. Rendering,
such as with Direct3D or OpenGL, still happens in the main thread.

In particular, this should prevent the video from freezing if the
window is dragged. (The reason was that the message dispatcher won't
return while the dragging is active, so mpv couldn't update the
video at all.)

This is pretty "rough" and just hacked in, and there's no API yet to
make this easier for other backends. It will be cleaned up later
once we're sure that it works, or when we know how exactly it should
work. One oddity is that OpenGL is actually completely managed in the
renderer thread, while e.g. Cocoa (which has its own threading code)
creates the context in the GUI thread, and then lets the renderer
thread access it.

One strange issue is that we now have to stop WM_CLOSE from actually
closing the window. Instead, we wait until the playloop handles the
close command, and requests the VO to shutdown. This is done mainly
because closing the window apparently destroys it, and then WM_USER
can't be handled anymore - which means the playloop has no way to
wakeup the GUI thread. It seems you can't really win here... maybe
there's a better way to have a thread receive messages with and
without a window, but I didn't find one yet.

Dragging the window (by clicking into the middle of it) behaves
strangely in wine, but didn't before the change. Reason unknown.
2014-07-26 20:36:46 +02:00
..
decode dvd, bluray, cdda: add demux_disc containing all related hacks 2014-07-05 17:07:15 +02:00
filter Remove some mp_msg calls with no trailing \n 2014-07-13 20:12:13 +02:00
out win32: move window handling to a separate thread 2014-07-26 20:36:46 +02:00
csputils.c video: Include better heuristics for guessing primaries 2014-06-22 19:05:43 +02:00
csputils.h video: Include better heuristics for guessing primaries 2014-06-22 19:05:43 +02:00
fmt-conversion.c video: synchronize mpv rgb pixel format names with ffmpeg names 2014-06-14 10:03:04 +02:00
fmt-conversion.h Take care of some libavutil deprecations, drop support for FFmpeg 1.0 2013-11-29 17:39:57 +01:00
hwdec.h video: move struct mp_hwdec_info into its own header file 2013-11-23 21:26:31 +01:00
image_writer.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
image_writer.h image_writer: mp_msg conversions 2013-12-21 20:50:10 +01:00
img_format.c video: cosmetics: reformat image format names table 2014-06-14 10:06:23 +02:00
img_format.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
img_fourcc.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
memcpy_pic.h memcpy_pic: reformat 2013-11-06 20:27:13 +01:00
mp_image_pool.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
mp_image_pool.h video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
mp_image.c video: Include better heuristics for guessing primaries 2014-06-22 19:05:43 +02:00
mp_image.h video: Add support for non-BT.709 primaries 2014-06-22 19:00:38 +02:00
sws_utils.c video: correct spelling: mp_image_params_equals -> mp_image_params_equal 2014-06-17 23:30:27 +02:00
sws_utils.h options: remove global variables for swscale options; rename them 2014-06-11 00:39:13 +02:00
vaapi.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vaapi.h video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00
vdpau_functions.inc video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00
vdpau_mixer.c video: correct spelling: mp_image_params_equals -> mp_image_params_equal 2014-06-17 23:30:27 +02:00
vdpau_mixer.h vdpau_mixer: allow overriding frame opts 2014-05-02 01:08:04 +02:00
vdpau.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vdpau.h video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00
vfcap.h video: remove --flip 2013-12-05 22:58:54 +01:00