[vlc-devel] [PATCH 04/15] Add function to toggle multiple SPU ES selection enabled

Roland Bewick roland.bewick at gmail.com
Wed May 15 11:26:39 CEST 2019


On 15/05/2019 4:09 PM, Thomas Guillem wrote:
>
> On Tue, May 14, 2019, at 11:41, Roland Bewick wrote:
>> ---
>>   include/vlc_player.h                              | 24 +++++++++++++++++++++++
>>   modules/gui/macosx/playlist/VLCPlayerController.m |  1 +
>>   modules/gui/qt/components/player_controller.cpp   |  1 +
>>   src/input/es_out.c                                |  3 ++-
>>   src/input/player.c                                | 11 +++++++++++
>>   src/input/var.c                                   |  1 +
>>   src/libvlccore.sym                                |  1 +
>>   7 files changed, 41 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/vlc_player.h b/include/vlc_player.h
>> index 077b3883ad..370accb78d 100644
>> --- a/include/vlc_player.h
>> +++ b/include/vlc_player.h
>> @@ -697,6 +697,18 @@ struct vlc_player_cbs
>>           float subs_fps, void *data);
>>   
>>       /**
>> +     * Called when dual subtitles enabled has changed
>> +     *
>> +     * @see vlc_player_SetDualSubtitlesEnabled()
>> +     *
>> +     * @param player locked player instance
>> +     * @param enabled true if dual subtitle selection is enabled
>> +     * @param data opaque pointer set by vlc_player_AddListener()
>> +     */
>> +    void (*on_dual_subtitles_enabled_changed)(vlc_player_t *player,
>> +        bool enabled, void *data);
>> +
>> +    /**
>>        * Called when a new renderer item is set
>>        *
>>        * @see vlc_player_SetRenderer()
>> @@ -2260,6 +2272,18 @@ VLC_API float
>>   vlc_player_GetAssociatedSubsFPS(vlc_player_t *player);
>>   
>>   /**
>> + * Enable or disable the abiltity to select multiple sub tracks.
>> + *
>> + * @note A successful call will trigger the
>> + * vlc_player_cbs.on_dual_subtitles_enabled_changed event.
>> + *
>> + * @param player locked player instance
>> + * @param enabled Enable dual subtitle track selection
>> + */
>> +VLC_API void
>> +vlc_player_SetDualSubtitlesEnabled(vlc_player_t *player, bool enabled);
> I don't understand why you would need 2 functions:
> vlc_player_SetDualSubtitlesEnabled and vlc_player_SetSubtitleMultipleSelection

I can remove vlc_player_SetSubtitleMultipleSelection if we add 
vlc_player_SelectTrackMultiple or modify the existing 
vlc_player_SelectTrack.

This is so we can limit which consumers of the API can select multiple 
subtitles (Not LUA, Remote ETC. Only the GUI and hotkeys)

The other function enables/disables dual subtitles in VLC (in the 
dropdown menu)

Thanks,

Roland



More information about the vlc-devel mailing list