input: Send vlc_InputSelectedStreamChanged.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 14:22:35 +0000 (16:22 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 14:26:30 +0000 (16:26 +0200)
include/vlc_events.h
src/input/es_out.c
src/input/input.c
src/misc/events.c

index c26cdb5..51a3faa 100644 (file)
@@ -114,6 +114,7 @@ typedef struct vlc_event_manager_t
 typedef enum vlc_event_type_t {
     /* Input (thread) events */
     vlc_InputStateChanged,
+    vlc_InputSelectedStreamChanged,
 
     /* Input item events */
     vlc_InputItemMetaChanged,
@@ -142,6 +143,10 @@ typedef struct vlc_event_t
         {
             int new_state;
         } input_state_changed;
+        struct vlc_input_selected_stream_changed
+        {
+            void * unused;
+        } input_selected_stream_changed;
 
         /* Input item events */
         struct vlc_input_item_meta_changed
index 3afcc2d..df4fb09 100644 (file)
@@ -1699,6 +1699,9 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
                     PL_UNLOCK;
                 }
                 pl_Release( p_sys->p_input );
+                vlc_event_t event;
+                event.type = vlc_InputSelectedStreamChanged;
+                vlc_event_send( &p_sys->p_input->p->event_manager, &event );
             }
             return VLC_SUCCESS;
  
index f397d4d..c954bb5 100644 (file)
@@ -169,6 +169,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     vlc_event_manager_t * p_em = &p_input->p->event_manager;
     vlc_event_manager_init_with_vlc_object( p_em, p_input );
     vlc_event_manager_register_event_type( p_em, vlc_InputStateChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputSelectedStreamChanged );
 
     /* Init Common fields */
     p_input->b_eof = false;
index cd883c7..1989335 100644 (file)
@@ -73,6 +73,7 @@ typedef struct vlc_event_listeners_group_t
 static const char ppsz_event_type_to_name[][33] =
 {
     [vlc_InputStateChanged]             = "vlc_InputStateChanged",
+    [vlc_InputSelectedStreamChanged]    = "vlc_InputSelectedStreamChanged",
 
     [vlc_InputItemMetaChanged]          = "vlc_InputItemMetaChanged",
     [vlc_InputItemSubItemAdded]         = "vlc_InputItemSubItemAdded",