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

Roland Bewick roland.bewick at gmail.com
Mon May 20 05:15:49 CEST 2019


On Mon, 20 May 2019 at 2:25 AM, Thomas Guillem <thomas at gllm.fr> wrote:

>
>
> On Sat, May 18, 2019, at 15:28, Roland Bewick wrote:
> > Hi, turns out there's a few things I'm still uncertain about:
> >
> > 1. Because selection of ES does not complete before the
> > vlc_player_SelectTrackList ends, the list of spu ids passed to the api
> > must be allocated in memory.
>
> Let the player handle this allocation, not the player user (so duplicate
> it from player implementation).


That’s a better idea, thanks :-)


>
> >
> > The list then needs to be freed once the selection is complete (I do
> > that in input.c:ControlRelease)
> >
> > I can update the documentation about this.
> >
> > 2. In passing the list of es ids to es_out_Control I realised I also
> > need to deal with demux_Control (DEMUX_SET_ES). To be honest I have very
> > little knowledge
> > in this area and would appreciate some input.
> >
> > There seem to be two modules (ASF and bluray) that depend on this event
> > to enable the subtitle stream. However, I have doubts that simultaneous
> > subtitle streams are supported.
> > I don't have the hardware to test bluray myrself and I'm also not sure
> > if I can find a WMV (ASF) with multiple embedded sub tracks?
> >
> > So, I feel options are pretty limited with regards to the new
> > INPUT_CONTROL_SET_ES_LIST event.
> >
> > Please refer to the following code:
> > =================
> >
> > case INPUT_CONTROL_SET_ES:
> > {
> >      if( es_out_Control( input_priv(p_input)->p_es_out_display,
> >                          ES_OUT_SET_ES, param.id ) == VLC_SUCCESS )
> >          demux_Control( input_priv(p_input)->master->p_demux,
> DEMUX_SET_ES,
> >                         vlc_es_id_GetInputId( param.id ) );
> >      break;
> > }
> >
> > case INPUT_CONTROL_SET_ES_LIST:
> > {
> >      if( es_out_Control( input_priv(p_input)->p_es_out_display,
> >                          ES_OUT_SET_ES_LIST, param.list.cat,
> >                          param.list.ids ) == VLC_SUCCESS )
> >      {
> >          /* What to do here? */
> >      }
> >      break;
> > }
> >
> > =================
> >
> > A. I can add a DEMUX_SET_ES_LIST event and add support in relevant files
> > that check for the DEMUX_SET_ES event.
> >      - I can't test this option as I mentioned above.
>
> Maybe, but we can take care of implementing it for each modules that needs
> it.


In that case, I think this is the cleanest option as it paves the way for
how the dual subtitles should be supported in those modules. For now I
could check the list length within the individual implementations (like you
suggested in C) and if there’s a single element use the DEMUX_SET_ES
behaviour.

Thanks again,
Roland


>
> >
> > B. Loop and call the existing DEMUX_SET_ES for each ES ID (Don't touch
> > any of the individual consumers)
> >      - I'm using existing code, however I can't guarantee dual subtitles
> > will actually be enabled (I can't test this either)
>
> No
>
> >
> > C. Don't call the demux_Control in the INPUT_CONTROL_SET_ES_LIST event,
> > and only use vlc_player_SelectTrackList when dual subtitles are enabled.
> >      - Single subtitle behaviour will be unchanged.
> >      - Dual subtitles will work for External subtitles and embedded in
> > formats such as .MKV. Bluray / ASF will be unsupported.
>
> Or call DEMUX_SET_ES if the list contains only one element.
>
> >
> >
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190520/cfe37712/attachment.html>


More information about the vlc-devel mailing list