[vlc-devel] [PATCH 03/16] Add variable to enable/disable dual subtitles

Roland Bewick roland.bewick at gmail.com
Fri May 31 17:48:55 CEST 2019

On 31/05/2019 10:09 PM, Rémi Denis-Courmont wrote:
> Le perjantaina 31. toukokuuta 2019, 16.34.43 EEST Roland Bewick a écrit :
>> On Fri, 31 May 2019 at 6:42 PM, Thomas Guillem <thomas at gllm.fr> wrote:
>>> The best solution I could think of:
>>>   - Add an helper to get all selected track (an array like few other
>>> helpers) for an ES
>>>   - If (selected_spu_track > 2) then SelectList else SelectOne
>>> It will work with more than one UI used.
>> Hi Thomas,
>> I don’t think this will work for the QT GUI because you can only select a
>> secondary subtitle track if:
>> A. There is only one track selected (if there are two already selected, you
>> must deselect one first)
>> B. Dual subtitles are enabled
>> If the user selects two subtitle tracks using the hotkeys and then
>> deselects one of them from QT, they can no longer select a second subtitle
>> track using QT.
> You don't want the user to go through the menu twice anyway just to add a
> track. So you need a new menu to select the second subtitle track without
> touching the first one.

Yes, this is the optimal solution if we only ever supported two 
subtitles. But it's not scalable beyond that (do you want a another menu 
for the tri-sub selection?)

It also requires a lot of extra code for a minor feature.

> I think each interfaces should handle their own way to handle dual tracks.
> In QT, you  need  a button alongside the track selection menu that 
> will switch from radio to checkbox.
> In hotkey, you add a key that switch dual/single.
That's how it works now (apart from visually showing a radio/checkbox)
> In addition, you could get the initial dual state by getting the list 
> of selected track. If count >= 2, then the user likely want dual selection

If track A and track B are selected and you select track C, which are 
selected? That's why I thought it'd be better to make the user deselect 
A or B before selecting C.


More information about the vlc-devel mailing list