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

Thomas Guillem thomas at gllm.fr
Sun May 19 21:25:27 CEST 2019



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).

> 
> 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.

> 
> 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


More information about the vlc-devel mailing list