[vlc-devel] [PATCH 2/6] input: rename ES selection controls

Thomas Guillem thomas at gllm.fr
Wed Aug 29 14:24:27 CEST 2018


These controls selected ESes by their id.
---
 include/vlc_input.h        | 2 +-
 src/input/control.c        | 4 ++--
 src/input/input.c          | 4 ++--
 src/input/input_internal.h | 4 ++--
 src/input/var.c            | 6 +++---
 src/playlist/engine.c      | 2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 88acc266c0..890bcc8a6b 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -531,7 +531,7 @@ enum input_query_e
                             * arg5= bool check_extension */
 
     /* ES */
-    INPUT_RESTART_ES,       /* arg1=int (-AUDIO/VIDEO/SPU_ES for the whole category) */
+    INPUT_RESTART_ES_BY_ID,/* arg1=int (-AUDIO/VIDEO/SPU_ES for the whole category) */
 
     /* Viewpoint */
     INPUT_UPDATE_VIEWPOINT, /* arg1=(const vlc_viewpoint_t*), arg2=bool b_absolute */
diff --git a/src/input/control.c b/src/input/control.c
index 64b9a3db52..bae8a67b7e 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -357,9 +357,9 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             return VLC_EGENERIC;
         }
 
-        case INPUT_RESTART_ES:
+        case INPUT_RESTART_ES_BY_ID:
             val.i_int = va_arg( args, int );
-            input_ControlPushHelper( p_input, INPUT_CONTROL_RESTART_ES, &val );
+            input_ControlPushHelper( p_input, INPUT_CONTROL_RESTART_ES_BY_ID, &val );
             return VLC_SUCCESS;
 
         case INPUT_UPDATE_VIEWPOINT:
diff --git a/src/input/input.c b/src/input/input.c
index ebbebaa196..62c07e38a5 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2039,7 +2039,7 @@ static bool Control( input_thread_t *p_input,
                                (size_t)1, &(const int){ param.val.i_int });
             break;
 
-        case INPUT_CONTROL_SET_ES:
+        case INPUT_CONTROL_SET_ES_BY_ID:
             /* No need to force update, es_out does it if needed */
             es_out_Control( input_priv(p_input)->p_es_out_display,
                             ES_OUT_SET_ES_BY_ID, (int)param.val.i_int, true );
@@ -2048,7 +2048,7 @@ static bool Control( input_thread_t *p_input,
                     (int)param.val.i_int );
             break;
 
-        case INPUT_CONTROL_RESTART_ES:
+        case INPUT_CONTROL_RESTART_ES_BY_ID:
             es_out_Control( input_priv(p_input)->p_es_out_display,
                             ES_OUT_RESTART_ES_BY_ID, (int)param.val.i_int );
             break;
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 70374612de..08a3a1d5f1 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -220,8 +220,8 @@ enum input_control_e
     INPUT_CONTROL_NAV_POPUP,
     INPUT_CONTROL_NAV_MENU,
 
-    INPUT_CONTROL_SET_ES,
-    INPUT_CONTROL_RESTART_ES,
+    INPUT_CONTROL_SET_ES_BY_ID,
+    INPUT_CONTROL_RESTART_ES_BY_ID,
 
     INPUT_CONTROL_SET_VIEWPOINT,    // new absolute viewpoint
     INPUT_CONTROL_SET_INITIAL_VIEWPOINT, // set initial viewpoint (generally from video)
diff --git a/src/input/var.c b/src/input/var.c
index 99a03f0f42..9795785ef9 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -1019,7 +1019,7 @@ static int EsVideoCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( newval.i_int < 0 )
         newval.i_int = -VIDEO_ES; /* disable video es */
 
-    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES, &newval );
+    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES_BY_ID, &newval );
 
     return VLC_SUCCESS;
 }
@@ -1033,7 +1033,7 @@ static int EsAudioCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( newval.i_int < 0 )
         newval.i_int = -AUDIO_ES; /* disable audio es */
 
-    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES, &newval );
+    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES_BY_ID, &newval );
 
     return VLC_SUCCESS;
 }
@@ -1047,7 +1047,7 @@ static int EsSpuCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( newval.i_int < 0 )
         newval.i_int = -SPU_ES; /* disable spu es */
 
-    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES, &newval );
+    input_ControlPushHelper( p_input, INPUT_CONTROL_SET_ES_BY_ID, &newval );
 
     return VLC_SUCCESS;
 }
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 400396a41f..01ecc741a0 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -179,7 +179,7 @@ static int VideoSplitterCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( p_input )
     {
         const double f_position = var_GetFloat( p_input, "position" );
-        input_Control( p_input, INPUT_RESTART_ES, -VIDEO_ES );
+        input_Control( p_input, INPUT_RESTART_ES_BY_ID, -VIDEO_ES );
         var_SetFloat( p_input, "position", f_position );
     }
 
-- 
2.18.0



More information about the vlc-devel mailing list