Commit aa31cdc3 authored by Laurent Aimar's avatar Laurent Aimar

Added INPUT_EVENT_TELETEXT.

parent 23f6c1e3
...@@ -442,7 +442,7 @@ struct input_thread_t ...@@ -442,7 +442,7 @@ struct input_thread_t
* - "can-rate" * - "can-rate"
* - "can-rewind" * - "can-rewind"
* - "can-record" (if a stream can be recorded while playing) * - "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-quality"
* - "signal-strength" * - "signal-strength"
* *
...@@ -541,6 +541,8 @@ typedef enum input_event_type_e ...@@ -541,6 +541,8 @@ typedef enum input_event_type_e
INPUT_EVENT_PROGRAM, INPUT_EVENT_PROGRAM,
/* A ES has been added or removed or selected */ /* A ES has been added or removed or selected */
INPUT_EVENT_ES, INPUT_EVENT_ES,
/* "teletext-es" has changed */
INPUT_EVENT_TELETEXT,
/* "record" has changed */ /* "record" has changed */
INPUT_EVENT_RECORD, INPUT_EVENT_RECORD,
......
...@@ -800,9 +800,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt, ...@@ -800,9 +800,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
if( b_delete ) if( b_delete )
{ {
/* TODO event */ /* TODO it should probably be a list */
if( b_teletext ) 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 ); input_SendEventEsDel( p_input, SPU_ES, i_id );
return; return;
...@@ -860,9 +860,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt, ...@@ -860,9 +860,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, es_format_t *fmt,
if( b_teletext ) if( b_teletext )
{ {
/* TODO event */ /* TODO it should probably be a list */
if( var_GetInteger( p_sys->p_input, "teletext-es" ) < 0 ) 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 );
} }
} }
......
...@@ -288,6 +288,16 @@ void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id ) ...@@ -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 ); 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 ) void input_SendEventVout( input_thread_t *p_input )
{ {
Trigger( p_input, INPUT_EVENT_VOUT ); Trigger( p_input, INPUT_EVENT_VOUT );
......
...@@ -63,10 +63,13 @@ void input_SendEventProgramAdd( input_thread_t *p_input, ...@@ -63,10 +63,13 @@ void input_SendEventProgramAdd( input_thread_t *p_input,
int i_program, const char *psz_text ); int i_program, const char *psz_text );
void input_SendEventProgramDel( input_thread_t *p_input, int i_program ); void input_SendEventProgramDel( input_thread_t *p_input, int i_program );
void input_SendEventProgramSelect( 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_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_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_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 * Event for decoder.c
*****************************************************************************/ *****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment