[vlc-devel] [PATCH 01/15] Enable selection of secondary SPU ES in the core

Thomas Guillem thomas at gllm.fr
Wed May 15 13:01:51 CEST 2019


On Wed, May 15, 2019, at 12:54, Steve Lhomme wrote:
> On 2019-05-15 12:39, Thomas Guillem wrote:
> > I think I prefer the following API:
> > 
> > VLC_API void
> > vlc_player_SelectTrackList(vlc_player_t *player, enum 
> > es_format_category_e cat, vlc_es_id_t *const es_id_list[]);
> > 
> > VLC_API void
> > vlc_player_UnselectTrackList(vlc_player_t *player, enum 
> > es_format_category_e cat, vlc_es_id_t *const es_id_list[]);
> 
> Isn't -1 supposed "no es track" ? 
Not with the player, the track id is now a pointer.
> I so a select { -1 } would just 
> unselect all tracks (of that type) at once. If one of many track needs 
> to be selected, it can be handled on the host side which track are 
> selected or not and adjust the list of tracks to select accordingly.

Yes, UnselectTrackList is useless. Users just have to call vlc_player_SelectTrackList with a new array minus one track if they want to unselect everything but one track.

> 
> > es_id_list is a NULL terminated array of vlc_es_id_t
> > 
> > 
> > Example of use case:
> > {
> >    vlc_es_id_t *spu_list[] = { spu_id_1, spu_id_2, NULL };
> >    vlc_player_SelectTrackList(player, SPU_ES, spu_list);
> > }
> > 
> > vlc_player_SelectTrackList will replace every tracks of one category by 
> > the one specified in the array.
> > 
> > On Wed, May 15, 2019, at 11:30, Roland Bewick wrote:
> >>
> >>
> >> On 15/05/2019 3:59 PM, Thomas Guillem wrote:
> >>> The new way to select multiple tracks should be more generic since it 
> >>> could possibly work for video and audio (in the future).
> >>>
> >>> The player API is new and was not yet published, we can modify it easily.
> >>>
> >>> We could just add a "bool multiple" to vlc_player_SelectTrack(); and 
> >>> specify in the documentation that multiple work only for Video and 
> >>> for 2 subtitles.
> >>>
> >>> Or we can find a new function, like vlc_player_SelectTrackMultiple().
> >>
> >> I'd prefer adding an extra parameter to the existing 
> >> vlc_player_SelectTrack, but it is not up to me.
> >>
> >> Could the VLC team make a decision on this?
> >>
> >> Thanks,
> >>
> >> Roland
> >>
> >>
> >> _______________________________________________
> >> 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