[vlc-devel] commit: Added INPUT_EVENT_DEAD event. (Laurent Aimar )

git version control git at videolan.org
Mon Jan 5 21:26:43 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Dec 23 12:07:51 2008 +0100| [b2efc40a9581d828f969a86b098eed7d376cecad] | committer: Laurent Aimar 

Added INPUT_EVENT_DEAD event.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2efc40a9581d828f969a86b098eed7d376cecad
---

 include/vlc_input.h |    4 ++++
 src/input/event.c   |    7 +++++++
 src/input/event.h   |    1 +
 src/input/input.c   |    6 ++++--
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 1ddf852..143481b 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -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,
 
diff --git a/src/input/event.c b/src/input/event.c
index d389319..8c10dd5 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -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 )
 {
diff --git a/src/input/event.h b/src/input/event.h
index a86a75f..a6b8fcc 100644
--- a/src/input/event.h
+++ b/src/input/event.h
@@ -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 );
diff --git a/src/input/input.c b/src/input/input.c
index 64d0cf0..af6ee7a 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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 );
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list