[vlc-devel] [PATCH] vout window: check for NULL on owner's callback resized

Rémi Denis-Courmont remi at remlab.net
Tue Aug 20 16:24:48 CEST 2019


Hi,

Even if you introduce a new "window" type for off-screen buffers, the resized callback is still provided by the core allocating the window. It just won't get called.

I don't exactly see how that's a use case as such, TBH.

Le 20 août 2019 14:39:20 GMT+03:00, "Maxime ..." <mmeisson at outlook.fr> a écrit :
>Yes, that's mostly why i've submitted this, else I just would have
>wrote a dummy callback. I also have a use case, a "fake" offscreen
>window. A window module setting up buffers instead of window.
>________________________________
>De : vlc-devel <vlc-devel-bounces at videolan.org> de la part de Steve
>Lhomme <robux4 at ycbcr.xyz>
>Envoyé : mardi 20 août 2019 12:45
>À : vlc-devel at videolan.org <vlc-devel at videolan.org>
>Objet : Re: [vlc-devel] [PATCH] vout window: check for NULL on owner's
>callback resized
>
>On 2019-08-20 12:34, Rémi Denis-Courmont wrote:
>> Hi,
>>
>> What's the use case for a window whose size is ignored??
>
>At least it would be consistent with the documentation (you wrote):
>
>   * This callback function (if non-NULL) is invoked when the windowing
>      * system changes the window size.
>
>> Le 20 août 2019 12:38:59 GMT+03:00, "Maxime ..."
><mmeisson at outlook.fr> a écrit :
>>> ---
>>> include/vlc_vout_window.h | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
>>> index 4e0f3c13a9..9638d882c2 100644
>>> --- a/include/vlc_vout_window.h
>>> +++ b/include/vlc_vout_window.h
>>> @@ -543,7 +543,8 @@ void vout_window_Disable(vout_window_t *window);
>>> static inline void vout_window_ReportSize(vout_window_t *window,
>>>                                        unsigned width, unsigned
>height)
>>> {
>>> -    window->owner.cbs->resized(window, width, height);
>>> +    if (window->owner.cbs->resized != NULL)
>>> +        window->owner.cbs->resized(window, width, height);
>>> }
>>>
>>> /**
>>> --
>>> 2.17.1
>>>
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>> --
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté.
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190820/a7b87521/attachment.html>


More information about the vlc-devel mailing list