[vlc-devel] [PATCH] splitter: use a different thread for each display

Steve Lhomme robux4 at ycbcr.xyz
Wed Dec 11 14:54:09 CET 2019

On 2019-12-10 20:56, Rémi Denis-Courmont wrote:
> Le tiistaina 10. joulukuuta 2019, 20.37.44 EET Alexandre Janniaux a écrit :
>> Display modules are currently expected to return from display callback
> No they are not. That would never work if the video frame rate is higher than
> the monitor's. Display callback is intended to be called near the display
> time. Nothing requires to wait in it.

In fact it's the other way around. The Prepare should have finished 
preparing everything to display the given picture. The Display should 
just do a buffer swap and return (assuming this swap actually displayed 
the picture). The core watches the time to do a Prepare and wait to call 
Display at the time the picture should be displayed.

For this reason and the fact that D3D11 is asynchronous I have to wait 
in the Prepare until the commands I issued are actually handled, so the 
core can get a real estimation of how much time it took. (and later 
estimate when a new picture will likely won't have time to be displayed 
or not)

More information about the vlc-devel mailing list