[vlc-devel] [PATCH 6/9] es_out: use a name for the es_out id node that reflects which list fills it

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 17 15:04:38 CEST 2018


Here is it es_out_sys_t.es or es_out_sys_t.es_slaves
---
 src/input/es_out.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index b19abce2db..589705386a 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -109,7 +109,7 @@ struct es_out_id_t
     /* ID for the meta data */
     int         i_meta_id;
 
-    vlc_list_node node;    /* from list es_out_sys_t.es/es_slaves */
+    vlc_list_node es_or_slave_item;    /* from list es_out_sys_t.es/es_slaves */
 
     vlc_mouse_event mouse_event_cb;
     void* mouse_event_userdata;
@@ -142,9 +142,9 @@ typedef struct
 
     /* all es */
     int         i_id;
-    struct vlc_list es;  /* intrusive in es_out_id_t.node */
+    struct vlc_list es;  /* intrusive in es_out_id_t.es_or_slave_item */
     struct vlc_list es_slaves; /* Dynamically created es on regular es selection,
-                                  intrusive in es_out_id_t.node */
+                                  intrusive in es_out_id_t.es_or_slave_item */
 
     /* mode gestion */
     bool  b_active;
@@ -233,7 +233,7 @@ static inline bool EsFmtIsTeletext( const es_format_t *p_fmt )
 
 #define foreach_es_then_es_slaves( pos ) \
     for( int fetes_i=0; fetes_i<2; fetes_i++ ) \
-        vlc_list_foreach( pos, (!fetes_i ? &p_sys->es : &p_sys->es_slaves), node )
+        vlc_list_foreach( pos, (!fetes_i ? &p_sys->es : &p_sys->es_slaves), es_or_slave_item )
 
 
 /*****************************************************************************
@@ -373,7 +373,7 @@ static void EsOutTerminate( es_out_t *out )
         free(es->psz_language);
         free(es->psz_language_code);
         es_format_Clean(&es->fmt);
-        vlc_list_remove(&es->node);
+        vlc_list_remove(&es->es_or_slave_item);
         free(es);
     }
 
@@ -535,7 +535,7 @@ static int EsOutSetRecord(  es_out_t *out, bool b_record )
         if( !p_sys->p_sout_record )
             return VLC_EGENERIC;
 
-        vlc_list_foreach( p_es, &p_sys->es, node ) /* Only master es */
+        vlc_list_foreach( p_es, &p_sys->es, es_or_slave_item ) /* Only master es */
         {
             if( !p_es->p_dec )
                 continue;
@@ -547,7 +547,7 @@ static int EsOutSetRecord(  es_out_t *out, bool b_record )
     }
     else
     {
-        vlc_list_foreach( p_es, &p_sys->es, node ) /* Only master es */
+        vlc_list_foreach( p_es, &p_sys->es, es_or_slave_item ) /* Only master es */
         {
             if( !p_es->p_dec_record )
                 continue;
@@ -1449,7 +1449,7 @@ static void EsOutProgramUpdateScrambled( es_out_t *p_out, es_out_pgrm_t *p_pgrm
     es_out_id_t *es;
     bool b_scrambled = false;
 
-    vlc_list_foreach( es, &p_sys->es, node ) /* Only master es */
+    vlc_list_foreach( es, &p_sys->es, es_or_slave_item ) /* Only master es */
         if (es->p_pgrm == p_pgrm && es->b_scrambled)
         {
             b_scrambled = true;
@@ -1633,7 +1633,7 @@ static es_out_id_t *EsOutAddSlaveLocked( es_out_t *out, const es_format_t *fmt,
     es->mouse_event_cb = NULL;
     es->mouse_event_userdata = NULL;
 
-    vlc_list_append(&es->node, es->p_master ? &p_sys->es_slaves : &p_sys->es);
+    vlc_list_append(&es->es_or_slave_item, es->p_master ? &p_sys->es_slaves : &p_sys->es);
 
     if( es->p_pgrm == p_sys->p_pgrm )
         EsOutESVarUpdate( out, es, false );
@@ -2196,7 +2196,7 @@ static void EsOutDelLocked( es_out_t *out, es_out_id_t *es )
 
     EsDeleteInfo( out, es );
 
-    vlc_list_remove(&es->node);
+    vlc_list_remove(&es->es_or_slave_item);
 
     /* Update program */
     es->p_pgrm->i_es--;
-- 
2.17.0



More information about the vlc-devel mailing list