[vlc-devel] [PATCH 02/26] vout: create/release the decoder device when the window is enabled/disabled

Rémi Denis-Courmont remi at remlab.net
Fri Sep 20 21:02:54 CEST 2019

Le perjantaina 20. syyskuuta 2019, 17.28.32 EEST Steve Lhomme a écrit :
> The decoder device ("dec-dev") should be tied to the lifecyle of the
> active/enabled window.

Not really. It is bound by that the lifetime of a window enablement, *but* 
nothing says it has to be as long as the window enablement as such. Some 
hardware APIs are horribly slow. If you create a decoder device even when it's 
not needed, there'll likely be performance problems.

Besides, this won't work if there are more than one candidate decoder device 
plugin for the active window, and the right one depends on the decoder plugin. 
As much as I wish we could ignore that case, I doubt that it's realistic 
especially now that NVDEC is added.

> It won't change during the lifetime of the window enabled state.

That does not sound like a safe assumption at all to me.

> This decoder device is stored in the vout private structure.

I don't see what the *decoder* device has to do there, if not for the fact it 
is created from the window, and the window is still allocated by the vout 
instead of the player.

AFAIU, the decoder should pass the video context to the vout when enabling it.

Реми Дёни-Курмон

More information about the vlc-devel mailing list