[vlc-devel] [PATCH 5/6] Revert "input: Allow track autoselection to be enabled/disabled"
Thomas Guillem
thomas at gllm.fr
Fri Feb 28 13:52:16 CET 2020
Actually, I will keep the es_out part. It will allow me to clean an UGLY hack in input.c:input_SlaveSourceAdd().
It will be used to specially enable subtitle tracks when loading a slave.
On Fri, Feb 28, 2020, at 13:47, Thomas Guillem wrote:
> This reverts commit f800fd9ee730410072613012015d89eec1e658cf.
> ---
> src/input/es_out.c | 20 --------------------
> src/input/es_out.h | 9 ---------
> src/input/input.c | 4 ----
> src/input/input_internal.h | 6 ------
> 4 files changed, 39 deletions(-)
>
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index 407502f0470..fe4922b512e 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -3563,26 +3563,6 @@ static int EsOutVaPrivControlLocked( es_out_t
> *out, int query, va_list args )
> EsOutSelectList( out, cat, es_id_list );
> return VLC_SUCCESS;
> }
> - case ES_OUT_PRIV_SET_AUTOSELECT:
> - {
> - int i_cat = va_arg( args, int );
> - bool b_enabled = va_arg( args, int );
> - switch ( i_cat )
> - {
> - case VIDEO_ES:
> - p_sys->video.b_autoselect = b_enabled;
> - break;
> - case AUDIO_ES:
> - p_sys->audio.b_autoselect = b_enabled;
> - break;
> - case SPU_ES:
> - p_sys->sub.b_autoselect = b_enabled;
> - break;
> - default:
> - return VLC_EGENERIC;
> - }
> - return VLC_SUCCESS;
> - }
> case ES_OUT_PRIV_SET_ES_BY_ID:
> case ES_OUT_PRIV_RESTART_ES_BY_ID:
> case ES_OUT_PRIV_SET_ES_DEFAULT_BY_ID:
> diff --git a/src/input/es_out.h b/src/input/es_out.h
> index 4d5e2393605..3d0568d4d00 100644
> --- a/src/input/es_out.h
> +++ b/src/input/es_out.h
> @@ -51,10 +51,6 @@ enum es_out_query_private_e
> /* Select a list of ES */
> ES_OUT_PRIV_SET_ES_LIST, /* arg1= vlc_es_id_t *const* (null
> terminated array) */
>
> - /* Disable autoselection of tracks from a given category */
> - ES_OUT_PRIV_SET_AUTOSELECT, /* arg1= int (es category),
> - arg2= int (enabled/disabled),
> res=can fail */
> -
> /* Wrapper for some ES command to work with id */
> ES_OUT_PRIV_SET_ES_BY_ID, /* arg1= int,
> arg2= bool (forced) */
> ES_OUT_PRIV_RESTART_ES_BY_ID,
> @@ -154,11 +150,6 @@ static inline int es_out_SetEsList( es_out_t
> *p_out,
> {
> return es_out_PrivControl( p_out, ES_OUT_PRIV_SET_ES_LIST, cat,
> ids );
> }
> -static inline int es_out_SetAutoSelect( es_out_t *p_out,
> - enum es_format_category_e cat,
> bool enabled )
> -{
> - return es_out_PrivControl( p_out, ES_OUT_PRIV_SET_AUTOSELECT, cat,
> enabled );
> -}
> static inline int es_out_SetEsById( es_out_t *p_out, int id, bool
> forced )
> {
> return es_out_PrivControl( p_out, ES_OUT_PRIV_SET_ES_BY_ID, id,
> forced );
> diff --git a/src/input/input.c b/src/input/input.c
> index bf880ee48bc..098f96b3a8e 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -2345,10 +2345,6 @@ static bool Control( input_thread_t *p_input,
> param.vbi_transparency.id,
> param.vbi_transparency.enabled
> );
> break;
> - case INPUT_CONTROL_SET_ES_AUTOSELECT:
> - es_out_SetAutoSelect( priv->p_es_out_display,
> param.es_autoselect.cat,
> - param.es_autoselect.enabled );
> - break;
>
> case INPUT_CONTROL_NAV_ACTIVATE:
> case INPUT_CONTROL_NAV_UP:
> diff --git a/src/input/input_internal.h b/src/input/input_internal.h
> index 6790dce7556..49c6cfc6d58 100644
> --- a/src/input/input_internal.h
> +++ b/src/input/input_internal.h
> @@ -452,10 +452,6 @@ typedef union
> vlc_es_id_t *id;
> bool enabled;
> } vbi_transparency;
> - struct {
> - enum es_format_category_e cat;
> - bool enabled;
> - } es_autoselect;
> } input_control_param_t;
>
> typedef struct
> @@ -608,8 +604,6 @@ enum input_control_e
>
> INPUT_CONTROL_SET_VBI_PAGE,
> INPUT_CONTROL_SET_VBI_TRANSPARENCY,
> -
> - INPUT_CONTROL_SET_ES_AUTOSELECT,
> };
>
> /* Internal helpers */
> --
> 2.20.1
>
> _______________________________________________
> 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