1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-27 04:21:53 +02:00

Added INPUT_EVENT_DEAD event.

This commit is contained in:
Laurent Aimar 2008-12-23 12:07:51 +01:00
parent 81ccc88fec
commit b2efc40a95
4 changed files with 16 additions and 2 deletions

View 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,

View 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 )
{

View 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 );

View 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 );
}
/*****************************************************************************