]> git.sesse.net Git - vlc/commitdiff
Added INPUT_EVENT_DEAD event.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 23 Dec 2008 11:07:51 +0000 (12:07 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 5 Jan 2009 19:49:11 +0000 (20:49 +0100)
include/vlc_input.h
src/input/event.c
src/input/event.h
src/input/input.c

index 1ddf852b44f98095318447c8873725ce203ad550..143481bbca45a2f2a2d2cc123d90ce28ad47e785 100644 (file)
@@ -520,8 +520,12 @@ typedef enum input_event_type_e
 {
     /* "state" has changed */
     INPUT_EVENT_STATE,
+    /* b_dead is true */
+    INPUT_EVENT_DEAD,
+
     /* "rate" has changed */
     INPUT_EVENT_RATE,
+
     /* At least one of "position" or "time" or "length" has changed */
     INPUT_EVENT_TIMES,
 
index d3893196883ea9eb62137ff20d44e28ab3182ea3..8c10dd5c722ef2bc22c06dc295b2a8a7ffe77cc5 100644 (file)
@@ -39,6 +39,13 @@ static void Trigger( input_thread_t *p_input, int i_type );
 /*****************************************************************************
  * Event for input.c
  *****************************************************************************/
+void input_SendEventDead( input_thread_t *p_input )
+{
+    p_input->b_dead = true;
+
+    Trigger( p_input, INPUT_EVENT_DEAD );
+}
+
 void input_SendEventTimes( input_thread_t *p_input,
                            double f_position, mtime_t i_time, mtime_t i_length )
 {
index a86a75fab92dd3a523a6fdc14c64a926da48470a..a6b8fccdd3bd939230dd464fe1aa66459a69f189 100644 (file)
@@ -33,6 +33,7 @@
 /*****************************************************************************
  * Event for input.c
  *****************************************************************************/
+void input_SendEventDead( input_thread_t *p_input );
 void input_SendEventTimes( input_thread_t *p_input, double f_position, mtime_t i_time, mtime_t i_length );
 void input_SendEventStatistics( input_thread_t *p_input );
 void input_SendEventRate( input_thread_t *p_input, int i_rate );
index 64d0cf03a7c17f63332082e3563ee8ea5db2b956..af6ee7ada96d97fa7c8e44f4384bf41132021e6c 100644 (file)
@@ -520,7 +520,9 @@ static void *Run( vlc_object_t *p_this )
     End( p_input );
 
 exit:
-    p_input->b_dead = true;
+    /* Tell we're dead */
+    input_SendEventDead( p_input );
+
     vlc_restorecancel( canc );
     return NULL;
 }
@@ -1398,7 +1400,7 @@ static void End( input_thread_t * p_input )
     }
 
     /* Tell we're dead */
-    p_input->b_dead = true;
+    input_SendEventDead( p_input );
 }
 
 /*****************************************************************************