[vlc-devel] [PATCH 5/9] es_out: use a name for the program node that reflects which list fills it
Steve Lhomme
robux4 at ycbcr.xyz
Fri Aug 17 15:04:37 CEST 2018
Here is it es_out_sys_t.programs
---
src/input/es_out.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 7d8b9b666c..b19abce2db 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -73,7 +73,7 @@ typedef struct
input_clock_t *p_input_clock;
vlc_meta_t *p_meta;
- vlc_list_node node; /* from list es_out_sys_t.programs */
+ vlc_list_node programs_item; /* from list es_out_sys_t.programs */
} es_out_pgrm_t;
struct es_out_id_t
@@ -137,7 +137,7 @@ typedef struct
vlc_mutex_t lock;
/* all programs */
- struct vlc_list programs; /* using es_out_pgrm_t.node */
+ struct vlc_list programs; /* using es_out_pgrm_t.programs_item */
es_out_pgrm_t *p_pgrm; /* Master program */
/* all es */
@@ -379,13 +379,13 @@ static void EsOutTerminate( es_out_t *out )
/* FIXME duplicate work EsOutProgramDel (but we cannot use it) add a EsOutProgramClean ? */
es_out_pgrm_t *p_pgrm;
- vlc_list_foreach(p_pgrm, &p_sys->programs, node)
+ vlc_list_foreach(p_pgrm, &p_sys->programs, programs_item)
{
input_clock_Delete( p_pgrm->p_input_clock );
if( p_pgrm->p_meta )
vlc_meta_Delete( p_pgrm->p_meta );
- vlc_list_remove(&p_pgrm->node);
+ vlc_list_remove(&p_pgrm->programs_item);
free( p_pgrm );
}
@@ -638,7 +638,7 @@ static void EsOutChangePosition( es_out_t *out )
}
es_out_pgrm_t *pgrm;
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
input_clock_Reset(pgrm->p_input_clock);
p_sys->b_buffering = true;
@@ -782,7 +782,7 @@ static void EsOutProgramChangePause( es_out_t *out, bool b_paused, vlc_tick_t i_
es_out_sys_t *p_sys = container_of(out, es_out_sys_t, out);
es_out_pgrm_t *pgrm;
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
input_clock_ChangePause(pgrm->p_input_clock, b_paused, i_date);
}
@@ -808,7 +808,7 @@ static void EsOutProgramsChangeRate( es_out_t *out )
es_out_sys_t *p_sys = container_of(out, es_out_sys_t, out);
es_out_pgrm_t *pgrm;
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
input_clock_ChangeRate(pgrm->p_input_clock, p_sys->i_rate);
}
@@ -1102,7 +1102,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
input_clock_SetJitter( p_pgrm->p_input_clock, p_sys->i_pts_delay, p_sys->i_cr_average );
/* Append it */
- vlc_list_append(&p_pgrm->node, &p_sys->programs);
+ vlc_list_append(&p_pgrm->programs_item, &p_sys->programs);
/* Update "program" variable */
if( EsOutIsProgramVisible( out, i_group ) )
@@ -1123,7 +1123,7 @@ static int EsOutProgramDel( es_out_t *out, int i_group )
input_thread_t *p_input = p_sys->p_input;
es_out_pgrm_t *p_pgrm = NULL, *pgrm;
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
if (pgrm->i_id == i_group)
{
p_pgrm = pgrm;
@@ -1140,7 +1140,7 @@ static int EsOutProgramDel( es_out_t *out, int i_group )
return VLC_EGENERIC;
}
- vlc_list_remove(&p_pgrm->node);
+ vlc_list_remove(&p_pgrm->programs_item);
/* If program is selected we need to unselect it */
if( p_sys->p_pgrm == p_pgrm )
@@ -1165,7 +1165,7 @@ static es_out_pgrm_t *EsOutProgramFind( es_out_t *p_out, int i_group )
es_out_sys_t *p_sys = container_of(p_out, es_out_sys_t, out);
es_out_pgrm_t *pgrm;
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
if (pgrm->i_id == i_group)
return pgrm;
@@ -2587,7 +2587,7 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
i_pts_delay = p_sys->i_pts_delay;
/* reset clock */
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
input_clock_Reset(pgrm->p_input_clock);
}
else
@@ -2621,7 +2621,7 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
int i = va_arg( args, int );
es_out_pgrm_t *p_pgrm;
- vlc_list_foreach(p_pgrm, &p_sys->programs, node)
+ vlc_list_foreach(p_pgrm, &p_sys->programs, programs_item)
if( p_pgrm->i_id == i )
{
EsOutProgramSelect( out, p_pgrm );
@@ -2887,7 +2887,7 @@ static int EsOutVaControlLocked( es_out_t *out, int i_query, va_list args )
p_sys->i_cr_average = i_cr_average;
if (b_change_clock)
- vlc_list_foreach(pgrm, &p_sys->programs, node)
+ vlc_list_foreach(pgrm, &p_sys->programs, programs_item)
input_clock_SetJitter(pgrm->p_input_clock, i_pts_delay
+ i_pts_jitter, i_cr_average);
return VLC_SUCCESS;
--
2.17.0
More information about the vlc-devel
mailing list