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

Added INPUT_EVENT_TELETEXT.

This commit is contained in:
Laurent Aimar 2008-11-23 14:29:50 +01:00
parent 23f6c1e308
commit aa31cdc3ab
4 changed files with 20 additions and 5 deletions

View File

@ -442,7 +442,7 @@ struct input_thread_t
* - "can-rate"
* - "can-rewind"
* - "can-record" (if a stream can be recorded while playing)
* - "teletext-es" to get the index of spu track that is teletext --1 if no teletext)
* - "teletext-es" to get the index of spu track that is teletext -1 if no teletext)
* - "signal-quality"
* - "signal-strength"
*
@ -541,6 +541,8 @@ typedef enum input_event_type_e
INPUT_EVENT_PROGRAM,
/* A ES has been added or removed or selected */
INPUT_EVENT_ES,
/* "teletext-es" has changed */
INPUT_EVENT_TELETEXT,
/* "record" has changed */
INPUT_EVENT_RECORD,

View File

@ -800,9 +800,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
if( b_delete )
{
/* TODO event */
/* TODO it should probably be a list */
if( b_teletext )
var_SetInteger( p_sys->p_input, "teletext-es", -1 );
input_SendEventTeletext( p_sys->p_input, -1 );
input_SendEventEsDel( p_input, SPU_ES, i_id );
return;
@ -860,9 +860,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
if( b_teletext )
{
/* TODO event */
/* TODO it should probably be a list */
if( var_GetInteger( p_sys->p_input, "teletext-es" ) < 0 )
var_SetInteger( p_sys->p_input, "teletext-es", i_id );
input_SendEventTeletext( p_sys->p_input, i_id );
}
}

View File

@ -288,6 +288,16 @@ void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
vlc_event_send( &p_input->p->event_manager, &event );
}
void input_SendEventTeletext( input_thread_t *p_input, int i_id )
{
vlc_value_t val;
val.i_int = i_id;
var_Change( p_input, "teletext-es", VLC_VAR_SETVALUE, &val, NULL );
Trigger( p_input, INPUT_EVENT_TELETEXT );
}
void input_SendEventVout( input_thread_t *p_input )
{
Trigger( p_input, INPUT_EVENT_VOUT );

View File

@ -63,10 +63,13 @@ void input_SendEventProgramAdd( input_thread_t *p_input,
int i_program, const char *psz_text );
void input_SendEventProgramDel( input_thread_t *p_input, int i_program );
void input_SendEventProgramSelect( input_thread_t *p_input, int i_program );
void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id );
void input_SendEventEsAdd( input_thread_t *p_input, int i_cat, int i_id, const char *psz_text );
void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id ); /* i_id == -1 will unselect */
void input_SendEventTeletext( input_thread_t *p_input, int i_id );
/*****************************************************************************
* Event for decoder.c
*****************************************************************************/