Commit 19c98153 authored by Laurent Aimar's avatar Laurent Aimar

Privatized ES_OUT_SET_ACTIVE/MODE and removed ES_OUT_GET_ACTIVE/MODE/GROUP.

parent ae7defef
...@@ -44,15 +44,6 @@ enum es_out_mode_e ...@@ -44,15 +44,6 @@ enum es_out_mode_e
enum es_out_query_e enum es_out_query_e
{ {
/* activate application of mode */
ES_OUT_SET_ACTIVE, /* arg1= bool */
/* see if mode is currently aplied or not */
ES_OUT_GET_ACTIVE, /* arg1= bool* */
/* set/get mode */
ES_OUT_SET_MODE, /* arg1= int */
ES_OUT_GET_MODE, /* arg2= int* */
/* set ES selected for the es category (audio/video/spu) */ /* set ES selected for the es category (audio/video/spu) */
ES_OUT_SET_ES, /* arg1= es_out_id_t* */ ES_OUT_SET_ES, /* arg1= es_out_id_t* */
ES_OUT_RESTART_ES, /* arg1= es_out_id_t* */ ES_OUT_RESTART_ES, /* arg1= es_out_id_t* */
...@@ -66,7 +57,6 @@ enum es_out_query_e ...@@ -66,7 +57,6 @@ enum es_out_query_e
/* */ /* */
ES_OUT_SET_GROUP, /* arg1= int */ ES_OUT_SET_GROUP, /* arg1= int */
ES_OUT_GET_GROUP, /* arg1= int* */
/* PCR handling, DTS/PTS will be automatically computed using thoses PCR /* PCR handling, DTS/PTS will be automatically computed using thoses PCR
* XXX: SET_PCR(_GROUP) are in charge of the pace control. They will wait * XXX: SET_PCR(_GROUP) are in charge of the pace control. They will wait
......
...@@ -2001,11 +2001,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2001,11 +2001,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return VLC_SUCCESS; return VLC_SUCCESS;
} }
case ES_OUT_GET_ACTIVE:
pb = (bool*) va_arg( args, bool * );
*pb = p_sys->b_active;
return VLC_SUCCESS;
case ES_OUT_SET_MODE: case ES_OUT_SET_MODE:
i = (int) va_arg( args, int ); i = (int) va_arg( args, int );
if( i == ES_OUT_MODE_NONE || i == ES_OUT_MODE_ALL || if( i == ES_OUT_MODE_NONE || i == ES_OUT_MODE_ALL ||
...@@ -2030,11 +2025,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2030,11 +2025,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
} }
return VLC_EGENERIC; return VLC_EGENERIC;
case ES_OUT_GET_MODE:
pi = (int*) va_arg( args, int* );
*pi = p_sys->i_mode;
return VLC_SUCCESS;
case ES_OUT_SET_ES: case ES_OUT_SET_ES:
case ES_OUT_RESTART_ES: case ES_OUT_RESTART_ES:
{ {
...@@ -2186,14 +2176,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2186,14 +2176,6 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
} }
return VLC_EGENERIC; return VLC_EGENERIC;
case ES_OUT_GET_GROUP:
pi = (int*) va_arg( args, int* );
if( p_sys->p_pgrm )
*pi = p_sys->p_pgrm->i_id;
else
*pi = -1; /* FIXME */
return VLC_SUCCESS;
case ES_OUT_SET_GROUP: case ES_OUT_SET_GROUP:
{ {
int j; int j;
......
...@@ -33,8 +33,15 @@ ...@@ -33,8 +33,15 @@
enum es_out_query_private_e enum es_out_query_private_e
{ {
/* activate application of mode */
ES_OUT_SET_ACTIVE = ES_OUT_PRIVATE_START, /* arg1= bool */
/* set/get mode */
ES_OUT_SET_MODE, /* arg1= int */
/* Get date to wait before demuxing more data */ /* Get date to wait before demuxing more data */
ES_OUT_GET_WAKE_UP = ES_OUT_PRIVATE_START, /* arg1=mtime_t* res=cannot fail */ ES_OUT_GET_WAKE_UP, /* arg1=mtime_t* res=cannot fail */
/* Wrapper for some ES command to work with id */ /* Wrapper for some ES command to work with id */
ES_OUT_SET_ES_BY_ID, ES_OUT_SET_ES_BY_ID,
......
...@@ -83,9 +83,7 @@ typedef struct ...@@ -83,9 +83,7 @@ typedef struct
int i_query; int i_query;
bool b_bool; bool b_bool;
bool *pb_bool;
int i_int; int i_int;
int *pi_int;
int64_t i_i64; int64_t i_i64;
vlc_meta_t *p_meta; vlc_meta_t *p_meta;
vlc_epg_t *p_epg; vlc_epg_t *p_epg;
...@@ -506,11 +504,8 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args ) ...@@ -506,11 +504,8 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
/* Pass-through control */ /* Pass-through control */
case ES_OUT_SET_ACTIVE: case ES_OUT_SET_ACTIVE:
case ES_OUT_GET_ACTIVE:
case ES_OUT_SET_MODE: case ES_OUT_SET_MODE:
case ES_OUT_GET_MODE:
case ES_OUT_SET_GROUP: case ES_OUT_SET_GROUP:
case ES_OUT_GET_GROUP:
case ES_OUT_SET_PCR: case ES_OUT_SET_PCR:
case ES_OUT_SET_GROUP_PCR: case ES_OUT_SET_GROUP_PCR:
case ES_OUT_RESET_PCR: case ES_OUT_RESET_PCR:
...@@ -522,7 +517,6 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args ) ...@@ -522,7 +517,6 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
case ES_OUT_RESTART_ES: case ES_OUT_RESTART_ES:
case ES_OUT_SET_ES_DEFAULT: case ES_OUT_SET_ES_DEFAULT:
case ES_OUT_SET_ES_STATE: case ES_OUT_SET_ES_STATE:
case ES_OUT_GET_ES_STATE:
case ES_OUT_SET_ES_FMT: case ES_OUT_SET_ES_FMT:
{ {
ts_cmd_t cmd; ts_cmd_t cmd;
...@@ -536,7 +530,21 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args ) ...@@ -536,7 +530,21 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
return CmdExecuteControl( p_sys->p_out, &cmd ); return CmdExecuteControl( p_sys->p_out, &cmd );
} }
/* Special control */ /* Special control when delayed */
case ES_OUT_GET_ES_STATE:
{
es_out_id_t *p_es = (es_out_id_t*)va_arg( args, es_out_id_t * );
bool *pb_enabled = (bool*)va_arg( args, bool* );
if( p_sys->b_delayed )
{
*pb_enabled = true;
return VLC_SUCCESS;
}
return es_out_Control( p_sys->p_out, ES_OUT_GET_ES_STATE, p_es, pb_enabled );
}
/* Special internal input control */
case ES_OUT_GET_EMPTY: case ES_OUT_GET_EMPTY:
{ {
bool *pb_empty = (bool*)va_arg( args, bool* ); bool *pb_empty = (bool*)va_arg( args, bool* );
...@@ -983,21 +991,12 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co ...@@ -983,21 +991,12 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
p_cmd->control.b_bool = (bool)va_arg( args, int ); p_cmd->control.b_bool = (bool)va_arg( args, int );
break; break;
case ES_OUT_GET_ACTIVE: /* arg1= bool* */
p_cmd->control.pb_bool = (bool*)va_arg( args, bool * );
break;
case ES_OUT_SET_MODE: /* arg1= int */ case ES_OUT_SET_MODE: /* arg1= int */
case ES_OUT_SET_GROUP: /* arg1= int */ case ES_OUT_SET_GROUP: /* arg1= int */
case ES_OUT_DEL_GROUP: /* arg1=int i_group */ case ES_OUT_DEL_GROUP: /* arg1=int i_group */
p_cmd->control.i_int = (int)va_arg( args, int ); p_cmd->control.i_int = (int)va_arg( args, int );
break; break;
case ES_OUT_GET_MODE: /* arg2= int* */
case ES_OUT_GET_GROUP: /* arg1= int* */
p_cmd->control.pi_int = (int*)va_arg( args, int * );
break;
case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/ case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */ case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */
p_cmd->control.i_i64 = (int64_t)va_arg( args, int64_t ); p_cmd->control.i_i64 = (int64_t)va_arg( args, int64_t );
...@@ -1071,11 +1070,6 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co ...@@ -1071,11 +1070,6 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
p_cmd->control.b_bool = (bool)va_arg( args, int ); p_cmd->control.b_bool = (bool)va_arg( args, int );
break; break;
case ES_OUT_GET_ES_STATE:/* arg1= es_out_id_t* arg2=bool* */
p_cmd->control.p_es = (es_out_id_t*)va_arg( args, es_out_id_t * );
p_cmd->control.pb_bool = (bool*)va_arg( args, bool * );
break;
case ES_OUT_SET_ES_FMT: /* arg1= es_out_id_t* arg2=es_format_t* */ case ES_OUT_SET_ES_FMT: /* arg1= es_out_id_t* arg2=es_format_t* */
{ {
p_cmd->control.p_es = (es_out_id_t*)va_arg( args, es_out_id_t * ); p_cmd->control.p_es = (es_out_id_t*)va_arg( args, es_out_id_t * );
...@@ -1112,18 +1106,11 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) ...@@ -1112,18 +1106,11 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
case ES_OUT_SET_ACTIVE: /* arg1= bool */ case ES_OUT_SET_ACTIVE: /* arg1= bool */
return es_out_Control( p_out, i_query, p_cmd->control.b_bool ); return es_out_Control( p_out, i_query, p_cmd->control.b_bool );
case ES_OUT_GET_ACTIVE: /* arg1= bool* */
return es_out_Control( p_out, i_query, p_cmd->control.pb_bool );
case ES_OUT_SET_MODE: /* arg1= int */ case ES_OUT_SET_MODE: /* arg1= int */
case ES_OUT_SET_GROUP: /* arg1= int */ case ES_OUT_SET_GROUP: /* arg1= int */
case ES_OUT_DEL_GROUP: /* arg1=int i_group */ case ES_OUT_DEL_GROUP: /* arg1=int i_group */
return es_out_Control( p_out, i_query, p_cmd->control.i_int ); return es_out_Control( p_out, i_query, p_cmd->control.i_int );
case ES_OUT_GET_MODE: /* arg2= int* */
case ES_OUT_GET_GROUP: /* arg1= int* */
return es_out_Control( p_out, i_query, p_cmd->control.pi_int );
case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/ case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */ case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */
return es_out_Control( p_out, i_query, p_cmd->control.i_i64 ); return es_out_Control( p_out, i_query, p_cmd->control.i_i64 );
...@@ -1149,9 +1136,6 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) ...@@ -1149,9 +1136,6 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
case ES_OUT_SET_ES_STATE:/* arg1= es_out_id_t* arg2=bool */ case ES_OUT_SET_ES_STATE:/* arg1= es_out_id_t* arg2=bool */
return es_out_Control( p_out, i_query, p_cmd->control.p_es->p_es, p_cmd->control.b_bool ); return es_out_Control( p_out, i_query, p_cmd->control.p_es->p_es, p_cmd->control.b_bool );
case ES_OUT_GET_ES_STATE:/* arg1= es_out_id_t* arg2=bool* */
return es_out_Control( p_out, i_query, p_cmd->control.p_es->p_es, p_cmd->control.pb_bool );
case ES_OUT_SET_ES_FMT: /* arg1= es_out_id_t* arg2=es_format_t* */ 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->control.p_es->p_es, p_cmd->control.p_fmt ); return es_out_Control( p_out, i_query, p_cmd->control.p_es->p_es, p_cmd->control.p_fmt );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment