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

Steve Lhomme robux4 at ycbcr.xyz
Mon Sep 23 14:15:17 CEST 2019


On 2019-09-23 10:29, Steve Lhomme wrote:
> On 2019-09-20 21:02, RĂ©mi Denis-Courmont wrote:
>>> It won't change during the lifetime of the window enabled state.
>>
>> That does not sound like a safe assumption at all to me.
> 
> I meant the other way around. The window enabled state won't change 
> during the lifetime of the decoder device. When the window is disabled, 
> the cached "decoder device" is released. If a decoder needs one, a new 
> one will be created.

Given the window is gone, the hint shouldn't be used anymore. And the 
one that has this information is the vout thread, not the input resource 
handler. That's why it still needs to be stored in the vout thread.

>>> 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.
> 
> This will use the same system as caching the vout thread in the decoder.

Because of the constraints described above, there is no extra caching in 
the resources of the "decoder device". It's handled via the cache vout 
thread.

>> AFAIU, the decoder should pass the video context to the vout when 
>> enabling it.
> 
> That's why I sent this patchset. To do this, the decoders have to create 
> a video context. Once we reach this point, then the video context can be 
> used downstream.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list