[vlc-devel] [RFC 1/8] libvlc: add a bool return value to the resize callback
robux4 at ycbcr.xyz
Wed Nov 28 11:07:37 CET 2018
On 20/11/2018 17:54, Rémi Denis-Courmont wrote:
> Le tiistaina 20. marraskuuta 2018, 18.38.05 EET Steve Lhomme a écrit :
>> On 20/11/2018 17:21, Rémi Denis-Courmont wrote:
>>> Le tiistaina 20. marraskuuta 2018, 17.42.35 EET Steve Lhomme a écrit :
>>>> For some reason it may be impossible to the host to provide a context
>>>> the given size.
>>> As already explained, this cannot work. We tried that already in the past
>>> and removed it knowingly. The core has no way to handle rejected resizes,
>>> since they are asynchronous and already acted upon by the time this
>>> callback is invoked.
>>> Indeed, the Resize() function would need to pass the error to the caller,
>>> which it cannot do.
>> You mean like this ?
> Resize() cannot return an error because it corresponds to
> VOUT_DISPLAY_CHANGE_* controls which cannot fail (or rather, are assumed to
> succeed), because they merely notify of a change after it already happened.
It cannot fail as seen from the core. But internally each vout display
still has to handle its error cases so that it doesn't crash later, even
if it displays nothing.
This callback is between the vout display and the actual output. The
core doesn't know anything about that.
> If you need to reallocate buffers on resize, then you need invalid pictures.
> You can then fail the allocation in the pool callback *after* the resize
> event. This is obviously specific to buffer pull model.
> But regardless fo pull or push, if you cannot allocate buffers, video will be
> decoded into oblivion. There is not much that be done.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel