[vlc-devel] [PATCH 01/14] Enable secondary SPU ES and selection from the GUI

Roland Bewick roland.bewick at gmail.com
Sat May 11 15:56:07 CEST 2019

On 11/05/2019 6:21 PM, Jean-Baptiste Kempf wrote:
> On Sat, 11 May 2019, at 13:15, Roland Bewick wrote:
>> On Sat, 11 May 2019 at 4:17 PM, Rémi Denis-Courmont <remi at remlab.net 
>> <mailto:remi at remlab.net>> wrote:
>>     Hi,
>>     While it likely makes sense at the level of UI widgets and user
>>     interactions, it seems a bit out of place, standing alone, at the
>>     player API level.
>>     In particular, I doubt that enabling multiple tracks mode in Qt
>>     should interfere with the track selection of, say, the HTTP
>>     remote control.
>>     IMO, the API should just take the list of active tracks, whether
>>     it be empty, a singleton, or larger.
>> Hi, Remi,
>> I designed the changes so that none of the current consumers of the 
>> API will be impacted.
>> Enabling dual subtitles will not affect the others (like the remote 
>> control or lua scripts), because there is another requirement: to 
>> temporarily enable multitrack selection using the new call I added. 
>> The UI and hotkeys use this but none of the others do.
>> I do agree however that your suggestion is more fitting (but require 
>> a bit more logic from each consumer that supports selecting multiple 
>> tracks)
> Make the API simple to maintain, for the core. UI will adapt.
> --
> Jean-Baptiste Kempf -  President
> +33 672 704 734
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

Unfortunately it isn't just the SelectTrack function, but 
SelectNextTrack and SelectPrevTrack too.

I feel like making the consumer pass a list of already selected tracks 
*plus* the new track to select is not right.

I agree the api should be simple but it should also be simple to use. 
Will this change make the core less complex?

What I've done isn't so good, yes. But I don't think Rémi's idea is 
right either. We're basically searching for tracks and then excluding 
the selected ones so that they don't get selected again.

Potential alternative option:
- Pass an extra parameter into the existing SelectTrack function - 
selection type (Single / multiple).
- For SelectNextTrack/SelectPrevTrack functions I would need to pass the 
"spu id" (1=primary, 2=secondary, 3=tertiary sub track)

Then I can remove the new API functions I added.

Please correct me if I'm wrong - maybe I'm not seeing the full picture, 
but I feel like this change is more complicated than its worth.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190511/fee7c369/attachment.html>

More information about the vlc-devel mailing list