[vlc-devel] [PATCH] vout: Update vlc_player_vout_SetVar to fix fullscreen toggle hotkey

Thomas Guillem thomas at gllm.fr
Fri Jan 10 13:13:06 CET 2020


Alexandre, ideally we would like to avoid variables to control vouts, but it's not done yet.
So, in the meantime we should continue to use variables.

Akshay, you spotted the problem, about the vout/player var_Set mismatch. I think the correct way to fix this issue is to fix the vlc_player_vout_IsFullscreen() function. This function should return the state of the first vout (via vlc_player_vout_Hold()) instead of the player state.
Same for vlc_player_vout_IsWallpaperModeEnabled().

You could also remove

 /* vout variables */
 VAR_CREATE("fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
 VAR_CREATE("video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
 VAR_CREATE("video-wallpaper", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);

in src/player/player.c

On Thu, Jan 9, 2020, at 17:05, Akshay V wrote:
> 
> 
> On Thu, Jan 9, 2020 at 6:26 PM Alexandre Janniaux <ajanni at videolabs.io> wrote:
>> Hi,
>>  On Thu, Jan 09, 2020 at 05:55:23PM +0530, Akshay V wrote:
>> 
>>  > I checked and only the addition of the first line
>>  > var_SetChecked(player, name, type, val);
>>  > would do the job.
>> 
>>  I mean that you're not supposed to use variables to control
>>  the video pipeline anymore in 4.0, and they are other
>>  helpers out there like the following:
>> 
>> https://www.videolan.org/developers/vlc/doc/doxygen/html/group__vlc__player____vout.html#ga08a37f0e393d951493856b94cc9323f7
>> 
> What do mean by this link? vlc_player_vout_SetFullscreen() calls vlc_player_vout_SetVar() function for execution. 
> 
>> If those helpers are not doing what you want, or if they
>>  are not used instead of variables, that is the issue you'll
>>  likely want to solve instead of setting a variable on every
>>  vout available, which will break other things.
>> 
>>  I hope this is clearer.
>> 
>>  Regards,
>>  --
>>  Alexandre Janniaux
>>  Videolabs
>>  _______________________________________________
>>  vlc-devel mailing list
>>  To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> 
> 
> -- 
> Regards,
> Akshay V
> GitHub <http://github.com/akshayaky> | Amrita Vishwa Vidyapeetham
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200110/4eeb8b62/attachment.html>


More information about the vlc-devel mailing list