[vlc-devel] [PATCH 07/14] input: add a control to change str ids

Thomas Guillem thomas at gllm.fr
Fri Feb 21 16:59:38 CET 2020


---
 src/input/input.c          | 8 ++++++++
 src/input/input_internal.h | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/src/input/input.c b/src/input/input.c
index 8b7a6fe175b..18024ea6e06 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1599,6 +1599,9 @@ static void ControlRelease( int i_type, const input_control_param_t *p_param )
         free(p_param->list.ids);
         break;
     }
+    case INPUT_CONTROL_SET_ES_CAT_IDS:
+        free( p_param->cat_ids.str_ids );
+        break;
 
     default:
         break;
@@ -2061,6 +2064,11 @@ static bool Control( input_thread_t *p_input,
             es_out_Control( input_priv(p_input)->p_es_out_display,
                             ES_OUT_RESTART_ES, vlc_es_id_get_out( param.id ) );
             break;
+        case INPUT_CONTROL_SET_ES_CAT_IDS:
+            es_out_Control( input_priv(p_input)->p_es_out_display,
+                            ES_OUT_SET_ES_CAT_IDS, param.cat_ids.cat,
+                            param.cat_ids.str_ids );
+            break;
 
         case INPUT_CONTROL_SET_VIEWPOINT:
         case INPUT_CONTROL_SET_INITIAL_VIEWPOINT:
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 201bf5d36bb..91a02b392d5 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -425,6 +425,11 @@ typedef union
         vlc_tick_t delay;
     } cat_delay;
     struct
+    {
+        enum es_format_category_e cat;
+        char *str_ids;
+    } cat_ids;
+    struct
     {
         vlc_es_id_t *id;
         vlc_tick_t delay;
@@ -576,6 +581,7 @@ enum input_control_e
     INPUT_CONTROL_SET_ES_LIST,  // select a list of ES atomically
     INPUT_CONTROL_UNSET_ES,
     INPUT_CONTROL_RESTART_ES,
+    INPUT_CONTROL_SET_ES_CAT_IDS,
 
     INPUT_CONTROL_SET_VIEWPOINT,    // new absolute viewpoint
     INPUT_CONTROL_SET_INITIAL_VIEWPOINT, // set initial viewpoint (generally from video)
-- 
2.20.1



More information about the vlc-devel mailing list