[vlc-devel] [PATCH 10/13] change interface of SendEventEsSelect
Aaron Wang
hughwung at gmail.com
Wed Sep 16 15:49:48 CEST 2015
---
src/input/event.c | 11 ++++++++---
src/input/event.h | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/input/event.c b/src/input/event.c
index d2d6301..346b273 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -282,11 +282,16 @@ void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id )
if( i_cat != UNKNOWN_ES )
VarListDel( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES, i_id );
}
-/* i_id == -1 will unselect */
-void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
+/* i_id == -1 will unselect. we allow multi select using bit */
+void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id, int i_ret )
{
if( i_cat != UNKNOWN_ES )
- VarListSelect( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES, i_id );
+ {
+ if(i_ret & 1)
+ VarListSelect( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES, i_id );
+ if(i_ret & 2 && i_cat == SPU_ES)
+ VarListSelect( p_input, "spu-es2", INPUT_EVENT_ES, i_id );
+ }
}
void input_SendEventTeletextAdd( input_thread_t *p_input,
diff --git a/src/input/event.h b/src/input/event.h
index e91ad11..9ef6284 100644
--- a/src/input/event.h
+++ b/src/input/event.h
@@ -60,7 +60,7 @@ void input_SendEventProgramScrambled( input_thread_t *p_input, int i_group, bool
void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id );
void input_SendEventEsAdd( input_thread_t *p_input, int i_cat, int i_id, const char *psz_text );
-void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id ); /* i_id == -1 will unselect */
+void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id, int i_ord ); /* i_id == -1 will unselect */
void input_SendEventTeletextAdd( input_thread_t *p_input,
int i_teletext, const char *psz_text );
--
1.9.1
More information about the vlc-devel
mailing list