diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2017-07-03 23:29:14 +1000 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2017-07-04 23:08:40 +1000 |
commit | 91079c0e2ba4e02ae923720d6a30b497a2dcec91 (patch) | |
tree | f5867b233049c19149beb74701b7137a6dd33c52 /video/decode | |
parent | abe01fd18a341c5c163d4ce8f019ca366feec628 (diff) | |
download | mpv-91079c0e2ba4e02ae923720d6a30b497a2dcec91.tar.bz2 mpv-91079c0e2ba4e02ae923720d6a30b497a2dcec91.tar.xz |
w32_common: use sent messages to wake up the Win32 thread
Instead of PostMessage, use SendNotifyMessage from the SendMessage
family of functions to wake up the Win32 thread from the VO thread. When
a message is sent rather than posted between threads, it ends up in a
different queue which is processed before posted messages and can be
processed in more places. This prevents a playback glitch when clicking
on the titlebar, but not moving the window. With PostMessage-based
wakeups, VOCTRLs could be delayed for up to 500ms after the user clicks
on the titlebar, but with SendNotifyMessage, they still complete in
under a millisecond.
Also, instead of handling WM_USER, process the dispatch queue before
every message. This ensures the dispatch queue is processed as soon as
possible. WM_NULL is used to wake up the window procedure in case there
are no other messages being processed.
Diffstat (limited to 'video/decode')
0 files changed, 0 insertions, 0 deletions