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

Roland Bewick roland.bewick at gmail.com
Mon May 27 17:31:22 CEST 2019


On 27/05/2019 2:19 PM, Thomas Guillem wrote:
> Hello,
>
> This should not belong to the player.
> I think you should store the internal dual subtitle state in each interfaces.

Hi, could you clarify what you mean?

A. Store the variable in the interface thread rather than the input 
thread so that it's always available and both QT and hotkeys can access 
it. (Although I'm not sure where to create the variable)

B. Don't store a VLC variable at all. Hotkeys and QT interface handle it 
separately. (If you select two subtitles using the hotkeys, you'll still 
have to enable dual subtitles in the GUI if you want to select a 
different secondary subtitle from there.)

Since I won't be using the VLC Player API to check whether dual 
subtitles are enabled, I need to change how I check whether dual 
subtitles are enabled when track selection changes in input_models.cpp.

I could add a more generic variable to the TrackListModel class 
(something like m_allowMultipleSelection) and only enable it for 
subtitles. This might help in fixing the bug Jean-Baptiste mentioned 
regarding checkboxes verses radio buttons for multi/single selection.

> This does nothing if there is no input and the options will be forgotten once you play a next input.

I didn't realise it wouldn't persist. Thank you.

Roland



More information about the vlc-devel mailing list