[vlc-devel] [PATCH] player: vout: Update IsFullscreen and IsWallpaperModeEnabled for fixing toggle hotkey

Rémi Denis-Courmont remi at remlab.net
Mon Jan 13 12:09:32 CET 2020


Hi,

Do we fail the player creation if the vout creation fails? That's news to me.

Le 13 janvier 2020 11:26:20 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>
>
>On Sat, Jan 11, 2020, at 04:04, Rémi Denis-Courmont wrote:
>> Doesn't this crash if there's no vout for whatever reason (such as
>headless)?
>
>No, there is always a dummy vout, that we way, clients can always setup
>vout variables, and the real vout will inherit from it.
>
>You already told me that you didn't like this "hack" in the past. But I
>would like to keep it until we rework the vout external API (for for
>4.0). 
>
>> 
>> Le 11 janvier 2020 00:40:01 GMT+09:00, vvaakshay at gmail.com a écrit :
>>> From: akshayaky <akymaster007 at gmail.com>
>>> 
>>> now the player returns state of the first vout instead of player
>state
>>> 
>>> this commit fixes:
>>>    -the fullscreen hotkey not exiting fullscreen
>>>    -wallpaper mode hotkey not disabling wallpaper mode
>>> 
>>> this commit fixes issue #22418 src/player/vout.c | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/src/player/vout.c b/src/player/vout.c
>>> index b28599288f..a8af445026 100644
>>> --- a/src/player/vout.c
>>> +++ b/src/player/vout.c
>>> @@ -100,7 +100,8 @@ vlc_player_vout_RemoveListener(vlc_player_t
>*player,
>>>  bool
>>>  vlc_player_vout_IsFullscreen(vlc_player_t *player)
>>>  {
>>> -    return var_GetBool(player, "fullscreen");
>>> +    vout_thread_t *vout = vlc_player_vout_Hold(player);
>>> +    return var_GetBool(vout, "fullscreen");
>>>  }
>>>  
>>>  static int
>>> @@ -185,7 +186,8 @@ vlc_player_vout_SetFullscreen(vlc_player_t
>*player, bool enabled)
>>>  bool
>>>  vlc_player_vout_IsWallpaperModeEnabled(vlc_player_t *player)
>>>  {
>>> -    return var_GetBool(player, "video-wallpaper");
>>> +    vout_thread_t *vout = vlc_player_vout_Hold(player);
>>> +    return var_GetBool(vout, "fullscreen");
>>>  }
>>>  
>>>  void
>> 
>> -- 
>> 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

-- 
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/20200113/9b5bb965/attachment.html>


More information about the vlc-devel mailing list