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

git version control git at videolan.org
Mon Dec 21 00:02:30 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 16:21:15 2009 +0100| [368b4f25dc223bd1fda3540e933860ef4e38eb8a] | committer: Laurent Aimar 

Added INPUT_EVENT_ITEM_EPG event.

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

 include/vlc_input.h |    2 ++
 src/input/es_out.c  |    2 ++
 src/input/event.c   |    4 ++++
 src/input/event.h   |    1 +
 4 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 1f152ef..d25490e 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -414,6 +414,8 @@ typedef enum input_event_type_e
     INPUT_EVENT_ITEM_INFO,
     /* input_item_t name has changed */
     INPUT_EVENT_ITEM_NAME,
+    /* input_item_t epg has changed */
+    INPUT_EVENT_ITEM_EPG,
 
     /* Input statistics have been updated */
     INPUT_EVENT_STATISTICS,
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 02dc8b8..a7ef525 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -373,6 +373,7 @@ static void EsOutDelete( es_out_t *out )
     TAB_CLEAN( p_sys->i_pgrm, p_sys->pgrm );
 
     input_item_SetEpgOffline( p_sys->p_input->p->p_item );
+    input_SendEventMetaEpg( p_sys->p_input );
 
     vlc_mutex_destroy( &p_sys->lock );
 
@@ -1267,6 +1268,7 @@ static void EsOutProgramEpg( es_out_t *out, int i_group, const vlc_epg_t *p_epg
     epg.psz_name = psz_cat;
 
     input_item_SetEpg( p_item, &epg );
+    input_SendEventMetaEpg( p_sys->p_input );
 
     /* Update now playing */
     free( p_pgrm->psz_now_playing );
diff --git a/src/input/event.c b/src/input/event.c
index adb8cdc..06505ae 100644
--- a/src/input/event.c
+++ b/src/input/event.c
@@ -233,6 +233,10 @@ void input_SendEventMetaName( input_thread_t *p_input, const char *psz_name )
     vlc_event_send( &p_input->p->p_item->event_manager, &event );
 }
 
+void input_SendEventMetaEpg( input_thread_t *p_input )
+{
+    Trigger( p_input, INPUT_EVENT_ITEM_EPG );
+}
 /*****************************************************************************
  * Event for es_out.c
  *****************************************************************************/
diff --git a/src/input/event.h b/src/input/event.h
index 6fc9d99..4b56cfe 100644
--- a/src/input/event.h
+++ b/src/input/event.h
@@ -52,6 +52,7 @@ void input_SendEventCache( input_thread_t *p_input, double f_level );
 void input_SendEventMeta( input_thread_t *p_input );
 void input_SendEventMetaInfo( input_thread_t *p_input );
 void input_SendEventMetaName( input_thread_t *p_input, const char *psz_name );
+void input_SendEventMetaEpg( input_thread_t *p_input );
 
 /*****************************************************************************
  * Event for es_out.c




More information about the vlc-devel mailing list