[vlc-devel] [PATCH 3/4] input: add a new variable storing which track was last modified

Felix Abecassis felix.abecassis at gmail.com
Fri Jul 18 19:40:51 CEST 2014


---
 src/input/event.c | 3 +++
 src/input/var.c   | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/src/input/event.c b/src/input/event.c
index 34148c6..a97a8f2 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -280,6 +280,7 @@ void input_SendEventEsAdd( input_thread_t *p_input, int i_cat, int i_id, const c
     if( i_cat != UNKNOWN_ES )
     {
         var_SetInteger( p_input, "es-type", i_cat );
+        var_SetInteger( p_input, "track-id", i_id );
         VarListAdd( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES_ADD,
                     i_id, psz_text );
     }
@@ -289,6 +290,7 @@ void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id )
     if( i_cat != UNKNOWN_ES )
     {
         var_SetInteger( p_input, "es-type", i_cat );
+        var_SetInteger( p_input, "track-id", i_id );
         VarListDel( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES_DELETE, i_id );
     }
 }
@@ -298,6 +300,7 @@ void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
     if( i_cat != UNKNOWN_ES )
     {
         var_SetInteger( p_input, "es-type", i_cat );
+        var_SetInteger( p_input, "track-id", i_id );
         VarListSelect( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES_SELECT, i_id );
     }
 }
diff --git a/src/input/var.c b/src/input/var.c
index 8cea426..08b6326 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -230,6 +230,8 @@ void input_ControlVarInit ( input_thread_t *p_input )
         var_Create( p_input, "intf-event", VLC_VAR_INTEGER );
         /* Which ES type was last modified (addition/removal/selection of a track). */
         var_Create( p_input, "es-type", VLC_VAR_INTEGER );
+        /* Which track was last modified */
+        var_Create( p_input, "track-id", VLC_VAR_INTEGER );
     }
 
     /* Add all callbacks
-- 
1.9.1




More information about the vlc-devel mailing list