[vlc-devel] [PATCH 4/4] es_out: remove hacky control
Thomas Guillem
thomas at gllm.fr
Tue Jul 17 18:57:36 CEST 2018
---
include/vlc_es_out.h | 3 ---
src/input/es_out.c | 21 ---------------------
src/input/es_out_timeshift.c | 35 -----------------------------------
3 files changed, 59 deletions(-)
diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h
index 380685e085..03dcef9e94 100644
--- a/include/vlc_es_out.h
+++ b/include/vlc_es_out.h
@@ -64,9 +64,6 @@ enum es_out_query_e
ES_OUT_SET_GROUP_PCR, /* arg1= int i_group, arg2=vlc_tick_t i_pcr(microsecond!)*/
ES_OUT_RESET_PCR, /* no arg */
- /* Try not to use this one as it is a bit hacky */
- ES_OUT_SET_ES_FMT, /* arg1= es_out_id_t* arg2=es_format_t* */
-
/* Allow preroll of data (data with dts/pts < i_pts for all ES will be decoded but not displayed */
ES_OUT_SET_NEXT_DISPLAY_TIME, /* arg1=int64_t i_pts(microsecond) */
/* Set meta data for group (dynamic) (The vlc_meta_t is not modified nor released) */
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 3a23425510..3158bba3cf 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2593,27 +2593,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return VLC_EGENERIC;
}
- case ES_OUT_SET_ES_FMT:
- {
- /* This ain't pretty but is need by some demuxers (eg. Ogg )
- * to update the p_extra data */
- es_out_id_t *es = va_arg( args, es_out_id_t * );
- es_format_t *p_fmt = va_arg( args, es_format_t * );
- if( es == NULL )
- return VLC_EGENERIC;
-
- es_format_Clean( &es->fmt );
- es_format_Copy( &es->fmt, p_fmt );
-
- if( es->p_dec )
- {
- EsDestroyDecoder( out, es );
- EsCreateDecoder( out, es );
- }
-
- return VLC_SUCCESS;
- }
-
case ES_OUT_SET_ES_SCRAMBLED_STATE:
{
es_out_id_t *es = va_arg( args, es_out_id_t * );
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index f20dc3c1dd..672a3ab7e0 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -132,11 +132,6 @@ typedef struct attribute_packed
bool b_bool;
} es_bool;
struct
- {
- es_out_id_t *p_es;
- es_format_t *p_fmt;
- } es_fmt;
- struct
{
int i_cat;
int i_policy;
@@ -673,7 +668,6 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
case ES_OUT_SET_ES_DEFAULT:
case ES_OUT_SET_ES_STATE:
case ES_OUT_SET_ES_CAT_POLICY:
- case ES_OUT_SET_ES_FMT:
case ES_OUT_SET_TIMES:
case ES_OUT_SET_JITTER:
case ES_OUT_SET_EOS:
@@ -1584,24 +1578,6 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
p_cmd->u.control.u.es_bool.b_bool = (bool)va_arg( args, int );
break;
- case ES_OUT_SET_ES_FMT: /* arg1= es_out_id_t* arg2=es_format_t* */
- {
- p_cmd->u.control.u.es_fmt.p_es = (es_out_id_t*)va_arg( args, es_out_id_t * );
- es_format_t *p_fmt = (es_format_t*)va_arg( args, es_format_t * );
-
- if( b_copy )
- {
- p_cmd->u.control.u.es_fmt.p_fmt = malloc( sizeof(*p_fmt) );
- if( !p_cmd->u.control.u.es_fmt.p_fmt )
- return VLC_EGENERIC;
- es_format_Copy( p_cmd->u.control.u.es_fmt.p_fmt, p_fmt );
- }
- else
- {
- p_cmd->u.control.u.es_fmt.p_fmt = p_fmt;
- }
- break;
- }
case ES_OUT_SET_TIMES:
{
double f_position = (double)va_arg( args, double );
@@ -1694,10 +1670,6 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
return es_out_Control( p_out, i_query, p_cmd->u.control.u.es_policy.i_cat,
p_cmd->u.control.u.es_policy.i_policy );
- case ES_OUT_SET_ES_FMT: /* arg1= es_out_id_t* arg2=es_format_t* */
- return es_out_Control( p_out, i_query, p_cmd->u.control.u.es_fmt.p_es->p_es,
- p_cmd->u.control.u.es_fmt.p_fmt );
-
case ES_OUT_SET_TIMES:
return es_out_Control( p_out, i_query, p_cmd->u.control.u.times.f_position,
p_cmd->u.control.u.times.i_time,
@@ -1729,13 +1701,6 @@ static void CmdCleanControl( ts_cmd_t *p_cmd )
if( p_cmd->u.control.u.int_epg_evt.p_evt )
vlc_epg_event_Delete( p_cmd->u.control.u.int_epg_evt.p_evt );
break;
- case ES_OUT_SET_ES_FMT:
- if( p_cmd->u.control.u.es_fmt.p_fmt )
- {
- es_format_Clean( p_cmd->u.control.u.es_fmt.p_fmt );
- free( p_cmd->u.control.u.es_fmt.p_fmt );
- }
- break;
}
}
--
2.18.0
More information about the vlc-devel
mailing list