[vlc-devel] [PATCH] vout_intf: use same autoscale string for the title as autoscale core variable

Steve Lhomme robux4 at ycbcr.xyz
Wed Nov 18 07:47:06 CET 2020


On 2020-11-16 8:04, Steve Lhomme wrote:
> On 2020-11-14 13:18, Alexandre Janniaux wrote:
>> Hi,
>>
>> I'm not sure to understand why we need to use VL_VAR_SETTEXT
>> if we only want to use the value already defined by the config.
> 
> Usually that's because the variable is visible in the UI and so it needs 
> a proper name to be displayed. It doesn't seem to be the case here. 
> Maybe it was in the 3.0 UI.
> I'm OK with removing this call.

After a deeper look it seems there are 2 variables that are used for 
"autoscale". There's the vout_thread_t one and the libvlc_media_player_t 
one. The hotkey toggles the vout_thread_t one, The Qt menu toggles the 
libvlc_media_player_t one. Modifying the libvlc_media_player_t  one will 
apply it the vout(s) of that media player.

Unlike "crop" or "aspect-ratio" in the same file, noone seems to do a 
VLC_VAR_GETTEXT on that variable. (cli/player.c and 
macosx/menus/VLCMainMenu.m use VLC_VAR_GETTEXT on crop/aspect-ratio)

So it's easier to remove it.

>> Regards,
>> -- 
>> Alexandre Janniaux
>> Videolabs
>>
>> On Fri, Nov 13, 2020 at 04:56:18PM +0100, Steve Lhomme wrote:
>>> ---
>>>   src/video_output/vout_intf.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
>>> index 1c8159ce21e..76bdfc048e0 100644
>>> --- a/src/video_output/vout_intf.c
>>> +++ b/src/video_output/vout_intf.c
>>> @@ -170,7 +170,7 @@ void vout_CreateVars( vout_thread_t *p_vout )
>>>       /* Add variables to manage scaling video */
>>>       var_Create( p_vout, "autoscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
>>>                   | VLC_VAR_ISCOMMAND );
>>> -    var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, _("Autoscale 
>>> video") );
>>> +    var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, _("Video Auto 
>>> Scaling") );
>>>
>>>       var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_ISCOMMAND |
>>>                   VLC_VAR_DOINHERIT );
>>> -- 
>>> 2.26.2
>>>
>>> _______________________________________________
>>> 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
>>
> _______________________________________________
> 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