[vlc-devel] [PATCH 05/10] Adds INPUT_EVENT_BROWSE

Julien 'Lta' BALLET elthariel at gmail.com
Mon May 26 11:41:45 CEST 2014


From: Julien 'Lta' BALLET <contact at lta.io>

This will allows input thread to report that the current item needs
browsing. We'll use that to restart the current played item in
playlist for example.
---
 include/vlc_input.h | 4 ++++
 src/input/event.c   | 6 ++++++
 src/input/event.h   | 1 +
 3 files changed, 11 insertions(+)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 88bfe65..5466f07 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -394,6 +394,10 @@ typedef enum input_event_type_e
     /* A vout_thread_t object has been created/deleted by *the input* */
     INPUT_EVENT_VOUT,
 
+    /* The currently played item is an browsable item and needs to be browsed
+     * before being able to play it (usually reported by access) */
+    INPUT_EVENT_BROWSE,
+
 } input_event_type_e;
 
 /**
diff --git a/src/input/event.c b/src/input/event.c
index 453e04b..f52c236 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -195,6 +195,11 @@ void input_SendEventCache( input_thread_t *p_input, double f_level )
     Trigger( p_input, INPUT_EVENT_CACHE );
 }
 
+void input_SendEventBrowse( input_thread_t *p_input )
+{
+    Trigger( p_input, INPUT_EVENT_BROWSE );
+}
+
 /* FIXME: review them because vlc_event_send might be
  * moved inside input_item* functions.
  */
@@ -330,6 +335,7 @@ void input_SendEventBookmark( input_thread_t *p_input )
  *****************************************************************************/
 static void Trigger( input_thread_t *p_input, int i_type )
 {
+    /* msg_Dbg( p_input, "Input Trigger(%d)", i_type); */
     var_SetInteger( p_input, "intf-event", i_type );
 }
 static void VarListAdd( input_thread_t *p_input,
diff --git a/src/input/event.h b/src/input/event.h
index c8f1071..4d3f602 100644
--- a/src/input/event.h
+++ b/src/input/event.h
@@ -43,6 +43,7 @@ void input_SendEventSeekpoint( input_thread_t *p_input, int i_title, int i_seekp
 void input_SendEventSignal( input_thread_t *p_input, double f_quality, double f_strength );
 void input_SendEventState( input_thread_t *p_input, int i_state );
 void input_SendEventCache( input_thread_t *p_input, double f_level );
+void input_SendEventBrowse( input_thread_t *p_input );
 
 /* TODO rename Item* */
 void input_SendEventMeta( input_thread_t *p_input );
-- 
1.9.3




More information about the vlc-devel mailing list