Commit a86267a4 authored by Laurent Aimar's avatar Laurent Aimar

Documented and 'constified' meta and epg in es_out.

No functionnal changes.
parent 350c3b80
...@@ -65,10 +65,10 @@ enum es_out_query_e ...@@ -65,10 +65,10 @@ enum es_out_query_e
/* Allow preroll of data (data with dts/pts < i_pts for all ES will be decoded but not displayed */ /* 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) */ ES_OUT_SET_NEXT_DISPLAY_TIME, /* arg1=int64_t i_pts(microsecond) */
/* Set meta data for group (dynamic) */ /* Set meta data for group (dynamic) (The vlc_meta_t is not modified nor released) */
ES_OUT_SET_GROUP_META, /* arg1=int i_group arg2=vlc_meta_t */ ES_OUT_SET_GROUP_META, /* arg1=int i_group arg2=const vlc_meta_t */
/* Set epg for group (dynamic) */ /* Set epg for group (dynamic) (The vlc_epg_t is not modified nor released) */
ES_OUT_SET_GROUP_EPG, /* arg1=int i_group arg2=vlc_epg_t */ ES_OUT_SET_GROUP_EPG, /* arg1=int i_group arg2=const vlc_epg_t */
/* */ /* */
ES_OUT_DEL_GROUP, /* arg1=int i_group */ ES_OUT_DEL_GROUP, /* arg1=int i_group */
......
...@@ -1153,7 +1153,7 @@ static char *EsOutProgramGetMetaName( es_out_pgrm_t *p_pgrm ) ...@@ -1153,7 +1153,7 @@ static char *EsOutProgramGetMetaName( es_out_pgrm_t *p_pgrm )
return psz; return psz;
} }
static void EsOutProgramMeta( es_out_t *out, int i_group, vlc_meta_t *p_meta ) static void EsOutProgramMeta( es_out_t *out, int i_group, const vlc_meta_t *p_meta )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
es_out_pgrm_t *p_pgrm; es_out_pgrm_t *p_pgrm;
...@@ -1289,7 +1289,7 @@ static void vlc_epg_Merge( vlc_epg_t *p_dst, const vlc_epg_t *p_src ) ...@@ -1289,7 +1289,7 @@ static void vlc_epg_Merge( vlc_epg_t *p_dst, const vlc_epg_t *p_src )
} }
} }
static void EsOutProgramEpg( es_out_t *out, int i_group, vlc_epg_t *p_epg ) static void EsOutProgramEpg( es_out_t *out, int i_group, const vlc_epg_t *p_epg )
{ {
es_out_sys_t *p_sys = out->p_sys; es_out_sys_t *p_sys = out->p_sys;
input_thread_t *p_input = p_sys->p_input; input_thread_t *p_input = p_sys->p_input;
...@@ -2380,7 +2380,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2380,7 +2380,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
case ES_OUT_SET_GROUP_META: case ES_OUT_SET_GROUP_META:
{ {
int i_group = (int)va_arg( args, int ); int i_group = (int)va_arg( args, int );
vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t * ); const vlc_meta_t *p_meta = va_arg( args, const vlc_meta_t * );
EsOutProgramMeta( out, i_group, p_meta ); EsOutProgramMeta( out, i_group, p_meta );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -2388,7 +2388,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2388,7 +2388,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
case ES_OUT_SET_GROUP_EPG: case ES_OUT_SET_GROUP_EPG:
{ {
int i_group = (int)va_arg( args, int ); int i_group = (int)va_arg( args, int );
vlc_epg_t *p_epg = (vlc_epg_t*)va_arg( args, vlc_epg_t * ); const vlc_epg_t *p_epg = va_arg( args, const vlc_epg_t * );
EsOutProgramEpg( out, i_group, p_epg ); EsOutProgramEpg( out, i_group, p_epg );
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -1315,10 +1315,10 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co ...@@ -1315,10 +1315,10 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
case ES_OUT_RESET_PCR: /* no arg */ case ES_OUT_RESET_PCR: /* no arg */
break; break;
case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=vlc_meta_t* */ case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=const vlc_meta_t* */
{ {
p_cmd->control.int_meta.i_int = (int)va_arg( args, int ); p_cmd->control.int_meta.i_int = (int)va_arg( args, int );
vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t * ); const vlc_meta_t *p_meta = va_arg( args, const vlc_meta_t * );
if( b_copy ) if( b_copy )
{ {
...@@ -1329,15 +1329,16 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co ...@@ -1329,15 +1329,16 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
} }
else else
{ {
p_cmd->control.int_meta.p_meta = p_meta; /* The cast is only needed to avoid warning */
p_cmd->control.int_meta.p_meta = (vlc_meta_t*)p_meta;
} }
break; break;
} }
case ES_OUT_SET_GROUP_EPG: /* arg1=int i_group arg2=vlc_epg_t* */ case ES_OUT_SET_GROUP_EPG: /* arg1=int i_group arg2=const vlc_epg_t* */
{ {
p_cmd->control.int_epg.i_int = (int)va_arg( args, int ); p_cmd->control.int_epg.i_int = (int)va_arg( args, int );
vlc_epg_t *p_epg = (vlc_epg_t*)va_arg( args, vlc_epg_t * ); const vlc_epg_t *p_epg = va_arg( args, const vlc_epg_t * );
if( b_copy ) if( b_copy )
{ {
...@@ -1358,7 +1359,8 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co ...@@ -1358,7 +1359,8 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
} }
else else
{ {
p_cmd->control.int_epg.p_epg = p_epg; /* The cast is only needed to avoid warning */
p_cmd->control.int_epg.p_epg = (vlc_epg_t*)p_epg;
} }
break; break;
} }
...@@ -1447,11 +1449,11 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd ) ...@@ -1447,11 +1449,11 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
case ES_OUT_RESET_PCR: /* no arg */ case ES_OUT_RESET_PCR: /* no arg */
return es_out_Control( p_out, i_query ); return es_out_Control( p_out, i_query );
case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=vlc_meta_t* */ case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=const vlc_meta_t* */
return es_out_Control( p_out, i_query, p_cmd->control.int_meta.i_int, return es_out_Control( p_out, i_query, p_cmd->control.int_meta.i_int,
p_cmd->control.int_meta.p_meta ); p_cmd->control.int_meta.p_meta );
case ES_OUT_SET_GROUP_EPG: /* arg1=int i_group arg2=vlc_epg_t* */ case ES_OUT_SET_GROUP_EPG: /* arg1=int i_group arg2=const vlc_epg_t* */
return es_out_Control( p_out, i_query, p_cmd->control.int_epg.i_int, return es_out_Control( p_out, i_query, p_cmd->control.int_epg.i_int,
p_cmd->control.int_epg.p_epg ); p_cmd->control.int_epg.p_epg );
......
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